14 lines
382 B
JavaScript
14 lines
382 B
JavaScript
// carico jscript...
|
|
|
|
|
|
///Setup del chart desiderato con id univoco
|
|
window.setup = (id, config) => {
|
|
var ctx = document.getElementById(id);
|
|
if (window['stdChart' + id] instanceof Chart) {
|
|
window['stdChart' + id].destroy();
|
|
window['stdChart' + id] = new Chart(ctx, config);
|
|
}
|
|
else {
|
|
window['stdChart' + id] = new Chart(ctx, config);
|
|
}
|
|
} |