I am asking to the StackOverflow for the first time. If I rude to you, Tell me it. I will fix it. Thank you.
Asking...
In the BCG Library. Using Visual Studio 2012, MFC.
I want to control the display of data range in the chart of historical.
When I call below functions.
- CBCGPChartAxis::SetFixedMaximumDisplayValue
- CBCGPChartAxis::SetFixedMinimumDisplayValue
- CBCGPChartAxis::SetScrollRange
- CBCGPChartAxis::EnableScroll
- CBCGPChartAxis::EnableZoom
- CBCGPChartAxis::SetAlwaysShowScrollBar
The chart just worked once. And then, The chart seemed calling CBCGPChartAxis::SetAutoDisplayRange() automatically.
In other words. I don't want to call CBCGPChartAxis::SetAutoDisplayRange() automatically by the chart.
controlling the display range in a history' chart.
As far as I can see in the source code this function is called from serveral places. Maybe the easiest method to block this function is to call CBCGPChartSeries::ReplaceAxis and replace the automatically created axis with you implementation, that may ignore SetAutoDisplayRange.
If this doesn't help or as a method for further investigation:
Set a breakpoint and look into the callstack to see who calls this function and when this function is called. Again: As far as I understand the source code the function is called automatically when something changes in the chart.