Skip to content

v3 Calling update in custom tooltip or onHover throws max call stack size exceeded #8737

@sdehm

Description

@sdehm

Expected Behavior

Calling update in a custom tooltip or onHover function should update the chart without an exception. This was working in v2.

Current Behavior

Calling update causes a maximum call stack size exceeded error after a delay. Occasionally the update does eventually apply.

Possible Solution

Triggering the chart update with an event applies the change immediately but also throws the maximum call stack size exceeded error. Seems like it gets stuck in an infinite loop and overflows.

Steps to Reproduce

This codepen reproduces the error:
https://codepen.io/scdehmlow/pen/QWdNGxG

Context

I know that this codepen example functionality can be replicated with a hoverBorder but I have actual hovering logic that is more complicated that I would like to trigger from tooltip or hover events.

Environment

  • Chart.js version: 3.0.0-rc.5
  • Browser name and version: Chrome 89.0.4389.90
  • Link to your project:

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