You must be logged in to post your query.
Home › Forums › Chart Support › How To Set The IntervalType and Interval Programmatically
The JSFiddle at http://jsfiddle.net/tsjLdr1h/10/ provides an example of how to configure the Interval and Interval type while creating a new chart.
Is it possible to do the same programmatically through the chart api?
E.g. in the JSFiddle above, comment out the interval and interval settings lines (line 7 and 8), then add the following lines at the end, after the chart.render() line (after line 33):
chart.axisX[0].intervalType = “hour”; chart.axisX[0].interval = 2; chart.render();
You will observe that those code lines have no impact on the interval settings.
Can the interval and interval type be set programmatically?
@oneworld
You can change / set different properties of a chart using set method. In your case, using chart.axisX[0].set("interval", 4); will work.
chart.axisX[0].set("interval", 4);
—- Bivek Singh
You must be logged in to reply to this topic. Login/Register