heatMapSeries.tsx 495 B

12345678910111213141516171819
  1. import 'echarts/lib/chart/heatmap';
  2. import 'echarts/lib/component/visualMap';
  3. import type {HeatmapSeriesOption} from 'echarts';
  4. import {SeriesDataUnit} from 'sentry/types/echarts';
  5. export default function HeatMapSeries(
  6. props: Omit<HeatmapSeriesOption, 'data'> & {
  7. data?: SeriesDataUnit[] | HeatmapSeriesOption['data'];
  8. } = {}
  9. ): HeatmapSeriesOption {
  10. const {data, ...rest} = props;
  11. return {
  12. data: data as HeatmapSeriesOption['data'],
  13. ...rest,
  14. type: 'heatmap',
  15. };
  16. }