Sets the minimum value of Axis. Values smaller than minimum are clipped. minimum also sets the lower limit while panning chart.
Default: Automatically Calculated based on the datavar chart = new CanvasJS.Chart("container", { . . axisX:{ minimum: 150, }, . . }); chart.render();
Also See:
12 Comments
Is it possible to change the minimum and maximum dynamically? Tried it with variables as values but if variable change and chart is rendered the minimum and maximum aren’t renewed.
Hi,
Yes, you can change minimum and maximum values dynamically. Here is an example.
Is there a callback function to get the min and max values? For example, i pass in all the data and since the min and max is being calculated anyway, can I retrieve those values?
[update]
We have just released v1.9.6 Beta with Methods & Properties, which allows you to programmatically export chart as image, print chart, access internally calculated values, etc. Please refer to the release blog for more information.
Bartel,
We still don’t have an API to access auto-calculated values.
Another question, is possible to reverse the order in which data is displayed?
Sorry, we don’t have this feature as of now.
can I customize all tick values of the xaxis tick for a time series?
Gary,
Can you please briefly describe the kind of customization that you are looking for.
How can i set a minimum date if my x axis is date?
You can set minimum/maximum on a Date / Time axis by setting, Date/Time values to minimum/maximum property of axisX. You can use JavaScript Date objects to do the same as shown below.
minimum : new Date(2012, 01, 1)
How to get the default maximum of axixX/Y? Whats the getter code?
Veeru,
We have introduced Methods & Properties in v1.9.6 which lets you know the auto-calculated values like minimum, maximum, interval, etc. Please refer to blog-post for more information.