SharpPlot Reference > SharpPlot Properties > ValueTagFormat Property

SharpPlot.ValueTagFormat Property

Set Value-tag picture format.

public string ValueTagFormat {get; set;}

Example

sp.ValueTagFormat = "##0.00%";

To show the tags to 2 decimal places with a trailing % symbol. When contour lines are drawn on scatterplots, this format specification is used to create the labels on each line. Note that the trailing ‘%’ does not multiply the values by 100 here (this is one of the few differences from the default formatter in C#).

Piecharts

This format specification is also used for the numeric sector labels on piecharts if you set the ‘values’ style here. You can also use a simple format such as ‘XXXXXXX;’ to get text labels wrapped into a limited width, or ‘XXXXXX’ which will simply truncate them, suffixed with an ellipsis if necessary.

In addition, you may want to merge the sector labels with the sector values. You can do this with a format such as ‘The XL = ##0’ which will take each sector in turn and substitute the corresponding label into the value string at the XL marker. You may prefix it with a backslash to prevent interpretation as XLabels, as for all formatting characters.

See also ...

Using Picture Formatters | Formatting text with simple HTML tags | SharpPlot Members


Send comments on this topic
© Dyalog Ltd 2021