aug152002 Posted May 27, 2008 Report Share Posted May 27, 2008 Hello Everybody, I have been working the wholeday trying to make ChartFX inside ASP.net Ajax UpdatePanel. It seems to work when I choose rendering as Image and inject the control into Placeholder upon any changes made to the Chart object. Basically I would like the abilty of adding Series, Points and Axis at runtime based on user selection. I am initially displaying three series but want to add more series based on a user selection.Basically I thought this would save time since only the relevent series gets displayed initially and then I can add one or more series later. But now I think selectively adding series is not possible since SeriesAttributeCollection gets reset everytime page init occurs. Currently I am looping through all the series and adding them to the Chart even though some series are already displayed in the screen and no changes have been made to them. I have set EnableViewState to true and UseCallbacksForEvents to false for the Chart object.Is there anyway this can be done in chartfx? Thanks, Raj Quote Link to comment Share on other sites More sharing options...
Frank Posted May 27, 2008 Report Share Posted May 27, 2008 The Series collection represents the Series attributes, not the series themselves. The number of series in the chart is determined by the data. So to add a series, you need to do: chart.Data.Series++; Then you can access the Series collection to customize the attributes of the newly added series. Quote Link to comment Share on other sites More sharing options...
aug152002 Posted May 27, 2008 Author Report Share Posted May 27, 2008 Thanks for the reply Frank. I am already doing that when I want to add a new series. But the problem is Chart object in the page seems for forget everthing about the series and points after a async postback. Since I have chart object inside a update panel I want to load only the new series when the user chooses the series name thro a check box. Since some series are already displayed before the checkbox checked event fired I want to add only the new series to the chart object. But since Chart.Data.Points, Chart.Data.Series and the DataValues themselves seem to mysteriously reset themselves everytime an async postback occurs I have to readd all the series and point information again and again when user selects the checkbox eventhough some series are already displayed. i dont think this is an efficient solution. anything i am missing here? thanks Quote Link to comment Share on other sites More sharing options...
sheng Posted July 22, 2009 Report Share Posted July 22, 2009 I have the same problem. It seems that ChartFX can't save viewState when it's in an updatepanel. Can anyone help? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.