FormidableLabs / victory

A collection of composable React components for building interactive data visualizations
http://commerce.nearform.com/open-source/victory/
Other
10.97k stars 526 forks source link

When using custom axis the timestamps don't get formatted #2902

Open Kalhama opened 2 hours ago

Kalhama commented 2 hours ago

Is there an existing issue for this?

Code of Conduct

Victory version

latest

Code Sandbox link

https://codesandbox.io/p/sandbox/victory-starter-forked-5yzzn2

Bug report

When using custom axes the timestamps don't get formatted. The default axes pick good tick values, and tickformat is very nice with major value changes getting more attention. However in my application I need to adjust the axes a bit (namely offsetY={50}) and thus I lose access to those nice features.

Steps to reproduce

In the sandbox there are two graphs that I except to render same thing.

Expected behavior

I think expected behavior is to render the same axis in both scenarios. Alternatively provide a functions that default exis uses for selecting and formatting ticks, so that I can pass then on.

Actual behavior

Chart using custom axes doesn't format or pick good timestamp values

Environment

- Device: Firefox
- OS: MacOS
- Node: 20
- npm: N/A
Kalhama commented 2 hours ago
Screenshot 2024-09-23 at 0 10 48