(chart, label, color, border, data)
| 186 | dataset |
| 187 | */ |
| 188 | function updateGraph(chart, label, color, border, data) { |
| 189 | chart.data.datasets.pop(); |
| 190 | chart.data.labels = x_axis; |
| 191 | chart.data.datasets.push({ |
| 192 | label: label, |
| 193 | data: data, |
| 194 | backgroundColor: color, |
| 195 | borderColor: border |
| 196 | }); |
| 197 | chart.update(); |
| 198 | } |
| 199 | |
| 200 | /* |
| 201 | Function to add or remove data |