ChartDataUnit

Type Parameters

  • ChartStyle

    Chart style type (which may differ depending on the chart type)

Hierarchy (view full)

Constructors

Properties

animationInstances: AnimationInstance<Widget>[] = []
centerX: number
centerY: number
children: Widget[] = []

The child-widgets of the widget.

display: boolean = true
eventInstances: EventInstance<Widget>[] = []
hasSet: boolean = false
intervalUnit?: DateTimeUnit

Interval unit

isImplemented: boolean = false
key: string = ...
last: Widget = ...
parent: Widget
plugins: WidgetPlugin[] = []
progress: number
registeredEvents: Map<string, Event<Widget>> = ...
setups: {
    generator: Generator<number | {
        animation: Animation<any>;
        duration: number;
        mode: "async" | "sync";
        params: Record<string, any>;
        setAsync: (() => { animation: Animation<any>; mode: "async" | "sync"; duration: number; params: Record<string, any>; setAsync: () => ...; setSync: () => ...; });
        setSync: (() => { animation: Animation<any>; mode: "async" | "sync"; duration: number; params: Record<string, any>; setAsync: () => ...; setSync: () => ...; });
    }, void, unknown>;
    nextFrame: number;
}[] = []

Type declaration

  • generator: Generator<number | {
        animation: Animation<any>;
        duration: number;
        mode: "async" | "sync";
        params: Record<string, any>;
        setAsync: (() => { animation: Animation<any>; mode: "async" | "sync"; duration: number; params: Record<string, any>; setAsync: () => ...; setSync: () => ...; });
        setSync: (() => { animation: Animation<any>; mode: "async" | "sync"; duration: number; params: Record<string, any>; setAsync: () => ...; setSync: () => ...; });
    }, void, unknown>
  • nextFrame: number
status: Status = 'unborn'
style: ChartStyle

Chart style

updates: (<T>(elapsed, widget) => void)[] = []

Type declaration

value: number | ChartData

Value

x: number
y: number

Accessors

  • get range(): WidgetRange
  • The range of the widget, taking into account the children, based on the parent coordinate. To be noted that this method should not be overridden.

    Returns WidgetRange

    The range of the widget.

  • get singleRange(): WidgetRange
  • The range of the widget, taking into account the children, based on the parent coordinate. To be noted that this method should not be overridden.

    Returns WidgetRange

    The range of the widget.

Methods

  • Calculate the range of the widget, based on the self-coordinate. To be noted that this method should be overridden.

    Parameters

    • _x: number
    • _y: number

    Returns boolean

  • Draw the object according to the parameters of the widget. Called when the parameters are changed.

    Parameters

    • _canvas: Canvas

      The canvas object of CanvasKit-WASM.

    Returns void

  • Determine whether the point is in the widget, based on the parent coordinate. To be noted that this method should not be overridden.

    Parameters

    • x: number
    • y: number

    Returns boolean

  • Preload the necessary items duration drawing. Called when the properties changed. In common, we use it to initializing Paint, Rect, Path, etc.

    Parameters

    • _ck: CanvasKit

      The namespace of CanvasKit-WASM.

    • _propertyChanged: string

      The changed property of this widget

    Returns void

  • Called when the parameters are changed.

    Parameters

    • ck: CanvasKit

      The namespace of CanvasKit-WASM.

    • Optional propertyChanged: string

    Returns void

  • Set up an update function to call it when the widget is changed.

    Parameters

    • updateFunc: (<T>(elapsed, widget) => void)

      The frame from having gone to current frame.

    Returns this

  • Update the object according to the style of the widget. Called when the style is changed.

    Parameters

    • canvas: Canvas

      The canvas object of CanvasKit-WASM.

    Returns void