UNPKG

igniteui-angular-charts

Version:

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

342 lines (341 loc) 9.05 kB
import { DataAnnotationInfo as DataAnnotationInfo_internal } from "./DataAnnotationInfo"; import { ensureBool, brushToString, stringToBrush } from "igniteui-angular-core"; /** * Represents data annotation */ export class IgxDataAnnotationInfo { constructor() { this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } createImplementation() { return new DataAnnotationInfo_internal(); } /** * @hidden */ get i() { return this._implementation; } onImplementationCreated() { } _provideImplementation(i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); } get xAxisPixel() { return this.i.xAxisPixel; } set xAxisPixel(v) { this.i.xAxisPixel = +v; } get yAxisPixel() { return this.i.yAxisPixel; } set yAxisPixel(v) { this.i.yAxisPixel = +v; } get xAxisWindow() { return this.i.xAxisWindow; } set xAxisWindow(v) { this.i.xAxisWindow = +v; } get yAxisWindow() { return this.i.yAxisWindow; } set yAxisWindow(v) { this.i.yAxisWindow = +v; } get xAxisValue() { return this.i.xAxisValue; } set xAxisValue(v) { this.i.xAxisValue = +v; } get yAxisValue() { return this.i.yAxisValue; } set yAxisValue(v) { this.i.yAxisValue = +v; } get dataIndex() { return this.i.dataIndex; } set dataIndex(v) { this.i.dataIndex = +v; } get dataValueX() { return this.i.dataValueX; } set dataValueX(v) { this.i.dataValueX = +v; } get dataValueY() { return this.i.dataValueY; } set dataValueY(v) { this.i.dataValueY = +v; } get dataLabelX() { return this.i.dataLabelX; } set dataLabelX(v) { this.i.dataLabelX = v; } get dataLabelY() { return this.i.dataLabelY; } set dataLabelY(v) { this.i.dataLabelY = v; } get xAxisLabel() { return this.i.xAxisLabel; } set xAxisLabel(v) { this.i.xAxisLabel = v; } get yAxisLabel() { return this.i.yAxisLabel; } set yAxisLabel(v) { this.i.yAxisLabel = v; } get isStartLabel() { return this.i.isStartLabel; } set isStartLabel(v) { this.i.isStartLabel = ensureBool(v); } get isEndLabel() { return this.i.isEndLabel; } set isEndLabel(v) { this.i.isEndLabel = ensureBool(v); } get isCenterLabel() { return this.i.isCenterLabel; } set isCenterLabel(v) { this.i.isCenterLabel = ensureBool(v); } get textColor() { return brushToString(this.i.textColor); } set textColor(v) { this.i.textColor = stringToBrush(v); } get background() { return brushToString(this.i.background); } set background(v) { this.i.background = stringToBrush(v); } get borderColor() { return brushToString(this.i.borderColor); } set borderColor(v) { this.i.borderColor = stringToBrush(v); } get borderRadius() { return this.i.borderRadius; } set borderRadius(v) { this.i.borderRadius = +v; } get borderThickness() { return this.i.borderThickness; } set borderThickness(v) { this.i.borderThickness = +v; } /** * Sets the x axis badge background color. */ get xAxisBadgeBackground() { return brushToString(this.i.xAxisBadgeBackground); } set xAxisBadgeBackground(v) { this.i.xAxisBadgeBackground = stringToBrush(v); } /** * Sets the y axis badge background color. */ get yAxisBadgeBackground() { return brushToString(this.i.yAxisBadgeBackground); } set yAxisBadgeBackground(v) { this.i.yAxisBadgeBackground = stringToBrush(v); } /** * Sets the x axis badge border color. */ get xAxisBadgeOutline() { return brushToString(this.i.xAxisBadgeOutline); } set xAxisBadgeOutline(v) { this.i.xAxisBadgeOutline = stringToBrush(v); } /** * Sets the y axis badge border color. */ get yAxisBadgeOutline() { return brushToString(this.i.yAxisBadgeOutline); } set yAxisBadgeOutline(v) { this.i.yAxisBadgeOutline = stringToBrush(v); } /** * Sets the x axis badge border radius. */ get xAxisBadgeRadius() { return this.i.xAxisBadgeRadius; } set xAxisBadgeRadius(v) { this.i.xAxisBadgeRadius = +v; } /** * Sets the y axis badge border radius. */ get yAxisBadgeRadius() { return this.i.yAxisBadgeRadius; } set yAxisBadgeRadius(v) { this.i.yAxisBadgeRadius = +v; } /** * Sets the x axis badge border thickness. */ get xAxisBadgeOutlineThickness() { return this.i.xAxisBadgeOutlineThickness; } set xAxisBadgeOutlineThickness(v) { this.i.xAxisBadgeOutlineThickness = +v; } /** * Sets the y axis badge border thickness. */ get yAxisBadgeOutlineThickness() { return this.i.yAxisBadgeOutlineThickness; } set yAxisBadgeOutlineThickness(v) { this.i.yAxisBadgeOutlineThickness = +v; } /** * Sets the margin between the x axis badge and annotation text. */ get xAxisBadgeMargin() { return this.i.xAxisBadgeMargin; } set xAxisBadgeMargin(v) { this.i.xAxisBadgeMargin = +v; } /** * Sets the margin between the y axis badge and annotation text. */ get yAxisBadgeMargin() { return this.i.yAxisBadgeMargin; } set yAxisBadgeMargin(v) { this.i.yAxisBadgeMargin = +v; } /** * Sets the size of the x axis badge. */ get xAxisBadgeSize() { return this.i.xAxisBadgeSize; } set xAxisBadgeSize(v) { this.i.xAxisBadgeSize = +v; } /** * Sets the size of the y axis badge. */ get yAxisBadgeSize() { return this.i.yAxisBadgeSize; } set yAxisBadgeSize(v) { this.i.yAxisBadgeSize = +v; } /** * Sets the path to an image to use in the x axis badge. */ get xAxisBadgeImagePath() { return this.i.xAxisBadgeImagePath; } set xAxisBadgeImagePath(v) { this.i.xAxisBadgeImagePath = v; } /** * Sets the path to an image to use in the y axis badge. */ get yAxisBadgeImagePath() { return this.i.yAxisBadgeImagePath; } set yAxisBadgeImagePath(v) { this.i.yAxisBadgeImagePath = v; } /** * Sets whether the x axis badge is enabled or not. */ get isXAxisBadgeEnabled() { return this.i.isXAxisBadgeEnabled; } set isXAxisBadgeEnabled(v) { this.i.isXAxisBadgeEnabled = ensureBool(v); } /** * Sets whether the y axis badge is enabled or not. */ get isYAxisBadgeEnabled() { return this.i.isYAxisBadgeEnabled; } set isYAxisBadgeEnabled(v) { this.i.isYAxisBadgeEnabled = ensureBool(v); } /** * Sets whether the x axis badge is enabled or not. */ get xAxisUserAnnotation() { const r = this.i.xAxisUserAnnotation; if (r == null) { return null; } return r.externalObject; } set xAxisUserAnnotation(v) { v == null ? this.i.xAxisUserAnnotation = null : this.i.xAxisUserAnnotation = v.i; } /** * Sets whether the y axis badge is enabled or not. */ get yAxisUserAnnotation() { const r = this.i.yAxisUserAnnotation; if (r == null) { return null; } return r.externalObject; } set yAxisUserAnnotation(v) { v == null ? this.i.yAxisUserAnnotation = null : this.i.yAxisUserAnnotation = v.i; } findByName(name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.xAxisUserAnnotation && this.xAxisUserAnnotation.name && this.xAxisUserAnnotation.name == name) { return this.xAxisUserAnnotation; } if (this.yAxisUserAnnotation && this.yAxisUserAnnotation.name && this.yAxisUserAnnotation.name == name) { return this.yAxisUserAnnotation; } return null; } }