v4 version ticks collback return timestamp, v3 returned time in string #11062
-
I am using time on x axis, can get label value instead of timestamp. v3 example: https://codesandbox.io/s/upbeat-rui-2pehqp?file=/index.html
v4 example: https://codesandbox.io/s/dreamy-haslett-eimqm0?file=/index.html
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@Aaqu the solution is working even if you are forced to "re-apply" the configuration you have on the time config node. To avoid that, you could try: callback(value) {
return this.getLabelForValue(value).split(' '); // <--- this is the scale instance.
} In this way you could also change your time adapter (maybe using moment or date-fns) and it works without changing the code. |
Beta Was this translation helpful? Give feedback.
@Aaqu the solution is working even if you are forced to "re-apply" the configuration you have on the time config node.
To avoid that, you could try:
In this way you could also change your time adapter (maybe using moment or date-fns) and it works without changing the code.