abhinav-phi commented on issue #44149:
URL: https://github.com/apache/superset/issues/44149#issuecomment-5632734153
I dug into where this comes from: the tooltip's temporal x value renders
through the `smart_date_verbose` formatter
(`superset-frontend/packages/superset-ui-core/src/time-format/formatters/smartDateVerbose.ts`),
whose day/week tiers are `'%a %b %-e'` — that's the "Thu Mar 20" (missing
year) on this chart. Because the multi-formatter picks its tier from the date's
own granularity (a midnight timestamp hits the `day` tier), a 2014–2026 scatter
still drops the year.
Before opening a PR I'd like a steer on the intended fix, since
`smart_date_verbose` is shared ("Verbose Adaptative Formatting"): should the
day/week tiers become e.g. `'%a %b %-e %Y'` globally — simple, but it also
lengthens every surface using that preset — or should the year be range-aware
(include `%Y` when the x-domain spans multiple years) and scoped to chart
tooltips only, which needs the chart range plumbed into the tooltip formatter?
The reporter's example ("Thu Mar 20 2016") suggests the global tier change, but
I don't want to churn a widely-used formatter without a maintainer weighing in.
Happy to implement either direction with a small unit test on the formatter.
--
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]