Home › forums › Using CanvasJS › How to make X axis ajust to data?
This topic contains 2 replies, has 2 voices, and was last updated by roberto_imai 1 year, 7 months ago.
I’m trying out the solution, but my plot x axis isn’t adjusting to the amount of data that I have automatically.
For example, I have 1000 data points, but the X axis defaults to over 5000.
So, my plot gets squished to the side and I get a whole big area with nothing in it.
How do I make it adjust to my number of data points automatically?
Can you please create a jsfiddle reproducing the the issue that you are facing so that we can look into your code and help you out better.
I hacked it by using a global variable and getting the count of datapoints when it is parsing the CSV and using that to dynamically set the maximum axisX value.
You must be logged in to reply to this topic.