hhravn Posted September 15, 2009 Report Share Posted September 15, 2009 Hi I have a problem regarding the brush used to fill series. I have a chart w. gallery set to Area. In some situations the entire chart is refreshed, by clearing the Series attribute, and adding the series all over. When this happens, however, the colors of the series are off, e.g. the first series to be added to the chart always seems to get the same color as the series that was no. 1 before the clear. I've attached an example project to demonstrate this scenario; Series 1 ( Fill = Red) is painted Series 2 (Fill = Green) is painted State: Series 2 is painted in Green on top of Series 1 painted in Red chart.Series is cleared Series 2 (Fill = Green) is painted Series 1 ( Fill = Red) is painted State: Series 1 is painted in Green on top of Series 2 painted in Red Could you please inform me how to avoid this scenario? Quote Link to comment Share on other sites More sharing options...
hhravn Posted September 16, 2009 Author Report Share Posted September 16, 2009 Apparently Series.Clear() is not enough. When resetting Data.Series and Data.Point as well, the series are correctly filled. effectChart.Series.Clear(); effectChart.Data.Series = 0; effectChart.Data.Points = 0; Quote Link to comment Share on other sites More sharing options...
JuanC Posted September 16, 2009 Report Share Posted September 16, 2009 In your sample app Series.Clear() should have been enough, we have uploaded a new hotfix that fixes this bug so you should NOT need to worry about Data.Series or Data.Points. Also note that if all you wanted was to flip the series Z order to make the bottom visible you can do something like SeriesAttributes s1 = chart.Series[1]; chart.Series.RemoveAt(1); chart.Series.Insert(0, s1); This would avoid having to reprocess the series data. Regards, JuanC 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.