Phil Gee
Phil Gee

Reputation: 33

Oracle Apex Chart - Reset zoom level when refresh

I've got a multi series Orcale Apex line chart. When loading in data, everything looks fine and the data is shown corresponding to the timestamp from the source DB table (X-axis = timeaxis). Now, when I zoom in to a particular date and load in new data in which this very date doesn't exist, my chart shows the new data with the zoomed-in date as starting point instead of using the oldest date found in the new data. In the overview, everything works just fine. Is there a way to reset the zoom to full extend when refreshing the chart?

To illustrate the problem:

Load in data & zoom to starting date 9th of may 2020

Load in new data with starting date of 12th of april 2020 - zoom gets stuck

Upvotes: 0

Views: 1123

Answers (1)

ApodoJRR
ApodoJRR

Reputation: 26

A Little late but i got the same problem. The problem is related to the viewport because it refresh the and set the min and max values of the xAxis, but the min and max value of the viewport still set. So you need to unset the viewport to render it ok.

$("#Jobs_jet").ojChart("option","xAxis.viewportMax",null);
$("#Jobs_jet").ojChart("option","xAxis.viewportMin",null);

Upvotes: 1

Related Questions