Home Forums Chart Support Arrays in canvanjs dataplots

Arrays in canvanjs dataplots

Viewing 3 posts - 1 through 3 (of 3 total)
  • #6421

    Hi guys,

    Can someone guide me on how to convert long datapoints into arrays as i have a long list to plot and i hope of an easier way to loop instead of typing x 50 times.

    Currently, i have datapoints with x which increment of .25 and y of a formula –

    Example:

    dataPoints: [
    { x: 0, y: 1000*(0.5/(50*0.6))* (Math.exp(-((6)/(50*0.6)*0))) }
    ];

    link here: http://jsfiddle.net/QwZuf/95/

    Thank you!

    #6422

    Hi Junjie,
    You can calculate with in a loop so that each time you have no need to put a long calculation in dataPoints. Here is a example can help you http://jsfiddle.net/anjalij/QDkdH/2/
    Please let me know if either it is works for you or if you face any problem.

    • This reply was modified 10 years, 3 months ago by Anjali.
    #6429

    Hi Anjali,

    Thank you! it helped me alot!!

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

You must be logged in to reply to this topic.