diff --git a/demo/examples/dynamic-updates.html b/demo/examples/dynamic-updates.html
index 540c15e..7be3175 100644
--- a/demo/examples/dynamic-updates.html
+++ b/demo/examples/dynamic-updates.html
@@ -65,6 +65,8 @@
Dynamic updates
+
+
@@ -376,6 +378,11 @@ Dynamic updates
color: 'green',
id: '1',
},
+ {
+ data: [200, 100],
+ color: 'red',
+ id: '2',
+ },
],
});
@@ -392,6 +399,27 @@ Dynamic updates
],
});
};
+
+ window.removeLines.onclick = () => {
+ yagr8.setConfig({
+ timeline: [100000, 200000],
+ series: [],
+ });
+ };
+
+ window.addLines.onclick = () => {
+ yagr8.setConfig({
+ timeline: [100000, 200000],
+ series: [
+ ...yagr8.config.series,
+ {
+ data: [(Math.random() * 100) >> 0, (Math.random() * 100) >> 0],
+ color: randomColor(),
+ id: ('1' + Math.random() * 100) >> 0,
+ },
+ ],
+ });
+ };