Easy Chart - Panning does not update Date Range

Has anyone figured out how to get the date range at the bottom of the built-in Easy Chart to follow the chart when panning? Whenever you pan around, the date range remains stuck and no longer reflects the time range in the chart.

image

I looked into this, but so far, I haven’t determined the answer. What I do know is that no matter where the easy chart is panned, all of these parameters remain fixed:

print "outerRangeStart: " + str(event.source.outerRangeStart)
print "outerRangeEnd: " + str(event.source.outerRangeEnd)
print "total Datapoints: "+ str(event.source.datapoints)
print "dateRangeLocation: " + str(event.source.dateRangeLocation)
print "cursorCode: " + str(event.source.cursorCode)
print "plotOrientation: " + str(event.source.plotOrientation)
print "gridlineWidth: " + str(event.source.gridlineWidth)
print "legend: " + str(event.source.legend)
print "hGap: " +  str(event.source.hGap)
print "vGap: " + str(event.source.vGap)
print "utilityButtonSize: " + str(event.source.utilityButtonSize)
print "selectedXValue: " + str(event.source.selectedXValue)
print "barMargin: " + str(event.source.barMargin)
print "gapThreshold: " + str(event.source.gapThreshold)
print "xOffset3D: " + str(event.source.xOffset3D)
print "yOffset3D: " + str(event.source.yOffset3D)
print "digitalGap: " + str(event.source.digitalGap)
print "startupRange: " + str(event.source.startupRange)
print "startupSelection: " + str(event.source.startupSelection)
print "maxSelectionSize: " + str(event.source.maxSelectionSize)
print "dateStyle: " + str(event.source.dateStyle)
print "timeStyle: " + str(event.source.timeStyle)
print "trackMargin: " + str(event.source.trackMargin)
print "tickDensity: " + str(event.source.tickDensity)
print "tagHistoryResolution: " + str(event.source.tagHistoryResolution)
print "tagHistoryResolutionMode: " + str(event.source.tagHistoryResolutionMode)
print "unitCount: " + str(event.source.unitCount)
print "unit: " + str(event.source.unit)
print "rtLabel: " + str(event.source.rtLabel)
print "globalWhereClause: " + str(event.source.globalWhereClause)
print "propertiesLoading: " + str(event.source.propertiesLoading)
print "datapoints: " + str(event.source.datapoints)
print "startDate: " + str(event.source.startDate)
print "endDate: " + str(event.source.endDate)

Furthermore, I individually pulled all of the dataset parameters into a power table, and I was unable find anything to go off of in there either.

I had an opportunity to look at this again, and I was able to figure it out. Put this code in your Easy Chart’s mouseDragged event, and it will produce the desired effect:

event.source.startDate = event.source.getZoomedStartDate()
event.source.endDate = event.source.getZoomedEndDate()
3 Likes