-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
found the solution in the documentation for version 4.3.2: https://antv-g6.gitee.io/en/docs/api/Plugins#tickcfg: and with the code example for SliceTimebar in documentation for version 4.8.7: using tickLabelFormatter key, I was able to set the timeBar time axis data labels- this indeed offers a lot of flexibility. Hope this will be helpful for others too! |
Beta Was this translation helpful? Give feedback.
found the solution in the documentation for version 4.3.2:
https://antv-g6.gitee.io/en/docs/api/Plugins:
https://antv-g6.gitee.io/en/docs/api/Plugins#tickcfg:
and with the code example for SliceTimebar in documentation for version 4.8.7:
https://g6.antv.antgroup.com/en/examples/tool/timebar/#slice-timebar
tick: { tickLabelFormatter: (d) => { count++; const dateStr =
${d.date}; if ((count - 1) % 10 === 0) { return
${dateStr.substr(0, 4)}-${dateStr.substr(4, 2)}-${dateStr.substr(6, 2)}; } return false; }, },
using tickLabelFormatter key, I was able to set the timeBar time axis data labels- this indeed offers a lot of flexibility.
Hope this will be helpful for others too!