Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import FusionCharts from 'fusioncharts';
import Charts from 'fusioncharts/fusioncharts.charts';
import FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion';
import ReactFC from '../lib/ReactFC';
import PropTypes from 'prop-types';
Charts(FusionCharts);
FusionTheme(FusionCharts);
class DrillDown extends React.Component {
constructor(props) {
super(props);
this.state = {
showOverlaybtn: true,
// Absolute position of Overlay Button
positionH: (this.props.defaultOverlayBtnSettings && this.props.defaultOverlayBtnSettings.placement && this.props.defaultOverlayBtnSettings.placement.includes('-')) ? this.props.defaultOverlayBtnSettings.placement.split('-')[1] : 'right',
positionV: (this.props.defaultOverlayBtnSettings && this.props.defaultOverlayBtnSettings.placement && this.props.defaultOverlayBtnSettings.placement.includes('-')) ? this.props.defaultOverlayBtnSettings.placement.split('-')[0] : 'top',
selectedChild: 0,
showDrillDown: false,
// Parent Chart's Data Source
dataSource: this.props.dataSource,
// An array of indices which maps each
// data plot of parent with its nested Chart Component.