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