| 232 | && {keys: getSortedDatasetIndices(chart, true), values: null}; |
| 233 | |
| 234 | export default class DatasetController { |
| 235 | |
| 236 | /** |
| 237 | * @type {any} |
| 238 | */ |
| 239 | static defaults = {}; |
| 240 | |
| 241 | /** |
| 242 | * Element type used to generate a meta dataset (e.g. Chart.element.LineElement). |
| 243 | */ |
| 244 | static datasetElementType = null; |
| 245 | |
| 246 | /** |
| 247 | * Element type used to generate a meta data (e.g. Chart.element.PointElement). |
| 248 | */ |
| 249 | static dataElementType = null; |
| 250 | |
| 251 | /** |
| 252 | * @param {Chart} chart |
| 253 | * @param {number} datasetIndex |
| 254 | */ |
| 255 | constructor(chart, datasetIndex) { |
| 256 | this.chart = chart; |
| 257 | this._ctx = chart.ctx; |
| 258 | this.index = datasetIndex; |
| 259 | this._cachedDataOpts = {}; |
| 260 | this._cachedMeta = this.getMeta(); |
| 261 | this._type = this._cachedMeta.type; |
| 262 | this.options = undefined; |
| 263 | /** @type {boolean | object} */ |
| 264 | this._parsing = false; |
| 265 | this._data = undefined; |
| 266 | this._objectData = undefined; |
| 267 | this._sharedOptions = undefined; |
| 268 | this._drawStart = undefined; |
| 269 | this._drawCount = undefined; |
| 270 | this.enableOptionSharing = false; |
| 271 | this.supportsDecimation = false; |
| 272 | this.$context = undefined; |
| 273 | this._syncList = []; |
| 274 | this.datasetElementType = new.target.datasetElementType; |
| 275 | this.dataElementType = new.target.dataElementType; |
| 276 | |
| 277 | this.initialize(); |
| 278 | } |
| 279 | |
| 280 | initialize() { |
| 281 | const meta = this._cachedMeta; |
| 282 | this.configure(); |
| 283 | this.linkScales(); |
| 284 | meta._stacked = isStacked(meta.vScale, meta); |
| 285 | this.addElements(); |
| 286 | |
| 287 | if (this.options.fill && !this.chart.isPluginEnabled('filler')) { |
| 288 | console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options"); |
| 289 | } |
| 290 | } |
| 291 |
nothing calls this directly
no outgoing calls
no test coverage detected