Hi Apex forum,
I'm currently using Apex 23.2.0 and would kindly ask for your assistance with setting up a zoom and scroll function to look backwards from todays date. This is current code using a full year's view.
<oj-chart
class = "cardChart"
type='bar'
x-axis.size = "35%"
x-axis.color= "#000000"
color="#000000"
legend.position='top'
series='[{"name": "Generic axis label 1", "color":"#84bd00","items": &FF_ARRAY.},
{"name": "Generic axis label 2", "color":"#c2c4c6", "items": &DD_ARRAY.}]'
groups='&DATE_ARRAY.'
zoom-and-scroll="live"
overview.rendered="on"
zoom-direction: 'x'
x-axis.viewport-start-group="[[new Date(2024,1,1).toISOString()]]"
x-axis.viewport-end-group="[[new Date(2024,12,31).toISOString()]]"
>
</oj-chart>
What I would like to do is show the zoom and scroll default to show a 14 day window from todays date so that it always shows the most recent 2 weeks of the chart on page load. What would be the correct date format for the x-axis.viewport start and end groups?
Much appreciated.