mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(DrillBy): make drill by work with multi metric charts (#34171)
This commit is contained in:
committed by
GitHub
parent
67b21c45df
commit
31a15c5162
@@ -209,12 +209,18 @@ export default function EchartsTimeseries({
|
||||
}),
|
||||
);
|
||||
groupBy.forEach((dimension, i) => {
|
||||
const val = labelMap[seriesName][i];
|
||||
const dimensionValues = labelMap[seriesName] ?? [];
|
||||
|
||||
// Skip the metric values at the beginning and get the actual dimension value
|
||||
// If we have multiple metrics, they come first, then the dimension values
|
||||
const metricsCount = dimensionValues.length - groupBy.length;
|
||||
const val = dimensionValues[metricsCount + i];
|
||||
|
||||
drillByFilters.push({
|
||||
col: dimension,
|
||||
op: '==',
|
||||
val,
|
||||
formattedVal: formatSeriesName(values[i], {
|
||||
formattedVal: formatSeriesName(val, {
|
||||
timeFormatter: getTimeFormatter(formData.dateFormat),
|
||||
numberFormatter: getNumberFormatter(formData.numberFormat),
|
||||
coltype: coltypeMapping?.[getColumnLabel(dimension)],
|
||||
|
||||
Reference in New Issue
Block a user