LabelFormatString to display other values other than x/y coordinates

Jul 22, 2013 at 8:16 PM
I'm plotting points on WPF OxyPlot based on a defined set of point indexes.
For example, I have a file containing two sections:

Section 1 (x, y, width, temperature)
0.00000 8008.00000 303.89111
2.07055 8007.72754 286.60547
4.00000 8006.92822 274.70264
etc


Section 2 (vertexes)
1, 44, 45, 2
2, 45, 46, 3
3, 46, 47, 4
etc

Section 2 tells me in what order to plot the x/y coordinates from Section 1, so the first line in Section 2 says to plot points in line 1, then points in line 44, then points in line 45, then points in line 2 (of Section 1), etc.

I need to use LabelFormatString to display the vertex values, ie 1, 44, 45, 2, etc rather than the x/y coordinates.

Is this possible and how?

MDJ
Jul 22, 2013 at 8:43 PM
Edited Jul 22, 2013 at 8:43 PM
Is it for the tracker? If it's so you can use "Tag" property of LineSeries and bind it in XAML. See Tracker examples.

Good luck
Jul 22, 2013 at 9:56 PM
Thanks for the reply.
Actually, it's NOT for the Tracker. I need to show the Index number for each vertex, AND, hopefully bind it's visibility in XAML to allow user to show/hide it.
If that's not possible, I could resort to the Tracker.
Jul 22, 2013 at 10:30 PM
Edited Jul 22, 2013 at 10:34 PM
Then why you just do something like this:
for(int i=0; i<s2.Points.Count(); i++)
{
s1.Points.Add(new DataPoint(myList1X[i],myListY[i] );
s1.LabelFormatString = (s2.Points[i].X, s2.Points[i].Y)
}
Please note that I haven't tested this (you would probable need ToString() that).
For disabling that you could put a condition before LabelFormatString and redraw the LineSeries whenever the user clicks on that particular CheckBox. Good luck