Options
All
  • Public
  • Public/Protected
  • All
Menu
summary

A Label Provider for use with Pie Charts to allow customizing of segment labels To completely customise the label output, override getSegmentText To just adjust the numeric formatting of the label, use numericformat, precision, prefix, postfix, or override formatLabel

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected formatCursorLabelProperty

formatCursorLabelProperty: TFormatLabelFn

Protected formatLabelProperty

formatLabelProperty: TFormatLabelFn

parentAxis

parentAxis: AxisCore

The parent AxisCore. This will be set once attachedToAxis is called

Protected parentSurface

parentSurface: SciChartPieSurface

The parent SciChartPieSurface. This will be set once attachedToSurface is called

Readonly type

type: Pie = ELabelProviderType.Pie

Accessors

cursorNumericFormat

cursorPrecision

  • get cursorPrecision(): number
  • set cursorPrecision(value: number): void
  • Gets or sets the precision to use for cursors labels

    Returns number

  • Gets or sets the precision to use for cursors labels

    Parameters

    • value: number

    Returns void

formatCursorLabel

  • Gets or sets a formatCursorLabel function which is used for formatting a data-value into a string for display on a cursor or tooltip If you are creating a custom LabelProvider, you should override formatCursorLabelProperty, not the formatCursorLabel property! See our Documentation

    Returns TFormatLabelFn

  • Gets or sets a formatCursorLabel function which is used for formatting a data-value into a string for display on a cursor or tooltip If you are creating a custom LabelProvider, you should override formatCursorLabelProperty, not the formatCursorLabel property! See our Documentation

    Parameters

    Returns void

formatLabel

  • Gets or sets a formatLabel function which is used for formatting a data-value into a string for display on the axis labels. If you are creating a custom LabelProvider, you should override formatLabelProperty, not the formatLabel property! See our Documentation

    Returns TFormatLabelFn

  • Gets or sets a formatLabel function which is used for formatting a data-value into a string for display on the axis labels. If you are creating a custom LabelProvider, you should override formatLabelProperty, not the formatLabel property! See our Documentation

    Parameters

    Returns void

numericFormat

postfix

  • get postfix(): string
  • set postfix(v: string): void
  • Gets or sets a string to add to the end of each label

    Returns string

  • Gets or sets a string to add to the end of each label

    Parameters

    • v: string

    Returns void

precision

  • get precision(): number
  • set precision(value: number): void
  • Gets or sets the precision to use when formatting

    Returns number

  • Gets or sets the precision to use when formatting

    Parameters

    • value: number

    Returns void

prefix

  • get prefix(): string
  • set prefix(v: string): void
  • Gets or sets a string to add to the beginning of each label

    Returns string

  • Gets or sets a string to add to the beginning of each label

    Parameters

    • v: string

    Returns void

Methods

applyFormat

  • applyFormat(value: string): string
  • Parameters

    • value: string

    Returns string

attachedToAxis

attachedToSurface

  • Called when the LabelProvider is attached to an

    Parameters

    Returns void

delete

  • delete(): void

detachedFromAxis

  • detachedFromAxis(): void

getSegmentText

  • getSegmentText(segment: IPieSegment, total: number): string
  • Get the text to be used as the segmet label. This picks the raw value, or percentage depending on the chart's valueMode then formats it using the formatLabel function.

    Parameters

    • segment: IPieSegment

      The PieSegment to get a label for

    • total: number

      Total of all pieSegment values

    Returns string

Protected invalidateParent

  • invalidateParent(): void

onBeginAxisDraw

  • onBeginAxisDraw(): void

toJSON

  • toJSON(): { options: {}; type: string }
  • Returns { options: {}; type: string }

    • options: {}
    • type: string

Generated using TypeDoc