diff --git a/composer.json b/composer.json index 3ca15a3..4d8b5c7 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,8 @@ ], "require": { "php": "^5.2|^7|^8", - "npm-asset/chartist": "0.11.4", - "npm-asset/chartist-plugin-tooltips-updated": "0.1.4" + "npm-asset/chartist": "^1.3.0", + "npm-asset/chartist-plugin-tooltips-updated": "^1.0.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^1.0", @@ -82,11 +82,9 @@ }, "extra": { "copy-file": { - "vendor/npm-asset/chartist/dist/chartist.min.css": "css/", - "vendor/npm-asset/chartist/dist/chartist.min.js": "js/", - "vendor/npm-asset/chartist/dist/chartist.min.js.map": "js/", - "vendor/npm-asset/chartist-plugin-tooltips-updated/dist/chartist-plugin-tooltip.min.js": "js/", - "vendor/npm-asset/chartist-plugin-tooltips-updated/dist/chartist-plugin-tooltip.min.js.map": "js/" + "vendor/npm-asset/chartist/dist/index.css": "css/chartist.min.css", + "vendor/npm-asset/chartist/dist/index.umd.js": "js/chartist.min.js", + "vendor/npm-asset/chartist-plugin-tooltips-updated/dist/chartist-plugin-tooltip.min.js": "js/" } }, "config": { diff --git a/js/dashboard.js b/js/dashboard.js index cad4675..fc03931 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -38,7 +38,7 @@ } // Draw chart. - chart = new Chartist.Line( '#statify_chart', { + chart = new Chartist.LineChart( '#statify_chart', { labels: labels, series: [ data, @@ -47,7 +47,7 @@ low: 0, showArea: true, fullWidth: fullWidth, - width: ( fullWidth ? null : 5 * data.length ), + width: ( fullWidth ? undefined : 5 * data.length ), axisX: { showGrid: false, showLabel: false,