UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

242 lines (241 loc) 8.05 kB
import { DataAnnotationDisplayMode_$type } from "./DataAnnotationDisplayMode"; import { OverlayTextLocation_$type } from "./OverlayTextLocation"; import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode"; import { IgxUserAxisAnnotation } from "./igx-user-axis-annotation"; import { ensureEnum, brushToString, stringToBrush, ensureBool } from "igniteui-angular-core"; import { FontInfo } from "igniteui-angular-core"; /** * Represents base class for rendering an annotation with shape of slice of strip */ export class IgxUserShapeAnnotation extends IgxUserAxisAnnotation { constructor() { super(); } /** * @hidden */ get i() { return this._implementation; } /** * Gets or sets display mode of label in the center annotation. */ get valueDisplayMode() { return this.i.valueDisplayMode; } set valueDisplayMode(v) { this.i.valueDisplayMode = ensureEnum(DataAnnotationDisplayMode_$type, v); } /** * Gets or sets background of the annotation shape displayed in the plot area of the chart. */ get shapeBackground() { return brushToString(this.i.shapeBackground); } set shapeBackground(v) { this.i.shapeBackground = stringToBrush(v); } /** * Gets or sets border color of the annotation shape displayed in the plot area of the chart. */ get shapeOutline() { return brushToString(this.i.shapeOutline); } set shapeOutline(v) { this.i.shapeOutline = stringToBrush(v); } /** * Gets or sets border thickness of the annotation shape displayed in the plot area of the chart. */ get shapeThickness() { return this.i.shapeThickness; } set shapeThickness(v) { this.i.shapeThickness = +v; } /** * Gets or sets the text that should be overlayed in plot area of the chart. */ get overlayText() { return this.i.overlayText; } set overlayText(v) { this.i.overlayText = v; } /** * Gets or sets location of the overlay text in relation to the annotation shape. */ get overlayTextLocation() { return this.i.overlayTextLocation; } set overlayTextLocation(v) { this.i.overlayTextLocation = ensureEnum(OverlayTextLocation_$type, v); } /** * Gets or sets the horizontal margin of the overlay text in relation to the annotation shape. */ get overlayTextHorizontalMargin() { return this.i.overlayTextHorizontalMargin; } set overlayTextHorizontalMargin(v) { this.i.overlayTextHorizontalMargin = +v; } /** * Gets or sets the vertical margin of the overlay text in relation to the annotation shape. */ get overlayTextVerticalMargin() { return this.i.overlayTextVerticalMargin; } set overlayTextVerticalMargin(v) { this.i.overlayTextVerticalMargin = +v; } /** * Gets or sets the horizontal padding of the overlay text in relation to the annotation shape. */ get overlayTextHorizontalPadding() { return this.i.overlayTextHorizontalPadding; } set overlayTextHorizontalPadding(v) { this.i.overlayTextHorizontalPadding = +v; } /** * Gets or sets the vertical padding of the overlay text in relation to the annotation shape. */ get overlayTextVerticalPadding() { return this.i.overlayTextVerticalPadding; } set overlayTextVerticalPadding(v) { this.i.overlayTextVerticalPadding = +v; } /** * Gets or sets the angle rotation (in degrees) of the overlay text in relation to the annotation shape. */ get overlayTextAngle() { return this.i.overlayTextAngle; } set overlayTextAngle(v) { this.i.overlayTextAngle = +v; } /** * Gets or sets the color the overlay text. */ get overlayTextColor() { return brushToString(this.i.overlayTextColor); } set overlayTextColor(v) { this.i.overlayTextColor = stringToBrush(v); } /** * 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 overlayTextColorShift() { return this.i.overlayTextColorShift; } set overlayTextColorShift(v) { this.i.overlayTextColorShift = +v; } /** * Gets or sets the mode used for shifting the background of overlay text. */ get overlayTextColorMode() { return this.i.overlayTextColorMode; } set overlayTextColorMode(v) { this.i.overlayTextColorMode = ensureEnum(AnnotationAppearanceMode_$type, v); } /** * Gets or sets the background the overlay text. */ get overlayTextBackground() { return brushToString(this.i.overlayTextBackground); } set overlayTextBackground(v) { this.i.overlayTextBackground = stringToBrush(v); } /** * 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 overlayTextBackgroundShift() { return this.i.overlayTextBackgroundShift; } set overlayTextBackgroundShift(v) { this.i.overlayTextBackgroundShift = +v; } /** * Gets or sets the mode used for shifting the background of overlay text. */ get overlayTextBackgroundMode() { return this.i.overlayTextBackgroundMode; } set overlayTextBackgroundMode(v) { this.i.overlayTextBackgroundMode = ensureEnum(AnnotationAppearanceMode_$type, v); } /** * Gets or sets the border color of the overlay text. */ get overlayTextBorderColor() { return brushToString(this.i.overlayTextBorderColor); } set overlayTextBorderColor(v) { this.i.overlayTextBorderColor = stringToBrush(v); } /** * Gets or sets the border radius corner of the overlay text. */ get overlayTextBorderRadius() { return this.i.overlayTextBorderRadius; } set overlayTextBorderRadius(v) { this.i.overlayTextBorderRadius = +v; } /** * Gets or sets the border thickness of the overlay text. */ get overlayTextBorderThickness() { return this.i.overlayTextBorderThickness; } set overlayTextBorderThickness(v) { this.i.overlayTextBorderThickness = +v; } /** * 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 overlayTextBorderShift() { return this.i.overlayTextBorderShift; } set overlayTextBorderShift(v) { this.i.overlayTextBorderShift = +v; } /** * Gets or sets the mode used for shifting the border of overlay text. */ get overlayTextBorderMode() { return this.i.overlayTextBorderMode; } set overlayTextBorderMode(v) { this.i.overlayTextBorderMode = ensureEnum(AnnotationAppearanceMode_$type, v); } /** * Gets or sets whether the overlay text is visible in plot area of the chart */ get overlayTextVisible() { return this.i.overlayTextVisible; } set overlayTextVisible(v) { this.i.overlayTextVisible = ensureBool(v); } /** * Gets or Sets the style to use for the display text. */ get overlayTextStyle() { if (this.i.overlayTextStyle == null) { return null; } return this.i.overlayTextStyle.fontString; } set overlayTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.overlayTextStyle = fi; } }