import { BarChart } from './chart-def/chart-bar' ; import { CountChart } from './chart-def/chart-count' ; import { DoughnutChart } from './chart-def/chart-doughnut' ; import { LineChart } from './chart-def/chart-line' ; import { MapChart } from './chart-def/chart-map' ; import { NightingaleChart } from './chart-def/chart-nightingale' ; import { PieChart } from './chart-def/chart-pie' ; import { ScatterChart } from './chart-def/chart-scatter' ; import { SunburstChart } from './chart-def/chart-sunburst' ; import { TreeChart } from './chart-def/chart-tree' ; import { TreemapChart } from './chart-def/chart-treemap' ; import { Chart , ChartType } from './chart-types' ; export const isBarChart = ( chart ) : chart is BarChart => { return chart . type === ChartType . BAR ; } ; export const isCountChart = ( chart ) : chart is CountChart => { return chart . type === ChartType . COUNT ; } ; export const isDoughnutChart = ( chart ) : chart is DoughnutChart => { return chart . type === ChartType . DOUGHNUT ; } ; export const isLineChart = ( chart ) : chart is LineChart => { return chart . type === ChartType . LINE ; } ; export const isMapChart = ( chart ) : chart is MapChart => { return chart . type === ChartType . MAP ; } ; export const isNightingaleChart = ( chart ) : chart is NightingaleChart => { return chart . type === ChartType . NIGHTINGALE ; } ; export const isPieChart = ( chart ) : chart is PieChart => { return chart . type === ChartType . PIE ; } ; export const isScatterChart = ( chart ) : chart is ScatterChart => { return chart . type === ChartType . SCATTER ; } ; export const isSunburstChart = ( chart ) : chart is SunburstChart => { return chart . type === ChartType . SUNBURST ; } ; export const isTreeChart = ( chart ) : chart is TreeChart => { return chart . type === ChartType . TREE ; } ; export const isTreemapChart = ( chart ) : chart is TreemapChart => { return chart . type === ChartType . TREEMAP ; } ;