UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

85 lines (84 loc) 3.09 kB
import { __extends } from "tslib"; import { ColorScaleInterpolationMode_$type } from "./ColorScaleInterpolationMode"; import { IgrColorScale } from "./igr-color-scale"; import { CustomPaletteColorScale } from "./CustomPaletteColorScale"; import { toColorCollection, fromColorCollection, ensureEnum } from "igniteui-react-core"; /** * ColorScale class for selecting a color from a given palette, or interpolating between adjacent colors in that palette. */ var IgrCustomPaletteColorScale = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrCustomPaletteColorScale, _super); function IgrCustomPaletteColorScale(props) { return _super.call(this, props) || this; } IgrCustomPaletteColorScale.prototype.createImplementation = function () { return new CustomPaletteColorScale(); }; Object.defineProperty(IgrCustomPaletteColorScale.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrCustomPaletteColorScale.prototype, "minimumValue", { /** * The lowest value to assign a color. Any given value less than this value will be made Transparent. */ get: function () { return this.i.minimumValue; }, set: function (v) { this.i.minimumValue = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrCustomPaletteColorScale.prototype, "maximumValue", { /** * The highest value to assign a color. Any given value greater than this value will be made Transparent. */ get: function () { return this.i.maximumValue; }, set: function (v) { this.i.maximumValue = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrCustomPaletteColorScale.prototype, "palette", { /** * A list of colors to select from or interpolate between. */ get: function () { return fromColorCollection(this.i.palette); }, set: function (v) { this.i.palette = toColorCollection(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrCustomPaletteColorScale.prototype, "interpolationMode", { /** * The approach to use when getting a color from the palette. */ get: function () { return this.i.interpolationMode; }, set: function (v) { this.i.interpolationMode = ensureEnum(ColorScaleInterpolationMode_$type, v); }, enumerable: false, configurable: true }); IgrCustomPaletteColorScale.prototype.providePalette = function (colors) { this.i.providePalette(colors); }; return IgrCustomPaletteColorScale; }(IgrColorScale)); export { IgrCustomPaletteColorScale };