Home Forums Chart Support How To Set The IntervalType and Interval Programmatically

How To Set The IntervalType and Interval Programmatically

Viewing 2 posts - 1 through 2 (of 2 total)
  • #14459

    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?

    #14462

    @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.

    —-
    Bivek Singh

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.