From cfc089555149cfc3809ec389cf2f76c94c01922e Mon Sep 17 00:00:00 2001 From: doannamq Date: Tue, 14 Oct 2025 15:45:05 +0700 Subject: [PATCH] =?UTF-8?q?Fix:=20fix=20chart=20tr=C3=AAn=20prod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/_helpers/chartRegister.js | 15 +++++++++++++++ src/index.js | 1 + 2 files changed, 16 insertions(+) create mode 100644 src/_helpers/chartRegister.js 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";