mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: Typing of labelMap (#21181)
* fix: Typing of labelMap * Adjusts val types
This commit is contained in:
committed by
GitHub
parent
5811262cf2
commit
1143e17742
@@ -23,7 +23,6 @@ import {
|
||||
DataRecord,
|
||||
getNumberFormatter,
|
||||
getMetricLabel,
|
||||
DataRecordValue,
|
||||
getColumnLabel,
|
||||
} from '@superset-ui/core';
|
||||
import { EChartsCoreOption, GaugeSeriesOption } from 'echarts';
|
||||
@@ -132,7 +131,7 @@ export default function transformProps(
|
||||
FONT_SIZE_MULTIPLIERS.titleOffsetFromTitle * fontSize;
|
||||
const detailOffsetFromTitle =
|
||||
FONT_SIZE_MULTIPLIERS.detailOffsetFromTitle * fontSize;
|
||||
const columnsLabelMap = new Map<string, DataRecordValue[]>();
|
||||
const columnsLabelMap = new Map<string, string[]>();
|
||||
|
||||
const transformedData: GaugeDataItemOption[] = data.map(
|
||||
(data_point, index) => {
|
||||
@@ -141,7 +140,7 @@ export default function transformProps(
|
||||
.join(', ');
|
||||
columnsLabelMap.set(
|
||||
name,
|
||||
groupbyLabels.map(col => data_point[col]),
|
||||
groupbyLabels.map(col => data_point[col] as string),
|
||||
);
|
||||
let item: GaugeDataItemOption = {
|
||||
value: data_point[getMetricLabel(metric as QueryFormMetric)] as number,
|
||||
|
||||
Reference in New Issue
Block a user