Member Junction
    Preparing search index...

    Donut (or pie, with InnerRadiusRatio 0) chart with an optional center label/value and percent labels drawn on the surface outside the ring.

    <mj-donut-chart AriaLabel="Band distribution" [Slices]="bands" CenterLabel="Scored"
    [CenterValue]="total" [ShowPercentLabels]="true"></mj-donut-chart>

    Hierarchy

    • MJBaseChartComponent<DonutGeometry>
      • MJDonutChartComponent
    Index

    Constructors

    Properties

    ariaLabel: string = ''
    cdr: ChangeDetectorRef = ...
    CenterLabel?: string
    CenterValue?: string
    ChartKind: "donut" = 'donut'

    e.g. 'bar' — the start of every log line this chart writes.

    Controller: ChartController<DonutGeometry> = ...
    EmptyMessage: string = 'No data'
    formatter: ChartValueFormatter = DefaultValueFormatter
    ShowLegend: boolean = true
    ShowTooltip: boolean = true
    SliceClick: EventEmitter<ChartSliceEvent> = ...

    Accessors

    • get AspectRatio(): number | null

      Returns number | null

    • set AspectRatio(value: number | null | undefined): void

      Width ÷ height (e.g. 16 / 9); wins over Height. undefined/null is off; invalid values are logged and ignored, finite ones clamped to [0.25, 8].

      Parameters

      • value: number | null | undefined

      Returns void

    • get FillsParent(): boolean

      Lets the host fill its parent (the frame measures that height); see Height. Needs no check, so it reads the raw binding.

      Returns boolean

    • get Height(): number | "fill"

      Returns number | "fill"

    • set Height(value: number | "fill" | null | undefined): void

      A px height (minimum 120; clamped and logged), or 'fill' to take the parent's height. undefined/null (an unset binding) means 300 and is not a caller mistake.

      Parameters

      • value: number | "fill" | null | undefined

      Returns void

    Methods

    • How far the center label sits above, and the center value below, the center when both are shown. Scales with the line height (12 and 10 px at the 12px default) so the pair never overlaps at larger type.

      Parameters

      • g: DonutGeometry

      Returns { Label: number; Value: number }

    • Emit the chart's click event for an activated point (mouse click, second touch tap, Enter/Space).

      Parameters

      • point: ActivePoint

      Returns void

    • A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

      Returns void