Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Investigating d3-axis code to fix date format issue. #200

Closed
AshishMotanamGurunadham opened this issue Aug 2, 2021 · 1 comment
Closed
Assignees
Labels
Size: 3 Story Up Next - KC Issues that are ready to pull into an iteration for the KC team
Milestone

Comments

@AshishMotanamGurunadham
Copy link
Contributor

Story

Description

As a developer, I would like to extend my investigation on the date format issue to go through the d3-axis code.

Motivation

So that we can suggest changes to the d3 team to fix the date format issue in terra-graphs

Definition of Done

We'll know we're done when we come up with suggested changes to fix the date format issue.

@AshishMotanamGurunadham AshishMotanamGurunadham changed the title Investigation d3-axis code to fix date format issue. Investigating d3-axis code to fix date format issue. Aug 2, 2021
@ryanthemanuel ryanthemanuel added Size: 5 Up Next - KC Issues that are ready to pull into an iteration for the KC team labels Aug 3, 2021
@ryanthemanuel ryanthemanuel added this to the Backlog milestone Aug 3, 2021
@AshishMotanamGurunadham
Copy link
Contributor Author

Based on the investigation I have done, when null is passed as tickFormat, d3 determines the format based on tick values consumer provides using this code. Since [this logic] renders (https://github.com/d3/d3-scale/blob/main/src/time.js#L20-L37) irrespective of locale, we are seeing the same format in Carbon for every locale we use, which leads to date format internationalization issue.

To fix this issue, d3 format selection needs to be locale-specific, but the d3 team is not ready to do these changes(which you can see in this comment). So this will leave us with building our own logic based on axis limits provided by consumers to fix the date format issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Size: 3 Story Up Next - KC Issues that are ready to pull into an iteration for the KC team
Projects
None yet
Development

No branches or pull requests

2 participants