SharpPlot Reference > SharpPlot Properties > XTrackFormat Property

SharpPlot.XTrackFormat Property

Set a formatter for X-axis tracking.

public string XTrackFormat {get; set;}


sp.XTrackFormat = "##0.0kg";   // for a scatterplot
sp.XTrackFormat = "MMM/yyyy";  // for timeseries data


When you use the PageMap class to enable an active chart viewer, it may be helpful to translate the mouse position into the co-ordinate system shown on the chart. This allows the user to point the mouse at a data value and read off the associated numbers directly.

The default is to show the x-position as “x:value” where the value is rounded to 3 significant figures. You can override the default by specifying any valid format string here, including date formats if the X-axis is time-based.

See also ...

Active charts in GUI Applications | PageMap.GetTracker Method

Send comments on this topic
© Dyalog Ltd 2021