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

Add option for 24-hour clock countries #436

Closed
Dragony opened this issue May 22, 2015 · 4 comments
Closed

Add option for 24-hour clock countries #436

Dragony opened this issue May 22, 2015 · 4 comments
Assignees
Milestone

Comments

@Dragony
Copy link

Dragony commented May 22, 2015

Hi!

I'm from Europe and we use the 24 hours system. Sadly the lib doesn't display the time on the X axis correctly when in a zone with the 24 hour system.

Screenshot from the example page:
time

Greetings

@almossawi
Copy link
Contributor

Hi there, Keep in mind that the labels along the x-axis show minutes and seconds, whereas the hour appears below the first tick.

Due to this line, the hour is formatted using a 12-hour clock and appended with either AM and PM. To change that, use an alternative directive, e.g. for a 24-hour clock:

d3.time.format('%H');

You'll find the corresponding line under js/common/x_axis.js

@hamilton Is this something we'd want to provide an option for?

@hamilton hamilton self-assigned this May 26, 2015
@hamilton
Copy link
Collaborator

@almossawi I think it makes sense to provide an option. What should we call it?

@Dragony
Copy link
Author

Dragony commented May 26, 2015

Hey there, sorry guys. It seems logical now that i've slept over it :) Thanks for the effort! An option sounds awesome too!

@hamilton hamilton changed the title Wrong timed displayed when using 24 hours (instead of AM/PM) Add option for 24-hour clock countries May 28, 2015
@matteocontrini
Copy link

Up

@almossawi almossawi added this to the v2.7 milestone Jul 27, 2015
hamilton added a commit that referenced this issue Oct 13, 2015
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

4 participants