The text to draw, along with the sizes and positions. Usually generated, but can be set or updated before final drawing
Draws immediately, set this True when using sub-surfaces for proper data label layering
When set, this provider's labels are drawn immediately after generation (during the series draw), clipped to the returned rect (surface coordinates), instead of in the deferred global text pass. See IBaseDataLabelProviderOptions.getClipRect
If this is set it will be used to get text values from metaData, rather than formatting y values. The selector will be called even if the metaData for an index is undefined.
undefined until explicitly set, which is what distinguishes "the caller asked for nothing"
from "the caller asked for Decimal". Only that distinction lets an unset provider fall back to
the column-type default while an explicit setting still wins. The PUBLIC numericFormat
getter resolves it to a concrete value, so the sentinel never leaves this class.
The Parent RenderableSeries
undefined until explicitly set - see numericFormatProperty.
Reusable native text-bounds buffer, allocated once at attach time. Hoisted here so allocation never happens on the render path — first-time native allocation can grow the WASM heap and detach any Float64Array views captured earlier in the same frame (e.g. inside a DataLabelState).
Whether the label text should update when the label position is animating. Default false.
The SciChart 2D WebAssembly Context containing native methods and access to our WebGL2 Engine and WebAssembly numerical methods
A function to pick which y values to use from the pointSeries passed in on the renderPassData
The value numericFormat reports, and the last resort in resolveFormat.
The value precision reports, and the last resort in resolveFormat.
Gets or sets the color for data labels. Defaults to axis label color
Gets or sets the color for data labels. Defaults to axis label color
Gets the engineering prefixes to use when formatting values to text.
Gets or sets the engineering prefixes to use when formatting values to text.
Default - ['K','M','B','T'] for "large" prefixes, ['m','u','n','p'] for small prefixes
Gets or sets the horizontal text position for the label For more control, override getPosition
Gets or sets the horizontal text position for the label For more control, override getPosition
Flag to enable/disable dataLabel generation. Default true
Flag to enable/disable dataLabel generation. Default true
Gets or sets numeric format to use when formatting values to text. For a list of values, see ENumericFormat For more control, override getText
Gets or sets numeric format to use when formatting values to text. For a list of values, see ENumericFormat For more control, override getText
Gets or sets the number of points below which drawing will start. Default Infinity This can be used instead of pointGapThreshold when data is unevenly spaced or has large y variation
Gets or sets the number of points below which drawing will start. Default Infinity This can be used instead of pointGapThreshold when data is unevenly spaced or has large y variation
Gets or sets the zoom threshold above which label drawing will start. Default 0. This is expressed as the gap between the first points divided by the size of the first text If data is unevenly spaced, consider pointCountThreshold or override shouldDrawText
Gets or sets the zoom threshold above which label drawing will start. Default 0. This is expressed as the gap between the first points divided by the size of the first text If data is unevenly spaced, consider pointCountThreshold or override shouldDrawText
Gets or sets the precision to use when formatting values to text For more control, override getText
Gets or sets the precision to use when formatting values to text For more control, override getText
How do decide whether to keep or skip a label once generated. Override shouldSkipLabel for more control
How do decide whether to keep or skip a label once generated. Override shouldSkipLabel for more control
The number of points to skip while generating labels. Default 0 = no skip. 1 = skip every other. When creating text with many data points, it will help performance to skip points rather than creating and checking overlap for every data point.
The number of points to skip while generating labels. Default 0 = no skip. 1 = skip every other. When creating text with many data points, it will help performance to skip points rather than creating and checking overlap for every data point.
Gets or sets the text style used for data labels. The style must be set, with fontFamily and fontSize set, in order for text to be drawn.
Gets or sets the text style used for data labels. The style must be set, with fontFamily and fontSize set, in order for text to be drawn.
Gets or sets the name of a string column on the parent series' DataSeries to take label text from, instead of formatting y values. See IBaseDataSeriesOptions.stringColumns. Takes precedence over metaDataSelector; setting both is a configuration error and warns once. An unknown column name is ignored, falling through to the other text sources. For more control, override getText.
Gets or sets the name of a string column on the parent series' DataSeries to take label text from, instead of formatting y values. See IBaseDataSeriesOptions.stringColumns. Takes precedence over metaDataSelector; setting both is a configuration error and warns once. An unknown column name is ignored, falling through to the other text sources. For more control, override getText.
Gets or sets the vertical text position for the label For more control, override getPosition
Gets or sets the vertical text position for the label For more control, override getPosition
Draws this provider's labels immediately, clipped to the given rect (surface coordinates). Pre-flushes any pending font batches under the state they expect (identity transform + surface clip) so the clip cannot apply to text batched by others, then sets the label clip and force-ends the font so the clip applies to exactly this provider's labels, then restores the seriesViewRect transform + clip.
Generates labels using getText, getPosition, getColor. Overrides manually set labels.
Returns x, y coordinates where the data-label should be drawn
Applies numeric format to current yValue
Called when a DataLabelProvider is attached to a parent RenderableSeries
Resolves the declared EColumnType of the data-series column whose values this provider
is turning into text, or undefined when there is none. Supplies the formatting DEFAULT that an
unset numericFormat/precision (or labelFormat/labelPrecision) falls back to — see
DEFAULT_FORMAT_FOR_COLUMN_TYPE. An explicit setting always wins over it.
getColumnType is optional-called as a CAPABILITY, matching how getTextAt is reached on this
path: any DataSeries able to declare column types serves one, and anything else (a plain
XyDataSeries, a third-party IDataSeries) simply falls through to the class default.
the renderable series the labels are being drawn for
the column the provider was explicitly pointed at (a name, or an index into
valueNames), or undefined to use the series' own y selection
Resolves the numeric format and precision to format this label with, in strict precedence:
Decimal and 1.The two resolve INDEPENDENTLY: setting only precision still inherits the column type's format,
and setting only numericFormat still inherits its precision.
Maps the ordinal currently being drawn (DataLabelState.index) to the row of the parent DataSeries it came from.
The default composes the two mappings the way DataLabelState.getMetaData does - flip
FIRST (getIndexInternal, which reverses the window on a non-flipped X axis), then map through
the point series' indexes (which is non-identity once the data is resampled). That is the
order the label's own DataLabelState.xVal/DataLabelState.yVal use, so text and
coordinates always name the same row.
Override this in a provider whose drawn ordinals do not follow that convention - see StackedColumnSeriesDataLabelProvider - so that text sources resolve against the same row the provider's own getPosition places the label on.
Called at the start of generateDataLabels. If False, no labels will be generated. Checks pointCountThreshold then pointGapThreshold
Called before adding a new label to state. If True the label will not be rendered.
Update the style. Only the properties passed will be updated
Generated using TypeDoc
Creates an instance of the DataLabelProvider