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
285
xamchart and viewmodel
posted

Hi,

i developing a application where temperature data from a device are shown in a line chart (I use ScatterLine diagram). The x-Axis should show the time values and the y-Axis the temperature values. I use the Microsoft Prism framework. I tried your example 'Binding xamChart to Data' with static values and it works well. But now I wanted to modifiy the data every second by an external thread which throws an exception via the IEventAggregator of the prism framework like i do it with other values which are shown in Textblocks too. To modifiy the data I only add the new data value pair to my existing ObservableCollection but nothing happend.

After this I tried it like described in your 'Modifying the underlaying data' example, I disabled and enabled the RefreshEnabled attribute but know it throws an exception that this is not the right thread ....!

 

How can I modify the chart by using an eventaggregator?

If I use a viewmodel constructor with a IUnitycontainer parameter your example with the static values did'nt work too. Only if I use a paremeterless constructor it works.

Parents Reply Children
No Data