Home forums Using CanvasJS Line chart – number of points

This topic contains 1 reply, has 2 voices, and was last updated by  Shashi Ranjan 2 weeks, 1 day ago.

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

    Can I control number of points in the simple line chart using loop?
    If I want 5 points, I need to write it myself (all 5) in the code, but I want to control it with loop.

    Hope someone can help me.



    You can push any number of dataPoint to the chart options / data by looping through the desired data source as per your requirement. Please take a look at this JSFiddle for the same.

    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.