I currently have a XamDataChart which displays a ScatterSeries of points. The chart is intended to be a unity chart, so I'm trying to add a straight diagonal line of X=Y to show how close the actual v estimated data was. I'm having trouble getting a LineSeries to appear on the same chart as a ScatterSeries... are there any examples of this? Additionally, I would like to be able to hover on the ScatterSeries points and have a custom label display, but I can't seem to find the correct properly to bind my label to.
Help appreciated!
Hello Danielle,
Thank you for your post!
A LineSeries is in the Category series family whereas the ScatterSeries is in the Numeric series family. For you to have an X=Y LineSeries in your XamDataChart, you would need to include a separate CategoryXAxis. As an alternative to this, I would recommend that you look into the creation of a ScatterLineSeries. This series is numeric, like the ScatterSeries, except it draws a line between the points. If these points chronologically increase where X=Y, you will have a line that is drawn diagonally in the chart. You may also want to set the MarkerType property on this line to "None" if you only wish to see the line itself.
Regarding the tooltips, the data context of the elements in your tooltip is a Infragistics.Controls.Charts.DataContext object. This DataContext object has an Item property, which represents the data item that your series represents. So, to bind to a property on this data item, you would need to use {Binding Item.PropertyName}.
I have attached a sample project to demonstrate the above. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support