diff --git a/src/_helpers/chartRegister.js b/src/_helpers/chartRegister.js new file mode 100644 index 0000000..b56cbe8 --- /dev/null +++ b/src/_helpers/chartRegister.js @@ -0,0 +1,15 @@ +import { Chart, ArcElement, DoughnutController, Tooltip, Legend, CategoryScale, LinearScale, BarElement, BarController, LineController, LineElement, PointElement } from 'chart.js'; + +Chart.register( + ArcElement, + DoughnutController, + Tooltip, + Legend, + CategoryScale, + LinearScale, + BarElement, + BarController, + LineController, + LineElement, + PointElement +); \ No newline at end of file diff --git a/src/index.js b/src/index.js index e051025..d3999e2 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ import React from "react"; import ReactDOM from "react-dom"; +import "./_helpers/chartRegister" import App from "./App"; import registerServiceWorker from "./registerServiceWorker"; import appReducers from "./_reducers";