react-apexcharts
react-apexcharts copied to clipboard
Getting an error for while dragging and dropping a Chart regarding the height being NaN and whole page crashes
I am trying to use the ReactApexChart in my low code app and my code is the following -
`/* eslint-disable no-console */ import ReactApexChart from 'react-apexcharts'; import {ApexOptions} from 'apexcharts'; import {TCommonBaseProps} from '../../common';
export type TChartProps = TCommonBaseProps
& {
type?: 'line' | 'area' | 'bar' | 'histogram' | 'pie' | 'donut' | 'radialBar' | 'scatter'
| 'bubble'
| 'heatmap'
| 'treemap'
| 'boxPlot'
| 'candlestick'
| 'radar'
| 'polarArea'
| 'rangeBar';
series?: Array
const ChartLowCode = (props: TChartProps): JSX.Element => { const {series = [], options = {}, type = 'bar'} = props; return ( <ReactApexChart {...props} series={series} options={options} type={type} /> ); };
export {ChartLowCode as Chart};`
But I get the following error in the console something like this -
i have also tried giving a height = '100%' as a default to the the ReactApexChart