mirror of
https://github.com/apache/superset.git
synced 2026-05-29 20:29:34 +00:00
feat(explore): Add time shift color control to ECharts (#29897)
This commit is contained in:
@@ -93,6 +93,7 @@ import {
|
||||
transformTimeseriesAnnotation,
|
||||
} from './transformers';
|
||||
import {
|
||||
OpacityEnum,
|
||||
StackControlsValue,
|
||||
TIMEGRAIN_TO_TIMESTAMP,
|
||||
TIMESERIES_CONSTANTS,
|
||||
@@ -165,6 +166,7 @@ export default function transformProps(
|
||||
sortSeriesAscending,
|
||||
timeGrainSqla,
|
||||
timeCompare,
|
||||
timeShiftColor,
|
||||
stack,
|
||||
tooltipTimeFormat,
|
||||
tooltipSortByMetric,
|
||||
@@ -275,7 +277,7 @@ export default function transformProps(
|
||||
const array = ensureIsArray(chartProps.rawFormData?.time_compare);
|
||||
const inverted = invert(verboseMap);
|
||||
|
||||
const offsetLineWidths = {};
|
||||
const offsetLineWidths: { [key: string]: number } = {};
|
||||
|
||||
rawSeries.forEach(entry => {
|
||||
const derivedSeries = isDerivedSeries(entry, chartProps.rawFormData);
|
||||
@@ -290,6 +292,7 @@ export default function transformProps(
|
||||
}
|
||||
lineStyle.type = 'dashed';
|
||||
lineStyle.width = offsetLineWidths[offset];
|
||||
lineStyle.opacity = OpacityEnum.DerivedSeries;
|
||||
}
|
||||
|
||||
const entryName = String(entry.name || '');
|
||||
@@ -328,6 +331,7 @@ export default function transformProps(
|
||||
isHorizontal,
|
||||
lineStyle,
|
||||
timeCompare: array,
|
||||
timeShiftColor,
|
||||
},
|
||||
);
|
||||
if (transformedSeries) {
|
||||
|
||||
Reference in New Issue
Block a user