UNPKG

igniteui-react-charts

Version:

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

191 lines (190 loc) 4.71 kB
import { DataAnnotationItem as DataAnnotationItem_internal } from "./DataAnnotationItem"; import { brushToString, stringToBrush } from "igniteui-react-core"; /** * Represents a definition of data annotation displayed by the DataAnnotationShapeLayer */ export class IgrDataAnnotationItem { createImplementation() { return new DataAnnotationItem_internal(); } get nativeElement() { return this._implementation.nativeElement; } /** * @hidden */ get i() { return this._implementation; } onImplementationCreated() { } constructor() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } _provideImplementation(i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } /** * Gets data index associated with the annotation */ get dataIndex() { return this.i.dataIndex; } set dataIndex(v) { this.i.dataIndex = +v; } /** * Gets or sets a label displayed at start annotation shape on x-axis */ get startLabelX() { return this.i.startLabelX; } set startLabelX(v) { this.i.startLabelX = v; } /** * Gets or sets a label displayed at start annotation shape on y-axis */ get startLabelY() { return this.i.startLabelY; } set startLabelY(v) { this.i.startLabelY = v; } /** * Gets or sets a label displayed at end annotation shape on x-axis */ get endLabelX() { return this.i.endLabelX; } set endLabelX(v) { this.i.endLabelX = v; } /** * Gets or sets a label displayed at end annotation shape on y-axis */ get endLabelY() { return this.i.endLabelY; } set endLabelY(v) { this.i.endLabelY = v; } /** * Gets or sets a label displayed at center annotation shape on y-axis */ get centerLabelY() { return this.i.centerLabelY; } set centerLabelY(v) { this.i.centerLabelY = v; } /** * Gets or sets a label displayed at center annotation shape on x-axis */ get centerLabelX() { return this.i.centerLabelX; } set centerLabelX(v) { this.i.centerLabelX = v; } /** * Gets X coordinate for the start of annotation shape */ get shapeStartX() { return this.i.shapeStartX; } set shapeStartX(v) { this.i.shapeStartX = +v; } /** * Gets Y coordinate for the start of annotation shape */ get shapeStartY() { return this.i.shapeStartY; } set shapeStartY(v) { this.i.shapeStartY = +v; } /** * Gets X coordinate for the end of annotation shape */ get shapeEndX() { return this.i.shapeEndX; } set shapeEndX(v) { this.i.shapeEndX = +v; } /** * Gets Y coordinate for the end of annotation shape */ get shapeEndY() { return this.i.shapeEndY; } set shapeEndY(v) { this.i.shapeEndY = +v; } /** * Gets X coordinate for the center of annotation shape */ get shapeCenterX() { return this.i.shapeCenterX; } set shapeCenterX(v) { this.i.shapeCenterX = +v; } /** * Gets Y coordinate for the center of annotation shape */ get shapeCenterY() { return this.i.shapeCenterY; } set shapeCenterY(v) { this.i.shapeCenterY = +v; } /** * Gets or sets fill brush of the annotation shape */ get shapeBrush() { return brushToString(this.i.shapeBrush); } set shapeBrush(v) { this.i.shapeBrush = stringToBrush(v); } /** * Gets or sets outline brush of the annotation shape */ get shapeOutline() { return brushToString(this.i.shapeOutline); } set shapeOutline(v) { this.i.shapeOutline = stringToBrush(v); } /** * Gets or sets outline thickness of the annotation shape */ get shapeThickness() { return this.i.shapeThickness; } set shapeThickness(v) { this.i.shapeThickness = +v; } findByName(name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; } }