Skip to content

[BUG] options.hover.animationDuration not respected #4300

Description

@ricardocosta

When the onHover/options.hover.onHover callback invokes _chart.update() the duration of the hover animation is not being respected and it uses the animation.duration value.

Expected Behavior

The duration of the hover animation should be the one provided in options.hover.animationDuration instead of animation.duration.

Current Behavior

The hover animation has the same duration has the initial loading animation.

Possible Solution

When _chart.update() is called, the code enters the bufferedRequest branch in core.controller.js#L772. Therefore, the render method is called with a duration that is not the one provided for the hover effect.

Steps to Reproduce (for bugs)

Example gist: https://gist.github.com/ricardocosta89/f4751f9a73113df32c9be5cda10ddecf

Context

I wish to have a different animation duration for the hover effect.

Environment

  • Chart.js version: 2.6.0
  • Browser name and version: Chrome 58.0.3029.110 (64-bit)
  • Operating System: macOS Sierra 10.12.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions