Home Forums Chart Support Dynamic multiline chart graph with scrollbar at x axis Reply To: Dynamic multiline chart graph with scrollbar at x axis

#23965

@rajshree,

You can use jQuery ScrollBar to add scrolling functionality to the chart. To sync the ScrollBar with the axis you need to update the axis viewport with the ScrollBar value as shown in the code snippet below –

chart.options.axisX.viewportMinimum = $(".scroll-bar").slider("option", "value");
chart.options.axisX.viewportMaximum = chart.options.axisX.viewportMinimum + viewportSize;

Please take a look at this JSFiddle to add ScrollBar on X Axis with dynamic data.

Dynamic chart with scrollbar

___________
Indranil Deo
Team CanvasJS