import React, { Component } from 'react' import { IWidgetProps } from '../Widget' import Table from './Table' import Scorecard from './Scorecard' import Iframe from './Iframe' import RichText from './RichText' import Chart from './Chart' import ChartTypes from '../../config/chart/ChartTypes' export interface IChartProps extends IWidgetProps { width: number height: number } export class CombinedChart extends Component { public shouldComponentUpdate (nextProps: IChartProps) { return nextProps.renderType !== 'loading' } public render () { const { selectedChart } = this.props switch (selectedChart) { case ChartTypes.Table: return ( ) case ChartTypes.Scorecard: return ( ) case ChartTypes.Iframe: return (