How can I show the numerical value of the last data point in a ScatterLineSeries on an XamDataChart?
We need to show the last value for each curve on the chart just to the right of where the last data point was plotted. Only the last data point needs a number label.
a. The graph is updated in real time at about 1 point for each series every 1 second. There are 1 to 12 series on the graph depending on user settings.
b. Each series on the chart is updated at different time intervals as they come from different hardware devices. The last data point for the different series may such that one series takes up the entire graph X-Axis and another takes up 75% of the graph X-Axis. The labels need to be in the middle of the graph if the last data point for the series is in the middle of the graph.
c. The data for the curves generally varies widely causing the Y and X axes to automatically adjust the visible range. Many of the curves resemble criss-crossing sine waves with ampltudes taking up most of the visible area of the graph when the graph is not zoomed in.
d. We already have a way to show the last 10 minutes of data and add padding to the right of the graph enough to allow for a last data point number label.
e. These graphs are run for hardware collection and can run from 1 to 15 hours
It would greatly help if there is a way to adjust the last data point label up or down slightly to help reduce, but not elliminate, the overlap between labels
I forgot to add,
f. The series are added dynamically in c# and do not have a definition in XAML
g. We would like to avoid having a hidden/transparent label or marker for every data point the curves since the number of data points on a long running graph is in the 250,000+ range. That is the suggestion for http://ko.infragistics.com/community/forums/p/28731/121247.aspx#121247 which is about showing a marker for the first and last data point.
Hello,
One possible way to simulate this without hidden / transparent labels would be to add a second Scatter Series to you chart which consist of only the first and last point in the ScatterLineSeries. By doing this you can include the markers on the second series and leave out all of the markers on the first. You could then add remove the last point on this series whenever the data is updated.
See attached sample.
Let me know if you have any questions.
Sincerely,
Valerie
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for the sample.
We tried the second series to just show the data point label. This did not work for our application as it doubled the number of series needing updating when a new data point sample comes in from our harware device.
We had to go with a different solution of showing the last data point in the series legend with a custom templated legend.