Zooming and Scrolling causes a postback. At this time, my code simply re-reads all of the data and builds the complete chart again.
When zoomed in, scrolling can cause another postback which causes another load of all of the data etc.
Is there a way to check the control etc. on postback to find the necessary chart area and only read the necessary data?
Also, is there a way to get the scale, etc. for use in changing the amount of labels and data in the required area?
Is there an example of this available?
For instance, lets say I want a chart of the number of shares of XYZ stock sold for a given time period. I have data for the number of shares sold in each minute of each day for the past 5 years. When generating the chart for 5 years, I do not add every minute data point. I sum all of the minutes into months so that there are 60 data points, each with a month label.
I set XOnly zooming/scrolling on the chart. The user left clicks and drags to highlight the 12 data points in the year 2008. A postback occurs and the C# code does not know any better than to generate the chart in exactly the same way. Only one year of data is needed (perhaps more for the queue on either side?). But, 5 years of data is read. Now, the user sees the 12 months, each with one data point.
I would like to regenerate the chart based on the zoom/scale and scroll positions (the required data slice needed for display). In this case, I would like to sum the data (that is in minutes) into weeks instead of months and use week labels instead of month labels. That way, instead of the user seeing 12 data points, they will get 52 data points with new labels. Then, it is a true zoom into the data to reveal more details.
If the user then scrolls one page right, a postback may occur and the chart can be regenerated for just the year 2009 (or whatever overlap is necessary).
I do not expect this to happen automatically. However, I cannot find an example or any guidance on how to implement this type of zoom and scroll of the data.
What properties are available for implementing something like this?
If I can caclulate or retrieve the visual range of the chart, I can simply build the chart as a full chart and zero all chart data points before the requested range, read in the data for the requested range and zero the trailing data points outside of the requested range.
After
When zoomed in, scrolling can cause another postback which causes another load of all of the data etc.
Is there a way to check the control etc. on postback to find the necessary chart area and only read the necessary data?
Also, is there a way to get the scale, etc. for use in changing the amount of labels and data in the required area?
Is there an example of this available?
For instance, lets say I want a chart of the number of shares of XYZ stock sold for a given time period. I have data for the number of shares sold in each minute of each day for the past 5 years. When generating the chart for 5 years, I do not add every minute data point. I sum all of the minutes into months so that there are 60 data points, each with a month label.
I set XOnly zooming/scrolling on the chart. The user left clicks and drags to highlight the 12 data points in the year 2008. A postback occurs and the C# code does not know any better than to generate the chart in exactly the same way. Only one year of data is needed (perhaps more for the queue on either side?). But, 5 years of data is read. Now, the user sees the 12 months, each with one data point.
I would like to regenerate the chart based on the zoom/scale and scroll positions (the required data slice needed for display). In this case, I would like to sum the data (that is in minutes) into weeks instead of months and use week labels instead of month labels. That way, instead of the user seeing 12 data points, they will get 52 data points with new labels. Then, it is a true zoom into the data to reveal more details.
If the user then scrolls one page right, a postback may occur and the chart can be regenerated for just the year 2009 (or whatever overlap is necessary).
I do not expect this to happen automatically. However, I cannot find an example or any guidance on how to implement this type of zoom and scroll of the data.
What properties are available for implementing something like this?
If I can caclulate or retrieve the visual range of the chart, I can simply build the chart as a full chart and zero all chart data points before the requested range, read in the data for the requested range and zero the trailing data points outside of the requested range.
After