ITextMeasurer Interface

Measures text, so the layout of a chart (margins, label rotation, truncation, legend wrapping) fits the font that draws it.

public interface ITextMeasurer

Properties

NameDescription
FontFamilyGets the font family the measured text is drawn with, as a CSS font-family value.

FontFamily

Gets the font family the measured text is drawn with, as a CSS font-family value.

string FontFamily { get; }

Property value

string

Methods

NameDescription
Measure(string, ChartFont)Measures a line of text.

Measure(string, ChartFont)

Measures a line of text.

TextMetrics Measure(string text, ChartFont font)

Parameters

text string
The text, on one line.
font ChartFont
The size and the weight of the font.

Returns

TextMetrics The dimensions of the text.