rusackas commented on code in PR #34794:
URL: https://github.com/apache/superset/pull/34794#discussion_r3607932460


##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -425,8 +433,17 @@ export default function transformProps(
 
   const array = ensureIsArray(chartProps.rawFormData?.time_compare);
   const inverted = invert(verboseMap);
+  let patternIncrement = 0;
 
   rawSeriesA.forEach(entry => {
+    const derivedSeries = isDerivedSeries(entry, chartProps.rawFormData);

Review Comment:
   Good catch, passing the resolved series name into `isDerivedSeries` now so 
exact offset-only names get picked up, same as the regular Timeseries transform.



##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -425,8 +433,17 @@ export default function transformProps(
 
   const array = ensureIsArray(chartProps.rawFormData?.time_compare);
   const inverted = invert(verboseMap);
+  let patternIncrement = 0;
 
   rawSeriesA.forEach(entry => {
+    const derivedSeries = isDerivedSeries(entry, chartProps.rawFormData);
+    const lineStyle: LineStyleOption = {};
+    if (derivedSeries) {
+      patternIncrement += 1;
+      // use a combination of dash and dot for the line style
+      lineStyle.type = [(patternIncrement % 5) + 1, (patternIncrement % 3) + 
1];
+      lineStyle.opacity = OpacityEnum.DerivedSeries;

Review Comment:
   Good catch, gated the dash pattern on `timeShiftColor` now to match the 
regular Timeseries chart, and added a test for it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to