You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Last date label hidden on Time Series X-axis #39899
In Charts, when the X-axis is set to a Time format, the last date label often fails to display.
This is particularly important for daily or hourly monitoring dashboards where the user needs to confirm the exact "latest" time reflected on the chart at a glance.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
I don't know
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist
I have searched Superset docs and Slack and didn't find a solution to my problem.
I have searched the GitHub issue tracker and didn't find a similar bug report.
I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
This is a known and actively-discussed issue. You actually raised this same topic in Discussion #39361, where it was explored in detail [1].
Root cause: ECharts' hideOverlap: true setting aggressively suppresses the last label when it detects potential overlap at the axis boundary. Despite several fixes merged in early 2026 (PR #37755, PR #38733, PR #38979), there's a discrepancy between those PRs and the current codebase — showMaxLabel does not appear to be set in the current transformProps.ts[2]. The showMaxLabel approach has a troubled history: it was added, reverted (PR #24995) due to "phantom labels," and subsequent fixes evolved away from it.
Current state: There is no deterministic user-facing configuration that guarantees the last time label is always shown [1]. The available workarounds are:
Theme-level override (Superset 6.0+) — use echartsOptionsOverridesByChartType to inject showMaxLabel: true globally if you control the deployment
Cast date column to STRING at the dataset level and set "X Axis Label Interval → All" to bypass time-scale overlap logic entirely
For your monitoring dashboard use case where the latest timestamp must always be visible, a feature request for an exposed showMaxLabel toggle or a dedicated "Always show last label" control would be well-motivated. The infrastructure partially exists — extending the ECharts Options JS editor (currently available for Evolution chart types) to Time-Series charts would also address this.
That !!resolvedTimeGrain is deliberate. #37181 added showMaxLabel so the last data point's label renders; #39972 then restricted it to grained axes, because with Time Grain = None ECharts' axis end is not aligned to anything sensible, the forced label lands on a sub-minute timestamp, and SMART_DATE renders it through its millisecond/second buckets — producing a phantom .345ms label after the last legitimate one. There is a test pinning exactly that (x-axis does not force showMaxLabel when no time grain is set).
So simply dropping the grain condition trades this bug for that one.
Which case is in your screenshot? If a time grain is set, showMaxLabel is already true and the missing label is a different mechanism — worth checking the dedup wrapper (it suppresses a trailing label that formats identically to the previous tick) or plain label overflow/interval. If Time Grain is None, then the label is being suppressed on purpose by #39972 and the fix has to make the axis edge meaningful rather than force a label onto an arbitrary one — e.g. clamping the axis max to the last data point, or formatting the boundary label at the resolved data granularity instead of letting SMART_DATE fall into its sub-second buckets.
Happy to implement the second approach if maintainers agree that's the right direction; I did not want to send a PR that silently reverts a merged fix.
Activity
dosubot commentedon May 6, 2026
This is a known and actively-discussed issue. You actually raised this same topic in Discussion #39361, where it was explored in detail [1].
Root cause: ECharts'
hideOverlap: truesetting aggressively suppresses the last label when it detects potential overlap at the axis boundary. Despite several fixes merged in early 2026 (PR #37755, PR #38733, PR #38979), there's a discrepancy between those PRs and the current codebase —showMaxLabeldoes not appear to be set in the currenttransformProps.ts[2]. TheshowMaxLabelapproach has a troubled history: it was added, reverted (PR #24995) due to "phantom labels," and subsequent fixes evolved away from it.Current state: There is no deterministic user-facing configuration that guarantees the last time label is always shown [1]. The available workarounds are:
hideOverlap: falsein newer buildsechartsOptionsOverridesByChartTypeto injectshowMaxLabel: trueglobally if you control the deploymentFor your monitoring dashboard use case where the latest timestamp must always be visible, a feature request for an exposed
showMaxLabeltoggle or a dedicated "Always show last label" control would be well-motivated. The infrastructure partially exists — extending the ECharts Options JS editor (currently available for Evolution chart types) to Time-Series charts would also address this.To reply, just mention @dosu.
Docs are dead. Just use Dosu.
Cloud-Architect-Emma commentedon May 6, 2026
Hi @aijung0331 , thanks for raising the issue, i'd like to help fix this issue . Can you assign it to me ?
fix: disable hideOverlap when showMaxLabel is active on time axes (ap…
test(mixed-timeseries): add x-axis label overlap test for apache#39899
fix: disable hideOverlap when showMaxLabel is active on time axes (ap…
test(mixed-timeseries): add x-axis label overlap test for apache#39899
fix: set timeGrainSqla in the apache#39899 MixedTimeseries regression…
bikash-barnwal commentedon Aug 14, 2026
Worth flagging before someone fixes this the obvious way: the obvious fix reopens #39972.
The x-axis currently forces the trailing label only when a time grain is set (
Timeseries/transformProps.ts, mirrored inMixedTimeseries):That
!!resolvedTimeGrainis deliberate. #37181 addedshowMaxLabelso the last data point's label renders; #39972 then restricted it to grained axes, because with Time Grain = None ECharts' axis end is not aligned to anything sensible, the forced label lands on a sub-minute timestamp, andSMART_DATErenders it through its millisecond/second buckets — producing a phantom.345mslabel after the last legitimate one. There is a test pinning exactly that (x-axis does not force showMaxLabel when no time grain is set).So simply dropping the grain condition trades this bug for that one.
Which case is in your screenshot? If a time grain is set,
showMaxLabelis alreadytrueand the missing label is a different mechanism — worth checking the dedup wrapper (it suppresses a trailing label that formats identically to the previous tick) or plain label overflow/interval. If Time Grain is None, then the label is being suppressed on purpose by #39972 and the fix has to make the axis edge meaningful rather than force a label onto an arbitrary one — e.g. clamping the axis max to the last data point, or formatting the boundary label at the resolved data granularity instead of lettingSMART_DATEfall into its sub-second buckets.Happy to implement the second approach if maintainers agree that's the right direction; I did not want to send a PR that silently reverts a merged fix.
fix: last date label hidden on time series x-axis (#39899) (#42299)
fix(echarts): align pinned axis labels with capped ticks, extract sha…
fix(echarts): thin overlapping x-axis time labels on timeseries charts