EnxDev commented on code in PR #43339:
URL: https://github.com/apache/superset/pull/43339#discussion_r3879591140


##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -1258,25 +1276,37 @@ export default function transformProps(
       // have less overlap, so disabling hideOverlap is safe.
       // At 0° rotation, also disable hideOverlap when showMaxLabel
       // is active so the forced boundary label is never suppressed
-      // by ECharts' overlap detection (#39899).
-      hideOverlap: showMaxLabel
-        ? false
-        : !(xAxisType === AxisType.Time && xAxisLabelRotation !== 0),
+      // by ECharts' overlap detection (#39899). Pinned ticks label
+      // every bucket, which does crowd, so thinning always wins there.
+      hideOverlap:
+        !!temporalTickValues ||
+        (showMaxLabel
+          ? false
+          : !(xAxisType === AxisType.Time && xAxisLabelRotation !== 0)),
       formatter: deduplicatedFormatter,
       rotate: xAxisLabelRotation,
       interval: xAxisLabelInterval,
       // Force the boundary labels on non-rotated time axes so the first
       // and last dates stay visible: hideOverlap can hide the last label,
       // and a min date that falls between "nice" ticks otherwise renders
       // no beginning label. Skipped when rotated to avoid phantom labels
-      // at the axis boundary.
-      ...(showMaxLabel && {
-        showMaxLabel: true,
-        alignMaxLabel: 'right',
-        showMinLabel: true,
-        alignMinLabel: 'left',
-      }),
+      // at the axis boundary. Also skipped for pinned ticks: the boundary
+      // buckets are already real ticks there, and showMaxLabel only shields
+      // its immediate neighbour — hideOverlap can still drop it against a
+      // farther label on a crowded weekly axis, reopening #39899.
+      ...(showMaxLabel &&
+        !temporalTickValues && {
+          showMaxLabel: true,
+          alignMaxLabel: 'right',
+          showMinLabel: true,
+          alignMinLabel: 'left',
+        }),
+      ...(temporalTickValues && { customValues: temporalTickValues }),
     },
+    // Gridlines, when shown, follow axisTick.customValues too.
+    ...(temporalTickValues && {
+      axisTick: { customValues: temporalTickValues },

Review Comment:
   hideOverlap only thins the rendered labels, tick marks and gridlines have no 
equivalent and were pinned to every bucket. Capped axisTick.customValues to at 
most 60 evenly-spaced marks (always including the first/last bucket) via a new 
capTickMarks() helper in series.ts, applied at both this line and 
MixedTimeseries/transformProps.ts:815. Labels are unaffected — they still get 
the full bucket set with hideOverlap thinning dynamically at render time. Fixed 
in 92085abc0d.



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