PDA

View Full Version : WPF Pie Chart real time update



victorlin
25th February 2015, 02:04
Hi
I have follow the blog (http://blog.copadata.at/wp/using-the-wpf-element-combined-with-additional-assemblies-pie-chart-1/) to create the WPF Pie Chart in Zenon.
But the Pie Chart only update when I switch to its screen everytime.
How to make this Pie Chart to update in real time?

Thank you.
Best Regards,
Victor

martins
30th March 2015, 15:35
hi,

you could do it with the help of Dependency Properties and perfoming a refresh internally when the values change. Another way could be to redraw it cyclically (although this would be my less prefered way).

best regards,
Martin

victorlin
15th April 2015, 05:10
Hi Martin,
Now I am creating a counter variable to make the WPF chart to refresh if the WPF page is turn on and the value are changed. But it is a complicated way.

I have tried to write a VBA to keep counting to update the WPF chart, but it will have error may bec of keep running the VBA code.

Do you have any suggestions to make this real time update easier? What is the better method to make "Dependency Properties and perfoming a refresh internally when the values change." work?

Thank you.
Best Regards,
Victor