You must be logged in to post your query.
Home › Forums › Chart Support › chart with ajax
i need to update my chart when i clic button
$(document).ready(function () { $(document).on('click', '#graphline', function () { data = [ {y: 10, label: 'aaa'}, {y: 11, label: 'bbb'}, {y: 12, label: 'ccc'}, {y: 13, label: 'd d'}, {y: 14, label: 'e e'}, {y: 15, label: 'f f'}, {y: 16, label: 'g g'} ] $.each(data, function (key, value) { dataPoints.push({x: value[0], y: parseInt(value[1])}); xValue++; yValue = parseInt(value[1]); }); chart.render(); alert('cc'); }); });
@awna,
You can update the chart on button click by updating the chart options and calling render(). Please refer to this documentation page for step to step tutorial on the same.
—- Manoj Mohan Team CanvasJS
You must be logged in to reply to this topic. Login/Register