mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
20 lines
500 B
TypeScript
20 lines
500 B
TypeScript
import 'echarts/lib/chart/heatmap';
|
|
import 'echarts/lib/component/visualMap';
|
|
|
|
import type {HeatmapSeriesOption} from 'echarts';
|
|
|
|
import type {SeriesDataUnit} from 'sentry/types/echarts';
|
|
|
|
export default function HeatMapSeries(
|
|
props: Omit<HeatmapSeriesOption, 'data'> & {
|
|
data?: SeriesDataUnit[] | HeatmapSeriesOption['data'];
|
|
} = {}
|
|
): HeatmapSeriesOption {
|
|
const {data, ...rest} = props;
|
|
return {
|
|
data: data as HeatmapSeriesOption['data'],
|
|
...rest,
|
|
type: 'heatmap',
|
|
};
|
|
}
|