()
| 297 | } |
| 298 | |
| 299 | linkScales() { |
| 300 | const chart = this.chart; |
| 301 | const meta = this._cachedMeta; |
| 302 | const dataset = this.getDataset(); |
| 303 | |
| 304 | const chooseId = (axis, x, y, r) => axis === 'x' ? x : axis === 'r' ? r : y; |
| 305 | |
| 306 | const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x')); |
| 307 | const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y')); |
| 308 | const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r')); |
| 309 | const indexAxis = meta.indexAxis; |
| 310 | const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid); |
| 311 | const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid); |
| 312 | meta.xScale = this.getScaleForId(xid); |
| 313 | meta.yScale = this.getScaleForId(yid); |
| 314 | meta.rScale = this.getScaleForId(rid); |
| 315 | meta.iScale = this.getScaleForId(iid); |
| 316 | meta.vScale = this.getScaleForId(vid); |
| 317 | } |
| 318 | |
| 319 | getDataset() { |
| 320 | return this.chart.data.datasets[this.index]; |
no test coverage detected