ScatterChart

Description

The ScatterChart is a variation of the LineChart that displays individual data points. In fact, the ScatterChart is a LineChart with the showLine option set to false and the animateIndex option set to true when the index type is a number.

Hierarchy (view full)

Constructors

Properties

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

The child-widgets of the widget.

The data of the LineChart.

display: boolean = true
dotSets: Circle[][]

The dot sets of the LineChart.

eventInstances: EventInstance<Widget>[] = []
fillPaint: Paint
hasSet: boolean = false
isImplemented: boolean = false
key: string = ...
last: Widget = ...
layout: ChartLayout

Layout object for the chart.

parent: Widget
paths: Path[]

The paths of the lines in the LineChart.

plugins: WidgetPlugin[] = []
progress: number
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
strokePaint: Paint
strokePaints: Paint[]

The stroke paints for the lines in the LineChart.

The style of the LineChart.

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

Type declaration

    • (elapsed, widget): void
    • Parameters

      Returns void

x: number
y: number

Methods

  • Called when the parameters is changed.

    Parameters

    • ck: CanvasKit

      The namespace of CanvasKit-WASM.

    • Optional propertyChanged: string

    Returns void

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

    Parameters

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

      The frame from having gone to current frame.

        • (elapsed, widget): void
        • Parameters

          Returns void

    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