sadpandajoe commented on code in PR #43729:
URL: https://github.com/apache/superset/pull/43729#discussion_r4021285469
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -1114,18 +1114,31 @@ export function getTemporalAxisTickConfig(
const cappedTickValues = temporalTickValues
? capTickMarks(temporalTickValues)
: undefined;
- const labelCustomValues = zoomable ? temporalTickValues : cappedTickValues;
+ // When the user picks "All" (interval === 0), they want every label shown.
+ // Disable hideOverlap so ECharts never drops a label, and pin customValues
+ // to the full tick set so each label lands on a real gridline.
+ const showAllLabels = xAxisLabelInterval === 0;
+ // On a zoomable axis the full set is already used; for "All" we also bypass
+ // the cap so every tick gets a label rather than the 60-mark subset.
+ const labelCustomValues = zoomable || showAllLabels
+ ? temporalTickValues
+ : cappedTickValues;
+
return {
axisLabel: {
// Pinned ticks label every bucket, which does crowd, so thinning
- // always wins there.
+ // wins there unless the user asked for every label.
hideOverlap:
- !!temporalTickValues ||
- (showMaxLabel
- ? false
- : !(xAxisType === AxisType.Time && xAxisLabelRotation !== 0)),
+ !showAllLabels &&
Review Comment:
This still leaves weekly `All` charts thinned before `hideOverlap` runs:
zero-rotation time axes use `createSpacedXAxisFormatter`, which returns an
empty label for close ticks, so a crowded weekly chart (and a zoomed slice of
it) continues to omit labels. Could `All` bypass the spacing filter as well,
with a many-week rendering or formatter regression test?
--
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]