Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date/Time Values Format has no effect on Chart X Axis #3215

Closed
kalsolio opened this issue Dec 26, 2018 · 14 comments
Closed

Date/Time Values Format has no effect on Chart X Axis #3215

kalsolio opened this issue Dec 26, 2018 · 14 comments

Comments

@kalsolio
Copy link

222
111

@deecay
Copy link
Contributor

deecay commented Dec 28, 2018

Hi @kalsolio

Date/Time setting is for 'data labels' only, and has no effect on 'x-axis labels'.

@arikfr
Copy link
Member

arikfr commented Jan 10, 2019

Maybe we should add a comment mentioning this in the UI?

@timc13
Copy link

timc13 commented Feb 6, 2019

Perhaps a separate issue, but why can't we format the for x-axis ? (Category or DateTime)

@kravets-levko
Copy link
Collaborator

Hi @timc13! It's a technical issue that we currently don't have solution for. We use Plotly.js to render charts, and it's formatting syntax is really weird (probably ok for developer, but definitely not for a regular users). Once we'll find a good way to convert "human-friendly" format (that we use) to ugly one used by Plotly.js - we'll fix this issue.

@seanmehra
Copy link

I second this request!

@kimwz
Copy link

kimwz commented Sep 4, 2020

please 👍

@gaecoli
Copy link
Member

gaecoli commented Oct 13, 2020

Hi @kravets-levko @arikfr , i found an idea to fix this bug. plotly codepen about axis tickformat In layout set tickformat: %Y %m %d, it will change x or y axis format. Like this:
image

Currently I cannot integrate this modification into redash, but it seems to be effective.

@kravets-levko
Copy link
Collaborator

Hi @yankeeguyu! Yep, we know about this, but please read this comment #3215 (comment) . D3-like syntax (%Y %m %d) is not very user-friendly, also, we don't want to introduce second formatting engine (currently we use Moment.js which syntax is more human-oriented: YYYY MM DD). Current idea is to somehow convert Moment syntax to D3, but we're still investigating this.

@gaecoli
Copy link
Member

gaecoli commented Oct 13, 2020

Hi @kravets-levko , thank you reply! Perhaps this problem can be modified as an option, such as scale, we can use Moment.js as an option, but the actual value is a d3 type value, maybe this is a feasible solution. Like this:
image

@gaecoli
Copy link
Member

gaecoli commented Oct 13, 2020

Now i want to use this solution, but i encountered some problems during development.

@kravets-levko
Copy link
Collaborator

Value format inputs are not dropdown, it's a text inputs so user may type any valid format string. If we even imagine that we could somehow start using D3 format by default but allowing user to type Moment format string - then we still have to convert between Moment and D3 formats, but in addition we'll have to migrate already created visualizations.

@gaecoli
Copy link
Member

gaecoli commented Oct 13, 2020

Value format inputs are not dropdown, it's a text inputs so user may type any valid format string. If we even imagine that we could somehow start using D3 format by default but allowing user to type Moment format string - then we still have to convert between Moment and D3 formats, but in addition we'll have to migrate already created visualizations.

Ok, i see it! Look forward to fixing this bug! Thank you @kravets-levko !

@litao3rd
Copy link

Hello everyone. Is there any progress on this issue? I meet the same question in version 10.1.0.b50633. Thanks for any reply.

@eradman
Copy link
Collaborator

eradman commented Aug 16, 2023

The ability to specify a format for X and Y axis was added in commit 0f88a23

@eradman eradman closed this as completed Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants