jrozak Posted November 14, 2007 Report Share Posted November 14, 2007 If I have a legend box or a title, or even an x-axis lable and I then postback information back on the web page, the title will repeat as well as the legendbox information (Especially is I use CustomGridLine). How can I stop this from happening? I have all ready tried the methods below. Thanks chart1.Data.Clear(); chart1.DataSourceSettings.Fields.Clear(); chart1.LegendBox.ItemAttributes.Clear(); Link to comment Share on other sites More sharing options...
maximop Posted November 14, 2007 Report Share Posted November 14, 2007 You need to check when you are doing a PostBack. You can do the following to avoid re-adding those elements: if (!Page.IsPostBack) {Chart1.Titles.Add(new TitleDockable("This is a title test")); Chart1.Titles[0].Font = new Font("Arial", 12, FontStyle.Bold);//Rest of code } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.