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 Vasily,
I was able to reproduce the behavior you described with the series not becoming visible after updating the visibility property in code behind and using the steps you described in your last post.
I am in the process of logging a development issue for you and I will contact you directly thru a case I am creating for you.
Thank you for your reply!
I changed my email in the profile in case contacting directly means by email (previous email's owner is on vacation now).
But again, isn't there a better workaround? For example, in xamChart there is Refresh() method, is there a way to force refresh for a xamDataChart?It will solve the problem until you change this behaviour in the future versions.
Hi,
Yes, I did create a case for you based on your user profile and my case responses would be sent to your email address. I have already sent you information about the development issue that I logged. Please contact me thru this forum thread if you did not receive the case response that I sent you.
As to your other question, that is part of the process of raising a development issue. The next step will be for development to review and confirm my findings or to offer a fix, or other resolution.
Yes, I didn't receive a response. You may have sent it to me before I changed email addres in the profile. Please send it to my profile's current email address.
Thanks in advance!
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.
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://es.infragistics.com/help/service-releases/
Now we are using 11.1.20111.2026 and discussing transition to 12.1.20121.1010. Are there any solution for these versions?
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?
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?