mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Shrink _parsed to match if dataset shrinks (#6826)
This commit is contained in:
parent
dc4cff748f
commit
6f6005d7b8
@ -955,6 +955,7 @@ helpers.extend(DatasetController.prototype, {
|
||||
me.insertElements(numMeta, numData - numMeta);
|
||||
} else if (numData < numMeta) {
|
||||
meta.data.splice(numData, numMeta - numData);
|
||||
meta._parsed.splice(numData, numMeta - numData);
|
||||
me._parse(0, numData);
|
||||
} else if (changed) {
|
||||
me._parse(0, numData);
|
||||
|
||||
@ -722,6 +722,7 @@ describe('Chart.controllers.bar', function() {
|
||||
chart.update();
|
||||
|
||||
expect(meta.data.length).toBe(2);
|
||||
expect(meta._parsed.length).toBe(2);
|
||||
|
||||
[
|
||||
{x: 89, y: 512},
|
||||
|
||||
@ -197,7 +197,7 @@ describe('Chart.controllers.line', function() {
|
||||
chart.update();
|
||||
|
||||
expect(meta.data.length).toBe(2);
|
||||
|
||||
expect(meta._parsed.length).toBe(2);
|
||||
|
||||
[
|
||||
{x: 0, y: 512},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user