react-apexcharts icon indicating copy to clipboard operation
react-apexcharts copied to clipboard

Getting an error for while dragging and dropping a Chart regarding the height being NaN and whole page crashes

Open noobDev31 opened this issue 2 years ago • 1 comments

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; width?: string | number; height?: string | number; options?: ApexOptions; [key: string]: any; };

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 -

image

noobDev31 avatar Sep 19 '22 12:09 noobDev31

i have also tried giving a height = '100%' as a default to the the ReactApexChart

noobDev31 avatar Sep 19 '22 12:09 noobDev31