diff --git a/js/src/consts/files.js b/js/src/consts/files.js index 67d2c9b023..71a6fa22f0 100644 --- a/js/src/consts/files.js +++ b/js/src/consts/files.js @@ -36,7 +36,8 @@ const PhpToJsFileMapping = { tbl_structure: ['tbl_structure'], tbl_indexes: [], tbl_relation: ['tbl_relation'], - tbl_replace: [] + tbl_replace: [], + tbl_chart: ['tbl_chart'] }; const JsFileList = [ @@ -69,7 +70,8 @@ const JsFileList = [ 'db_central_columns', 'indexes', 'tbl_structure', - 'tbl_relation' + 'tbl_relation', + 'tbl_chart' ]; export { diff --git a/libraries/classes/Controllers/Table/TableChartController.php b/libraries/classes/Controllers/Table/TableChartController.php index e0fc1a7c9a..e2a98166fe 100644 --- a/libraries/classes/Controllers/Table/TableChartController.php +++ b/libraries/classes/Controllers/Table/TableChartController.php @@ -92,22 +92,7 @@ class TableChartController extends TableController return; } - $this->response->getHeader()->getScripts()->addFiles( - [ - 'chart.js', - 'tbl_chart.js', - 'vendor/jqplot/jquery.jqplot.js', - 'vendor/jqplot/plugins/jqplot.barRenderer.js', - 'vendor/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js', - 'vendor/jqplot/plugins/jqplot.canvasTextRenderer.js', - 'vendor/jqplot/plugins/jqplot.categoryAxisRenderer.js', - 'vendor/jqplot/plugins/jqplot.dateAxisRenderer.js', - 'vendor/jqplot/plugins/jqplot.pointLabels.js', - 'vendor/jqplot/plugins/jqplot.pieRenderer.js', - 'vendor/jqplot/plugins/jqplot.enhancedPieLegendRenderer.js', - 'vendor/jqplot/plugins/jqplot.highlighter.js' - ] - ); + $this->response->getHeader()->getScripts()->addFile('tbl_chart'); /** * Extract values for common work