@pond-ts/charts API Reference
    Preparing search index...

    Type Alias CanvasDraw

    CanvasDraw: (
        ctx: CanvasRenderingContext2D,
        width: number,
        height: number,
    ) => void

    A draw callback. The 2D context it receives is already transformed to device pixels, so draw in CSS-pixel coordinates (0..width, 0..height) and it renders crisply at any device-pixel ratio. The context is freshly transformed and cleared before each invocation.

    Type Declaration

      • (ctx: CanvasRenderingContext2D, width: number, height: number): void
      • Parameters

        • ctx: CanvasRenderingContext2D
        • width: number
        • height: number

        Returns void