Skip to content

Axis Label Sorting and Aggregation #37485

@madankgit

Description

@madankgit

Bug description

When using a date column (date_value) with Time Grain set to Day and applying time format %a (weekday abbreviation), the X-axis displays repeating weekday labels (Mon–Sun) instead of a single ordered weekday sequence.

Each individual date is correctly treated as a unique data point; however, the formatted axis labels repeat because %a controls display formatting only and does not group or aggregate dates by weekday.

Steps to Reproduce

  1. Use a dataset containing a date column (date_value) with data spanning multiple weeks

  2. Create a time-series chart

  3. Configure:

    • Time column: date_value
    • Time Grain: Day
    • X-axis time format: %a
  4. Observe the X-axis labels

Image




Expected Behavior

  • X-axis should display one ordered set of weekday labels (Mon–Sun) when %a is used
    OR
  • Superset should provide an option to group by weekday when formatting by weekday name
Image




Actual Behavior

  • Weekday labels (Mon–Sun) are repeated for each week present in the dataset
  • Results in duplicate and confusing X-axis labels
Image




Impact

  • Weekday-based analysis becomes unclear

  • Clean visualization of weekly patterns is not possible

  • Requires dataset-level workarounds using calculated columns

  • Current-week or specific-week analysis is only possible via custom logic


Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions