Hello!
We provide an option to our users to show/hide certain series. This is done by setting visibility of particular series to Visible/Collapsed.
Their ItemsSource is set to ObservableCollection, and sometimes this collection changes. And the problem happens when doing this:
1) User hides one of the series (sets Visibility to Collapsed)
2) Series changes
3) User sets Visibility to Visible
After this, series isn't visible! This problem happens only with the series that have been hidden, others are changing fine.
In fact, data is bound correctly, but the chart doesn't draw this series for some reason. This is confirmed by the fact that forcing the chart to refresh (e.g. zooming) instantly shows that missing series.
So, why is this happening? Is there any way to force XamDataChart to refresh explicitly?
Currently, I use a workaround: I set visibility to Collapsed, give time to draw a series using Windows.Forms.Application.DoEvents() (without this it wouldn't work), change series, and then set Visibility to Collapsed, but it isn't acceptable because the missing series "blinks" for a moment during this.
Best regards, Vasily.
HI Vasily,
I am attaching a sample project I wrote.
The sample has two button, one to toggle the visiblity of the first series. The other button changes the data on the 2nd series.
Can you provide me the steps to reproduce this issue uing the attached sample.
Sincerely, Matt Developer Support Engineer
Thanks for your reply!
I said that I have a problem when changing data of the series that I am hiding, so I changed your sample that way:
private void btn2_Click(object sender, RoutedEventArgs e) { foreach (Data d in vm.ChartData) { d.Total += 5; } chart1.UpdateLayout(); }
private void btn2_Click(object sender, RoutedEventArgs e)
{
foreach (Data d in vm.ChartData)
d.Total += 5;
}
chart1.UpdateLayout();
Steps to reproduce:
1) Click "toggle"
2) Click "chnge series2"
3) Click "toggle"
By the way, a problem can be reproduced even with the original version of this sample that you sent to me:
1) Click "chnge series2" 3 times
2) Click "toggle"
3) Click "chnge series2"
4) Click "toggle"
As you can see, in both ways series just isn't visible, if you resize a window, it appears back.
Hi,
I have responded to you thru the case to verify that you are now receiving emails. Please contact me thru the case when you receive that response.
Unfortunately, I didn't receive any email concerning this problem. I do receive new post's email notifications though.
Hello
We have a situation that is similar to the one described in this topic. Is there a solution to this problem? Is this bug fixed in the latest version of WPF controls?
This was submitted as a development issue and was resolved with the WPF service release for 11.2.20112.2185. At that time the new WPF product version of 2012.1 was released and it did not have that behavior.
If you are using an earlier version you may want to apply the latest service release or upgrade.
Please let me know what product version and service release version you are using?
Now we are using 11.1.20111.2026 and discussing transition to 12.1.20121.1010. Are there any solution for these versions?
Thanks for help.
You will want to upgrade to either WPF 2011 Vol. 2, the latest service release or WPF 2012 Vol. 1.
We are no longer updating WPF 2011 Vol. 1. You may want to review this link for our service release schedule.
http://ko.infragistics.com/help/service-releases/