Instead of limiting the records, you can also limit the values returned for the X-axis to only every nth value by specifying the appropriate calculation such as:
If ( Mod ( Get ( RecordNumber ) ; 5 ) = 0 ; X-Axis value goes here )
That would only display a value with every 5th record and you can simply change the number to get a different interval. This could even be computed in a way that adjusts for the total number of records in your found set.
Thanks Phil, I have modified calculation to related records count and it did the work.
If ( Mod ( ProductsStockHistory::ID ; 5 ) = 0; ProductsStockHistory::Datum;"")It is not easy to do dynamic calculation according to graph control width (due to anchors), so I have send feature request to Filemaker.
If you ever delete records from ProductsStockHistory, your method will have a problem due to the missing record. That's one of the reasons that I used Get ( RecordNumber ) instead. This did assume that you were charting individual records in the layout's found set--not always the case
To set up a calc that automatically adjusts for the number of records--still assuming one record per data point in current found set:
Let ( Interval = int ( Get ( FoundCount ) / 15 ) ; // specifies about 15 labels for x-axis
If ( Mod ( Get ( RecordNumber ) ; Interval ) = 0 ; X-Axis value goes here )