Skip to content

Default values of width and height are different from default values of the canvas element on the w3c document #10

@ledsun

Description

@ledsun

The react-chartjs-2 set 200 to width and height of the canvas by default.

A W3C document define them 300 and 150 as default value.

The width attribute defaults to 300, and the height attribute defaults to 150.

The Chart.js is not set width and height of the canvas by default.
As a result, the aspect ratio of the canvas is 2.
But the react-chartjs-2 is set 1 to the aspect ratio of the canvas.

I am confused by this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions