Hi,
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.
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.