Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
Problem with Column Chart when setting Visible to false
posted

Hi.

I have a series of data that I am plotting as either a column chart of Line Chart depending on user preference. If it is a ColumnChart I have to set the SwapRowsAndColumns but other than that the data displays fine.

Based on user input I want to be able to hide a series so when the user picks the series to be hidden I am finding the series within ultraChart.Series and then setting Visible on that series to be False. I then InvalidateAllLayers and call refresh on the chart. When I am using the LineChart this works as expected but when I am viewing the ColumnChart nothing happens. I am assuming that I am missing something simple but I cant see from teh docs.

Do I need to do something else when using a ColumnChart? I cannot use ultrachart.Data.IncludeColumn() because ultrachart.Data is not set because I am using a Series Collection.

Code Below to set visibel. Works fine with Line Chart but not with Column.

 

 

 

 

 

 

foreach (NumericSeries n in ultraChart1.Series)

{

n.Visible = streamDisplay[n.Label] ?

true : false;

}

ultraChart1.InvalidateLayers();

ultraChart1.Refresh();

Thks

Dan

Parents
No Data
Reply Children