Replies: 1 comment
-
I am interested in similar behavior. In addition to wanting to change timestamp formatting, I want to be able to show in an external compose view what the current time range is for the currently visible data in the chart. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
My charts (v2.0.0-beta.1) are based on a timeline which may span multiple years. I am collecting millisecond timestamps which are mapped to a precision of one minute along your proposal here: https://patrykandpatrick.com/vico/wiki/cartesian-charts/value-formatting/
That works.
Now, depending on the time span of the data at hand I decide if the horizontal labels are formatted as "yyyy MMM" or "MMM dd", this works as well.
But what I really want is for this to be dynamic, based on what's on the screen. One might start with showing a year of data where "MMM dd" fits well, and as you zoom in, maybe into one particular week, I'd like to change to e.g. "dd HH:mm", down to the maximum resolution of 1 minute and "HH:mm"
What I think I need for this would be the first and last item which is shown on screen. Is there any way to retrieve these values inside a CartesianValueFormatter? Or maybe there is a better way to achieve this?
Vico version(s)
v2.0.0-beta.1
UI framework(s)
Jetpack Compose
Beta Was this translation helpful? Give feedback.
All reactions