You must be logged in to post your query.
Home › Forums › Chart Support › Arrays in canvanjs dataplots
Tagged: Using CanvasJS
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!
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.
Hi Anjali,
Thank you! it helped me alot!!
You must be logged in to reply to this topic. Login/Register