Skip to content

PR #856 breaks backward compatibility #1112

Description

@bduddie

@tannerlinsley @fulldecent

I believe the change merged in #856 actually breaks compatibility with the currently documented method of updating your chart dynamically. In short, if you update the chart data at chart.datasets[i].points[j].value, as currently documented, but do not change the data object passed to the chart constructor, your modifications get reset when you call chart.update().

Here are two JS Bin examples that show the issue, using code that is almost entirely copied and pasted from the docs.

  1. Using v1.0.2, one data point updates every second as expected: JS Bin
  2. Using the latest code, calling chart.update() overwrites the change made to myLineChart.datasets[0].points[2].value: JS Bin

IMO what #856 is intending to do is a worthwhile usability improvement, but it should be implemented in a way that does not impact existing usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions