import './components/visualMap'; import {forwardRef} from 'react'; import type {HeatmapSeriesOption, VisualMapComponentOption} from 'echarts'; import {ReactEchartsRef, Series} from 'sentry/types/echarts'; import HeatMapSeries from './series/heatMapSeries'; import BaseChart from './baseChart'; type ChartProps = Omit, 'css'>; export type HeatmapSeries = Series & Omit & { dataArray?: HeatmapSeriesOption['data']; }; type Props = Omit & { series: HeatmapSeries[]; visualMaps: VisualMapComponentOption[]; seriesOptions?: HeatmapSeriesOption; }; export default forwardRef((props, ref) => { const {series, seriesOptions, visualMaps, ...otherProps} = props; return ( HeatMapSeries({ ...seriesOptions, ...options, name: seriesName, data: dataArray || data.map(({value, name}) => [name, value]), }) )} /> ); });