Skip to content

Array of tuples data structure not working when parsing is disabled #12232

@inad9300

Description

@inad9300

When switching from an array of objects to an array of tuples on a line chart, I get the following TypeScript error:

Type '[number, number]' is not assignable to type 'number | Point | null'.

Furthermore, with parsing set to false, provided I erase type information through casts to any to skip TypeScript's checks, the line stops being drawn on the chart, so I am unable to apply this recommended performance optimization:

Provide prepared data in the internal format accepted by the dataset and scales, and set parsing: false. See Data structures for more information.

Reproducible sample

chart.js version

v4.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions