Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
const newOptions = {
chart: {
type: this.props.type ? this.props.type : 'line',
height: this.props.height ? this.props.height : 'auto',
width: this.props.width ? this.props.width : '100%'
},
series: this.props.series
}
const config = ApexCharts.merge(this.props.options, newOptions);
const chart = new ApexCharts(this.chartRef.current, config)
chart.render().then(() => {
this.setState({
chart
})
})
}
const newOptions = {
chart: {
type: this.type || this.options.chart.type || 'line',
height: this.height,
width: this.width,
events: {}
},
series: this.series
}
Object.keys(this.$listeners).forEach((evt) => {
newOptions.chart.events[evt] = this.$listeners[evt];
});
const config = this.extend(this.options, newOptions);
this.chart = new ApexCharts(this.$el, config)
return this.chart.render()
},
isObject(item) {