How to get the X and Y axis value during in Zoom/Pan mode of Easy Chart

How to get the X and Y axis value/range during in Zoom/Pan mode of Easy Chart.
When we zoomed into a rectangle using mouse, how do we get the X axis (date-time) range and Y axis (value) range of that rectangle so that I can save that X/Y axis range and enter into that rectangle range easily? thanks in advance.

The date range can be obtained this way:

print event.source.getZoomedStartDate()
print event.source.getZoomedEndDate()

Thanks man for your helps. This will only get the date range(X-axis), however, would you tell me how can I get the value range (Y-axis)?

I'm not sure. What I can tell you is that I checked every method listed in the PMIEasyChart documentation, and so far, I have been unable to find it:
Just in case it could help you in some way, here is my cheat sheet for experimenting with the Easy Chart methods:

Code List
print 'getAppContext : '+str(event.source.getAppContext())
print 'getAutoColorList : '+str(event.source.getAutoColorList())
print 'getAxes : '+str(event.source.getAxes())
print 'getAxisLabelFont : '+str(event.source.getAxisLabelFont())
print 'getAxisTickLabelFont : '+str(event.source.getAxisTickLabelFont())
print 'getBarMargin : '+str(event.source.getBarMargin())
print 'getBoxFill : '+str(event.source.getBoxFill())
print 'getCalcPens : '+str(event.source.getCalcPens())
print 'getChartBorder : '+str(event.source.getChartBorder())
print 'getChartMode : '+str(event.source.getChartMode())
print 'getCursorCode : '+str(event.source.getCursorCode())
print 'getDatapoints : '+str(event.source.getDatapoints())
print 'getDataQuality: '+str(event.source.getDataQuality())
print 'getDateRange : '+str(event.source.getDateRange())
print 'getDateRangeBorder : '+str(event.source.getDateRangeBorder())
print 'getDateRangeLocation : '+str(event.source.getDateRangeLocation())
print 'getDateStyle : '+str(event.source.getDateStyle())
print 'getDigitalGap : '+str(event.source.getDigitalGap())
print 'getEditorBackgroundColor : '+str(event.source.getEditorBackgroundColor())
print 'getEditorForegroundColor : '+str(event.source.getEditorForegroundColor())
print 'getEffectivePollRate: '+str(event.source.getEffectivePollRate())
print 'getEmptyGroupName : '+str(event.source.getEmptyGroupName())
print 'getEndDate : '+str(event.source.getEndDate())
print 'getExtensionFunctions : '+str(event.source.getExtensionFunctions())
print 'getGapThreshold : '+str(event.source.getGapThreshold())
print 'getGlobalWhereClause : '+str(event.source.getGlobalWhereClause())
print 'getGridlineColor : '+str(event.source.getGridlineColor())
print 'getGridlineDashPattern : '+str(event.source.getGridlineDashPattern())
print 'getGridlineWidth : '+str(event.source.getGridlineWidth())
print 'getGroupWheres : '+str(event.source.getGroupWheres())
print 'gethGap : '+str(event.source.gethGap())
print 'getHGap : '+str(event.source.getHGap())
print 'getHighDensityColor : '+str(event.source.getHighDensityColor())
print 'getHistogramEndDate : '+str(event.source.getHistogramEndDate())
print 'getHistogramStartDate : '+str(event.source.getHistogramStartDate())
print 'getHorizontalResolution: '+str(event.source.getHorizontalResolution())
print 'getLegend : '+str(event.source.getLegend())
print 'getMaxSelectionSize : '+str(event.source.getMaxSelectionSize())
print 'getOuterRangeEnd : '+str(event.source.getOuterRangeEnd())
print 'getOuterRangeStart : '+str(event.source.getOuterRangeStart())
print 'getPenBorder : '+str(event.source.getPenBorder())
print 'getPenControlMode : '+str(event.source.getPenControlMode())
print 'getPens : '+str(event.source.getPens())
print 'getPlotBackground : '+str(event.source.getPlotBackground())
print 'getPlotOrientation : '+str(event.source.getPlotOrientation())
print 'getPlotOutlineColor : '+str(event.source.getPlotOutlineColor())
print 'getPollRate : '+str(event.source.getPollRate())
print 'getProperties : '+str(event.source.getProperties())
print 'getPropertiesLoading : '+str(event.source.getPropertiesLoading())
print 'getRtDateRange : '+str(event.source.getRtDateRange())
print 'getRtLabel : '+str(event.source.getRtLabel())
print 'getSelectedXValue : '+str(event.source.getSelectedXValue())
print 'getSelectionHighlight : '+str(event.source.getSelectionHighlight())
print 'getStartDate : '+str(event.source.getStartDate())
print 'getStartupRange : '+str(event.source.getStartupRange())
print 'getStartupSelection : '+str(event.source.getStartupSelection())
print 'getSubplotGap : '+str(event.source.getSubplotGap())
print 'getSubplots : '+str(event.source.getSubplots())
print 'getTagHistoryAllowInterpolation : '+str(event.source.getTagHistoryAllowInterpolation())
print 'getTagHistoryBypassCache : '+str(event.source.getTagHistoryBypassCache())
print 'getTagHistoryIgnoreBadData : '+str(event.source.getTagHistoryIgnoreBadData())
print 'getTagHistoryResolution : '+str(event.source.getTagHistoryResolution())
print 'getTagHistoryResolutionMode : '+str(event.source.getTagHistoryResolutionMode())
print 'getTagHistoryValidateScanclass : '+str(event.source.getTagHistoryValidateScanclass())
print 'getTagPens : '+str(event.source.getTagPens())
print 'getTickDensity : '+str(event.source.getTickDensity())
print 'getTimeStyle : '+str(event.source.getTimeStyle())
print 'getTitle : '+str(event.source.getTitle())
print 'getTitleFont : '+str(event.source.getTitleFont())
print 'getTodayIndicatorColor : '+str(event.source.getTodayIndicatorColor())
print 'getToolTipText : '+str(event.source.getToolTipText())
print 'getTrackMargin : '+str(event.source.getTrackMargin())
print 'getUnit : '+str(event.source.getUnit())
print 'getUnitCount : '+str(event.source.getUnitCount())
print 'getUtilityButtonSize : '+str(event.source.getUtilityButtonSize())
print 'getvGap : '+str(event.source.getvGap())
print 'getVGap : '+str(event.source.getVGap())
print 'getxAxisLabel : '+str(event.source.getxAxisLabel())
print 'getXAxisLabel : '+str(event.source.getXAxisLabel())
print 'getxAxisMargin : '+str(event.source.getxAxisMargin())
print 'getXAxisMargin : '+str(event.source.getXAxisMargin())
print 'getxOffset3D : '+str(event.source.getxOffset3D())
print 'getXOffset3D : '+str(event.source.getXOffset3D())
print 'getxTraceLargeNumberFormat : '+str(event.source.getxTraceLargeNumberFormat())
print 'getXTraceLargeNumberFormat : '+str(event.source.getXTraceLargeNumberFormat())
print 'getxTraceNumberFormatThreshold : '+str(event.source.getxTraceNumberFormatThreshold())
print 'getXTraceNumberFormatThreshold : '+str(event.source.getXTraceNumberFormatThreshold())
print 'getxTraceSmallNumberFormat : '+str(event.source.getxTraceSmallNumberFormat())
print 'getXTraceSmallNumberFormat : '+str(event.source.getXTraceSmallNumberFormat())
print 'getyOffset3D : '+str(event.source.getyOffset3D())
print 'getYOffset3D : '+str(event.source.getYOffset3D())
print 'getZoomedEndDate : '+str(event.source.getZoomedEndDate())
print 'getZoomedStartDate : '+str(event.source.getZoomedStartDate())

If I ever figure it out, I will let you know.

@June_Zhu - I finally figured this out. I was able to get all four parameter values in an easy chart from a test button using the following script:

chart = event.source.parent.getComponent('Easy Chart')
leftDomainX = chart.getZoomedStartDate()
rightDomainX = chart.getZoomedEndDate()
lowerRangeY =  chart.getComponent(0).getComponent(0).chart.getPlot().getRangeAxis().getLowerBound()
upperRangeY = chart.getComponent(0).getComponent(0).chart.getPlot().getRangeAxis().getUpperBound()
print "Current Y-Axis visible range = " + str(lowerRangeY) + " - " + str(upperRangeY)
print "Current X-Axis visible range = " + str(leftDomainX) + " - " + str(rightDomainX)

Output prior to zoom:
image

Current Y-Axis visible range = -0.1 - 200.0
Current X-Axis visible range = Tue Nov 08 20:00:00 CST 2022 - Wed Nov 09 20:59:59 CST 2022

Output after zoom:
image

Current Y-Axis visible range = 53.600332834 - 108.341278965
Current X-Axis visible range = Tue Nov 08 20:39:49 CST 2022 - Wed Nov 09 02:24:57 CST 2022
2 Likes