Skip to content

[BUG] scales undefined when update options with a new object #4197

@xg-wang

Description

@xg-wang

Expected Behavior

Be able to call chart.update() after setting new options related to scales.

Current Behavior

Uncaught TypeError: Cannot set property 'options' of undefined

Possible Solution

It's caused by setting scales in new options to chart.scales directly. Could be fixed by merging with default values and ensureScalesHaveIDs before doing so. Have worked out a PR.

Reproduce

Codepen

Context

When I want to change the tick display format of axes it broke.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions