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


##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -469,15 +471,16 @@ export default function transformProps(
         formatter:
           seriesType === EchartsTimeseriesSeriesType.Bar
             ? getOverMaxHiddenFormatter({
-                max: yAxisMax,
-                formatter: seriesFormatter,
-              })
+              max: yAxisMax,
+              formatter: seriesFormatter,

Review Comment:
   Good catch, fixed! Query A's max bound now runs through `getAxisMax`, so 
it's tied to whatever axis the series actually renders on.



##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -543,15 +546,16 @@ export default function transformProps(
         formatter:
           seriesTypeB === EchartsTimeseriesSeriesType.Bar
             ? getOverMaxHiddenFormatter({
-                max: maxSecondary,
-                formatter: seriesFormatter,
-              })
+              max: maxSecondary,
+              formatter: seriesFormatter,

Review Comment:
   Same fix covers Query B too, `getAxisMax` handles both now.



##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts:
##########
@@ -158,11 +158,11 @@ export function transformNegativeLabelsPosition(
 
     return axisValue < 0
       ? {
-          value,
-          label: {
-            position: 'outside',
-          },
-        }
+        value,
+        label: {
+          position: 'outside',
+        },
+      }
       : value;

Review Comment:
   Good catch, fixed! Negative bars respect the configured `labelPosition` now 
instead of always forcing `outside`.



##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts:
##########
@@ -401,16 +403,23 @@ export function transformSeries(
     areaStyle:
       area || forecastSeries.type === ForecastSeriesEnum.ForecastUpper
         ? {
-            opacity: opacity * areaOpacity,
-          }
+          opacity: opacity * areaOpacity,
+        }
         : undefined,
     emphasis,
     showSymbol,
     symbol,
     symbolSize: markerSize,
     label: {
       show: !!showValue,
-      position: isHorizontal ? 'right' : 'top',
+      position: (
+        labelPosition === 'auto' || !labelPosition
+          ? isHorizontal
+            ? 'inside'
+            : 'top'
+          : labelPosition
+      ) as 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'insideTop' | 
'insideBottom' | 'insideLeft' | 'insideRight',

Review Comment:
   Good catch, fixed! Auto plus horizontal falls back to `right` again, 
matching what it did before this PR.



##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -596,7 +600,7 @@ export default function transformProps(
     convertInteger(xAxisTitleMargin),
   );
 
-  const { setDataMask = () => {}, onContextMenu } = hooks;
+  const { setDataMask = () => { }, onContextMenu } = hooks;

Review Comment:
   Fixed, matches prettier now.



-- 
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