Get Date Range from Easy Chart after zoom

I found this post from 2008 (see link below). Support provided a Window that demonstrates pulling the current zoomed range out of any easy chart. I think it was done in FactoryPMI so I can’t import the window into Ignition to test. Is there a different way to do this in Ignition or could I get a sample window to view the scripting?



Ok, I have made an Ignition backup of that window. It is a project backup so you can go into the designer and import it.

ChartZoomDemo_2013-02-22_1141.proj (21.7 KB)

For anyone looking for this, here’s the important ‘innards’ of that project export:

chart = event.source.parent.getComponent(“Easy Chart”)
jfChart= chart.getComponent(0).getComponent(0).getChart()
xAxis = jfChart.getPlot().getDomainAxis()

startDate = xAxis.getMinimumDate()
endDate = xAxis.getMaximumDate()

I found this and needed it to get the range on an easy chart while in either realtime or historical mode.
While in realtime, the End Date is set to

Very, helpful. Thanks!