UNPKG

igniteui-react-charts

Version:

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

346 lines (345 loc) 12.2 kB
import { __extends } from "tslib"; import { DataAnnotationDisplayMode_$type } from "./DataAnnotationDisplayMode"; import { OverlayTextLocation_$type } from "./OverlayTextLocation"; import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode"; import { IgrUserAxisAnnotation } from "./igr-user-axis-annotation"; import { ensureEnum, brushToString, stringToBrush, ensureBool } from "igniteui-react-core"; import { FontInfo } from "igniteui-react-core"; /** * Represents base class for rendering an annotation with shape of slice of strip */ var IgrUserShapeAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrUserShapeAnnotation, _super); function IgrUserShapeAnnotation() { return _super.call(this) || this; } Object.defineProperty(IgrUserShapeAnnotation.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "valueDisplayMode", { /** * Gets or sets display mode of label in the center annotation. */ get: function () { return this.i.valueDisplayMode; }, set: function (v) { this.i.valueDisplayMode = ensureEnum(DataAnnotationDisplayMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "shapeBackground", { /** * Gets or sets background of the annotation shape displayed in the plot area of the chart. */ get: function () { return brushToString(this.i.shapeBackground); }, set: function (v) { this.i.shapeBackground = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "shapeOutline", { /** * Gets or sets border color of the annotation shape displayed in the plot area of the chart. */ get: function () { return brushToString(this.i.shapeOutline); }, set: function (v) { this.i.shapeOutline = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "shapeThickness", { /** * Gets or sets border thickness of the annotation shape displayed in the plot area of the chart. */ get: function () { return this.i.shapeThickness; }, set: function (v) { this.i.shapeThickness = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayText", { /** * Gets or sets the text that should be overlayed in plot area of the chart. */ get: function () { return this.i.overlayText; }, set: function (v) { this.i.overlayText = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextLocation", { /** * Gets or sets location of the overlay text in relation to the annotation shape. */ get: function () { return this.i.overlayTextLocation; }, set: function (v) { this.i.overlayTextLocation = ensureEnum(OverlayTextLocation_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextHorizontalMargin", { /** * Gets or sets the horizontal margin of the overlay text in relation to the annotation shape. */ get: function () { return this.i.overlayTextHorizontalMargin; }, set: function (v) { this.i.overlayTextHorizontalMargin = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextVerticalMargin", { /** * Gets or sets the vertical margin of the overlay text in relation to the annotation shape. */ get: function () { return this.i.overlayTextVerticalMargin; }, set: function (v) { this.i.overlayTextVerticalMargin = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextHorizontalPadding", { /** * Gets or sets the horizontal padding of the overlay text in relation to the annotation shape. */ get: function () { return this.i.overlayTextHorizontalPadding; }, set: function (v) { this.i.overlayTextHorizontalPadding = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextVerticalPadding", { /** * Gets or sets the vertical padding of the overlay text in relation to the annotation shape. */ get: function () { return this.i.overlayTextVerticalPadding; }, set: function (v) { this.i.overlayTextVerticalPadding = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextAngle", { /** * Gets or sets the angle rotation (in degrees) of the overlay text in relation to the annotation shape. */ get: function () { return this.i.overlayTextAngle; }, set: function (v) { this.i.overlayTextAngle = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextColor", { /** * Gets or sets the color the overlay text. */ get: function () { return brushToString(this.i.overlayTextColor); }, set: function (v) { this.i.overlayTextColor = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextColorShift", { /** * Gets or sets the shift of the overlay text color based on OverlayTextColorMode. Value must range between -1.0 to 1.0, where 0 means no color shift. */ get: function () { return this.i.overlayTextColorShift; }, set: function (v) { this.i.overlayTextColorShift = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextColorMode", { /** * Gets or sets the mode used for shifting the background of overlay text. */ get: function () { return this.i.overlayTextColorMode; }, set: function (v) { this.i.overlayTextColorMode = ensureEnum(AnnotationAppearanceMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBackground", { /** * Gets or sets the background the overlay text. */ get: function () { return brushToString(this.i.overlayTextBackground); }, set: function (v) { this.i.overlayTextBackground = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBackgroundShift", { /** * Gets or sets the shift of the overlay background based on OverlayTextBackgroundMode. Value must range between -1.0 to 1.0, where 0 means no color shift. */ get: function () { return this.i.overlayTextBackgroundShift; }, set: function (v) { this.i.overlayTextBackgroundShift = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBackgroundMode", { /** * Gets or sets the mode used for shifting the background of overlay text. */ get: function () { return this.i.overlayTextBackgroundMode; }, set: function (v) { this.i.overlayTextBackgroundMode = ensureEnum(AnnotationAppearanceMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBorderColor", { /** * Gets or sets the border color of the overlay text. */ get: function () { return brushToString(this.i.overlayTextBorderColor); }, set: function (v) { this.i.overlayTextBorderColor = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBorderRadius", { /** * Gets or sets the border radius corner of the overlay text. */ get: function () { return this.i.overlayTextBorderRadius; }, set: function (v) { this.i.overlayTextBorderRadius = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBorderThickness", { /** * Gets or sets the border thickness of the overlay text. */ get: function () { return this.i.overlayTextBorderThickness; }, set: function (v) { this.i.overlayTextBorderThickness = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBorderShift", { /** * Gets or sets the shift of the overlay border based on OverlayTextBorderMode. Value must range between -1.0 to 1.0, where 0 means no color shift. */ get: function () { return this.i.overlayTextBorderShift; }, set: function (v) { this.i.overlayTextBorderShift = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextBorderMode", { /** * Gets or sets the mode used for shifting the border of overlay text. */ get: function () { return this.i.overlayTextBorderMode; }, set: function (v) { this.i.overlayTextBorderMode = ensureEnum(AnnotationAppearanceMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextVisible", { /** * Gets or sets whether the overlay text is visible in plot area of the chart */ get: function () { return this.i.overlayTextVisible; }, set: function (v) { this.i.overlayTextVisible = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserShapeAnnotation.prototype, "overlayTextStyle", { /** * Gets or Sets the style to use for the display text. */ get: function () { if (this.i.overlayTextStyle == null) { return null; } return this.i.overlayTextStyle.fontString; }, set: function (v) { var fi = new FontInfo(); fi.fontString = v; this.i.overlayTextStyle = fi; }, enumerable: false, configurable: true }); return IgrUserShapeAnnotation; }(IgrUserAxisAnnotation)); export { IgrUserShapeAnnotation };