Hi All,
New here and trying
to make this work. Please note I’m also not very skilled in JS.
Thanks in advance.
|
document.getElementById('load').onclick = () => {
chart.series[0].dataSource.push({ x: new Date(2012, 0, 1), y: 74 });
chart.series[1].dataSource.push({ x: new Date(2012, 0, 1), y: 90 });
chart.refresh();
} |
|
document.getElementById('load').onclick = () => {
// to override single point.
chart.series[0].dataSource[0].y = 14;
chart.series[1].dataSource[0].y = 34;
// to change whole data
chart.series[0].dataSource = [
{ x: new Date(2012, 0, 1), y: 31 },
//…
];
chart.series[1].dataSource = [
{ x: new Date(2012, 0, 1), y: 18 },
//…
];
chart.refresh();
} |