How to change the string format of the value of the Oxyplot path?


If I change the stringformat of axis, it works for the axis (see the black circle of the picture). But how can I change the stringformat of the track value (the red circle)?

You should set DefaultTrackerTemplate. Here a small example that shows you the way:

    <oxy:Plot Title="AAA">
            <oxy:LinearAxis Position="Left" Title="Left: " />
            <oxy:LinearAxis Position="Bottom"  Title="Bottom: " />
            <oxy:LineSeries x:Name="ls" ItemsSource="{Binding Points}"/>
                <oxy:TrackerControl Position="{Binding Position}"
                        <StackPanel >
                                <TextBlock Text="{Binding XAxis.Title}" Foreground="Red" />
                                <TextBlock DockPanel.Dock="Right" Text="{Binding DataPoint.X}" Foreground="Red" />
                                <TextBlock Text="{Binding YAxis.Title}" Foreground="Green" />
                                <TextBlock DockPanel.Dock="Right" Text="{Binding DataPoint.Y}" Foreground="Green"
                                       FontWeight="Bold" />

Hope it helps.