MCPcopy
hub / github.com/chartjs/Chart.js / getStyle

Method getStyle

src/core/core.datasetController.js:752–757  ·  view source on GitHub ↗

* Returns a set of predefined style properties that should be used to represent the dataset * or the data if the index is specified * @param {number} index - data index * @param {boolean} [active] - true if hover * @return {object} style object

(index, active)

Source from the content-addressed store, hash-verified

750 * @return {object} style object
751 */
752 getStyle(index, active) {
753 const mode = active ? 'active' : 'default';
754 return index === undefined && this._cachedMeta.dataset
755 ? this.resolveDatasetElementOptions(mode)
756 : this.resolveDataElementOptions(index || 0, mode);
757 }
758
759 /**
760 * @protected

Callers 8

_setStyleMethod · 0.95
generateLabelsMethod · 0.80
generateLabelsMethod · 0.80
generateLabelsFunction · 0.80
labelColorFunction · 0.80
labelPointStyleFunction · 0.80

Tested by

no test coverage detected