Skip to content

Commit

Permalink
chart.js fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gengar-i committed Nov 16, 2023
1 parent 8126d0f commit e675aea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/bundle/Resources/encore/ibexa.js.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const layout = [
path.resolve(__dirname, '../public/js/scripts/core/split.btn.js'),
path.resolve(__dirname, '../public/js/scripts/core/pie.chart.js'),
path.resolve(__dirname, '../public/js/scripts/core/bar.chart.js'),
path.resolve(__dirname, '../public/js/scripts/core/doughnut.chart.js'),
path.resolve(__dirname, '../public/js/scripts/core/adaptive.items.js'),
path.resolve(__dirname, '../public/js/scripts/core/popup.menu.js'),
path.resolve(__dirname, '../public/js/scripts/core/tag.view.select.js'),
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/public/js/scripts/core/base.chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
},
};
const defaultPlugins = {};
const defaultPlugins = [];

class BaseChart {
constructor(data, options = {}, plugins = []) {
Expand Down
6 changes: 3 additions & 3 deletions src/bundle/Resources/public/js/scripts/core/doughnut.chart.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function (global, doc, ibexa) {
class DoughnutChart extends ibexa.core.BaseChart {
constructor(data) {
super(data);
constructor(data, options = {}, plugins = []) {
super(data, options, plugins);

this.type = 'doughnut';
}
Expand All @@ -11,5 +11,5 @@
}
}

ibexa.addConfig('core.chart.Doughnut', DoughnutChart);
ibexa.addConfig('core.chart.DoughnutChart', DoughnutChart);
})(window, window.document, window.ibexa);

0 comments on commit e675aea

Please sign in to comment.