We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Changin Y value

Hi

How to change the y values dynamically.

for example i have a default chart using datasource if i click the button the chart y values are need to change dynamically.

Thanks in advance

1 Reply

AB Akbar Basha K M Syncfusion Team October 13, 2014 04:35 AM UTC

Hi Mathi,

Thanks for using syncfusion product. We have analyzed your requirement and we like to inform you that you can achieve your requirement using button click event as follows,

function Click(){

var chart = $("#container").ejChart("instance");

  var len = chart.model.series[0].points.length;

for (var i = 0; i < len; i++){

chart.model.series[0].dataSource[i].y =  Math.floor(Math.random() * 700) + 200;

}  $("#container").ejChart("redraw");}

We have prepared a sample based on this. Please find the attached sample.

Please let us know if you have any concern.

Thanks,

Akbar Basha KM.


Attachment: y_b548f214.zip

Loader.
Up arrow icon