24 Hour timeformat #1150
-
Hi Team, Newbie here, but I was wondering how I can change the timeformat from AM/PM to a 24hr timeformat for the Axis. I am not very familiar with d3 yet, but saw this could be achieved by using something like timeFormat("%H %M") in vanilla d3. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @JunChatani 👋 thanks for checking out In the Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hey @JunChatani 👋 thanks for checking out
visx
. I think what you're looking for here is the@visx/axis
tickFormat
prop (see the docs).In the
axis
demo, you can see that we use this to change how we format a specific tick. In your case you would use the function to format yourDate
(orstring
ornumber
depending on your raw data format for theAxis
).Hope that helps!