(mode)
| 64 | } |
| 65 | |
| 66 | update(mode) { |
| 67 | const meta = this._cachedMeta; |
| 68 | const {data: points = []} = meta; |
| 69 | // @ts-ignore |
| 70 | const animationsDisabled = this.chart._animationsDisabled; |
| 71 | let {start, count} = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled); |
| 72 | |
| 73 | this._drawStart = start; |
| 74 | this._drawCount = count; |
| 75 | |
| 76 | if (_scaleRangesChanged(meta)) { |
| 77 | start = 0; |
| 78 | count = points.length; |
| 79 | } |
| 80 | |
| 81 | if (this.options.showLine) { |
| 82 | |
| 83 | // https://github.com/chartjs/Chart.js/issues/11333 |
| 84 | if (!this.datasetElementType) { |
| 85 | this.addElements(); |
| 86 | } |
| 87 | const {dataset: line, _dataset} = meta; |
| 88 | |
| 89 | // Update Line |
| 90 | line._chart = this.chart; |
| 91 | line._datasetIndex = this.index; |
| 92 | line._decimated = !!_dataset._decimated; |
| 93 | line.points = points; |
| 94 | |
| 95 | const options = this.resolveDatasetElementOptions(mode); |
| 96 | options.segment = this.options.segment; |
| 97 | this.updateElement(line, undefined, { |
| 98 | animated: !animationsDisabled, |
| 99 | options |
| 100 | }, mode); |
| 101 | } else if (this.datasetElementType) { |
| 102 | // https://github.com/chartjs/Chart.js/issues/11333 |
| 103 | delete meta.dataset; |
| 104 | this.datasetElementType = false; |
| 105 | } |
| 106 | |
| 107 | // Update Points |
| 108 | this.updateElements(points, start, count, mode); |
| 109 | } |
| 110 | |
| 111 | addElements() { |
| 112 | const {showLine} = this.options; |
nothing calls this directly
no test coverage detected