Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

OJ chart date formats for zoom-and-scroll

effdeeemMar 18 2025

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.

Comments

Post Details

Added on Mar 18 2025
3 comments
54 views