I am converting my Silverlight project to WPF and trying to follow the MVVM pattern. My current Silverlight solution is each time a "channel" is selected by the user, in the code behind, I manually create an x and y axis, series, link them together and then add them all to the XamDataChart that I defined in the XAML.
I am now trying to use data binding as much as possible but I am not sure if it can be accomplished with data binding alone. Each "channel" needs to have an individual y-axis since the ranges will be different but they can all share the same x-axis (or those can be independent as well, either way will work for my purposes). Also, I had originally used CategoryDateTimeXAxis but now I am updating the chart every second so the interval will always be 1 second and I can therefore use the NumbericXAxis which gives me more control over the label formatting anyway (at least in Silverlight it did). How can I add a single pre defined NumericXAxis in the XAML but them bind all y-axes and series to an ObservableCollection that changes when a user selects or deselects a "channel" or should I even do that?
Suggestions? Do I need to describe what my goals are a little better?
Hello Sunitha,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
I have managed to resolve this by creating the tool tip programmatically and assigning it to the series.
thanks,
Sunitha
Hi ,
I have found this thread very useful and simple to use. Just wanted to find out how would I be able to set the tooltip to display the datapoint details?
-Sunitha
Thanks it worked ...:-)
Sunil
Hello Sunil,
Thank you for your post. I have been looking into it and the sample you have provided and I modified the sample, so now it works as you want. Basically I changed the Label and the Binding of the CategoryXAXis.
Hope this helps you.