Skip to content

Include earliest year in time axis with year granularity for Line charts #584

Open
@c-lamoureux

Description

@c-lamoureux

Provide a general summary of the feature here

'year' granularity is supported for Axis but on linear scales the earliest year in the data is not added as an axis tick. The date value isn't right at the beginning of the year. Even if the earliest date value is the first day of the year, the first year won't have a tick value. This is most apparent on Line charts.

🤔 Expected Behavior?

The earliest and latest year the data should be reflected in time axes with year granularity so user's have better visual context for the date range reflected in the visualization.

💁 Possible Solution

Adding a data transform for the datetime dimension that applies a floor to the date value, then using that in the axis scale should work. A challenge with this approach is that we don't have access to the dimension name in the axisSpecBuilder, and we want to minimize cohesion.

🔦 Context

If there isn't a first tick on the axis for the lowest visible year, it's confusing to interpret the date range on the visualization at a glance.

💻 Examples

Image

🧢 Your Company/Team

Adobe

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions