Webchart Zoom Problem
Posted: Wed Jul 19, 2006 1:07 am
Hi,
I am trying to apply zoom to a webchart, however, it is not working as desired.
I initialize some variables at the time of Page_Load only when Page.IsPostBack is false. The page comes up with a webchart with single line series.
Now when I put multiple line series on the same webchart (depending on the user selection), and try to zoom, the control goes into
!Page.IsPostBack condition and initializes all the variables on the page again. The multiple line selection is lost. The page comes up with a single line selected as it should at the time of page_load when IT IS NOT A POSTBACK.
However, if I first zoom and then select multiple lines and click on the display button, it webchart comes up with a zoomed view and contains all the selected lines. The reason being I am adding the following lines after I update my webchart:
ch1 = WebChart1.Chart;
tmpChart = new MemoryStream();
//export Chart to a MemoryStream template
ch1.Export.Template.Save(tmpChart);
//save template to a Session variable
Session.Add("ch1",tmpChart);
thereby refreshing the Session["ch1"] value.
Also now as the sequence of events IS A POST BACK, the control does not initialize all the variables on the page.
I want to be able to add multiple lines on the webchart and then zoom and still maintain the same view (multiple lines) as selected by the user.
Please help!
Best regards,
Amol
I am trying to apply zoom to a webchart, however, it is not working as desired.
I initialize some variables at the time of Page_Load only when Page.IsPostBack is false. The page comes up with a webchart with single line series.
Now when I put multiple line series on the same webchart (depending on the user selection), and try to zoom, the control goes into
!Page.IsPostBack condition and initializes all the variables on the page again. The multiple line selection is lost. The page comes up with a single line selected as it should at the time of page_load when IT IS NOT A POSTBACK.
However, if I first zoom and then select multiple lines and click on the display button, it webchart comes up with a zoomed view and contains all the selected lines. The reason being I am adding the following lines after I update my webchart:
ch1 = WebChart1.Chart;
tmpChart = new MemoryStream();
//export Chart to a MemoryStream template
ch1.Export.Template.Save(tmpChart);
//save template to a Session variable
Session.Add("ch1",tmpChart);
thereby refreshing the Session["ch1"] value.
Also now as the sequence of events IS A POST BACK, the control does not initialize all the variables on the page.
I want to be able to add multiple lines on the webchart and then zoom and still maintain the same view (multiple lines) as selected by the user.
Please help!
Best regards,
Amol