diff --git a/src/Components/Facility/Consultations/components/LinePlot.tsx b/src/Components/Facility/Consultations/components/LinePlot.tsx index 492f80f0388..92e3afcec61 100644 --- a/src/Components/Facility/Consultations/components/LinePlot.tsx +++ b/src/Components/Facility/Consultations/components/LinePlot.tsx @@ -1,4 +1,32 @@ -import ReactECharts from "echarts-for-react"; +import ReactEchartsCore from "echarts-for-react/lib/core"; +import { BarChart, LineChart } from "echarts/charts"; +import { + DataZoomComponent, + GridComponent, + LegendComponent, + TitleComponent, + ToolboxComponent, + TooltipComponent, + VisualMapComponent, + VisualMapPiecewiseComponent, +} from "echarts/components"; + +import * as echarts from "echarts/core"; +import { CanvasRenderer } from "echarts/renderers"; +echarts.use([ + BarChart, + LineChart, + CanvasRenderer, + DataZoomComponent, + GridComponent, + LegendComponent, + LegendComponent, + TitleComponent, + ToolboxComponent, + TooltipComponent, + VisualMapComponent, + VisualMapPiecewiseComponent, +]); export const LinePlot = (props: any) => { const { @@ -197,7 +225,8 @@ export const LinePlot = (props: any) => { } return ( - { @@ -81,5 +108,5 @@ export const StackedLinePlot = (props: any) => { }, series: series, }; - return ; + return ; };