Skip to content

Commit 9f3391e

Browse files
committedOct 29, 2015
Tracker format string clarification
Added a little bit more detail on accessing ItemSource item properties in the tracker format string.
1 parent 95a751c commit 9f3391e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎views/tracker.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ The arguments are specific to each class.
1717
|| Class || ~{0} || ~{1} || Examples |
1818
| LineSeries | X | Y | `"{0:0.00} {1:0.00}"` |
1919
20-
The format string can also contain formatting codes for properties in the nearest item of the hit. Use the property name inside the curly braces: `{MyProperty:0.00}`
20+
If you need to include extra information in the tracker beyond the standard parameters (e.g. series name, x and y values), you can use the ``Series.ItemSource`` property to populate the data points (see e.g. `LineSeries <../../models/series/LineSeries.html>`_ for more details).
21+
The format string can also contain formatting codes for properties in the ``ItemSource`` list item that defines the data point closest to the tracker hit.
22+
Use the property name inside the curly braces: `{MyProperty:0.00}`.
2123

2224
The culture of the tracker format string can be set in the `Culture` property in the `PlotModel`. The default culture is the current UI culture.
2325

@@ -55,6 +57,9 @@ This class contains data about the current hit of the tracker:
5557
| `Item` | the current item if an `ItemsSource` was used to generate the data.|
5658
| `Text` | the text to be shown in the tracker. If this property is set, the series' `TrackerFormatString` will not be used.|
5759
60+
The TrackerHitResult for the current tracker state can be obtained by handling the PlotModel.TrackerChanged event.
61+
However, this event occurs after the text has been set on the tracker UI, so you cannot use this event handler to set custom tracker text.
62+
5863
Tracker definitions
5964
===================
6065

0 commit comments

Comments
 (0)
Please sign in to comment.