Skip to content

size argument passed to onResize doesn't seem to be consistent #8528

@stockiNail

Description

@stockiNail

Expected Behavior

Activating the onResize options, I'm expecting to get 2 arguments, chart and size as described in doc and types def:

 onResize(chart: Chart, size: { width: number; height: number }): void;

Current Behavior

With CHART.JS dist/master, the chart is passed correctly but the size doesn't seem correct.
The size is a proxy and doesn't contain any width or height.
The argument is the chart options instance (maybe I'm wrong).

Screenshot 2021-02-26 145039

Steps to Reproduce

See console of https://codepen.io/stockinail/pen/ExgNgXV

Environment

  • Chart.js version: dist/master
  • Browser name and version: FF 86.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions