igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
265 lines (264 loc) • 8.12 kB
JavaScript
import { DataAnnotationItem as DataAnnotationItem_internal } from "./DataAnnotationItem";
import { brushToString, stringToBrush } from "igniteui-react-core";
/**
* Represents a definition of data annotation displayed by the DataAnnotationShapeLayer
*/
var IgrDataAnnotationItem = /** @class */ /*@__PURE__*/ (function () {
function IgrDataAnnotationItem() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgrDataAnnotationItem.prototype.createImplementation = function () {
return new DataAnnotationItem_internal();
};
Object.defineProperty(IgrDataAnnotationItem.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrDataAnnotationItem.prototype.onImplementationCreated = function () {
};
IgrDataAnnotationItem.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
};
Object.defineProperty(IgrDataAnnotationItem.prototype, "dataIndex", {
/**
* Gets data index associated with the annotation
*/
get: function () {
return this.i.dataIndex;
},
set: function (v) {
this.i.dataIndex = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "startLabelX", {
/**
* Gets or sets a label displayed at start annotation shape on x-axis
*/
get: function () {
return this.i.startLabelX;
},
set: function (v) {
this.i.startLabelX = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "startLabelY", {
/**
* Gets or sets a label displayed at start annotation shape on y-axis
*/
get: function () {
return this.i.startLabelY;
},
set: function (v) {
this.i.startLabelY = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "endLabelX", {
/**
* Gets or sets a label displayed at end annotation shape on x-axis
*/
get: function () {
return this.i.endLabelX;
},
set: function (v) {
this.i.endLabelX = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "endLabelY", {
/**
* Gets or sets a label displayed at end annotation shape on y-axis
*/
get: function () {
return this.i.endLabelY;
},
set: function (v) {
this.i.endLabelY = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "centerLabelY", {
/**
* Gets or sets a label displayed at center annotation shape on y-axis
*/
get: function () {
return this.i.centerLabelY;
},
set: function (v) {
this.i.centerLabelY = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "centerLabelX", {
/**
* Gets or sets a label displayed at center annotation shape on x-axis
*/
get: function () {
return this.i.centerLabelX;
},
set: function (v) {
this.i.centerLabelX = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeStartX", {
/**
* Gets X coordinate for the start of annotation shape
*/
get: function () {
return this.i.shapeStartX;
},
set: function (v) {
this.i.shapeStartX = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeStartY", {
/**
* Gets Y coordinate for the start of annotation shape
*/
get: function () {
return this.i.shapeStartY;
},
set: function (v) {
this.i.shapeStartY = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeEndX", {
/**
* Gets X coordinate for the end of annotation shape
*/
get: function () {
return this.i.shapeEndX;
},
set: function (v) {
this.i.shapeEndX = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeEndY", {
/**
* Gets Y coordinate for the end of annotation shape
*/
get: function () {
return this.i.shapeEndY;
},
set: function (v) {
this.i.shapeEndY = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeCenterX", {
/**
* Gets X coordinate for the center of annotation shape
*/
get: function () {
return this.i.shapeCenterX;
},
set: function (v) {
this.i.shapeCenterX = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeCenterY", {
/**
* Gets Y coordinate for the center of annotation shape
*/
get: function () {
return this.i.shapeCenterY;
},
set: function (v) {
this.i.shapeCenterY = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeBrush", {
/**
* Gets or sets fill brush of the annotation shape
*/
get: function () {
return brushToString(this.i.shapeBrush);
},
set: function (v) {
this.i.shapeBrush = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeOutline", {
/**
* Gets or sets outline brush of the annotation shape
*/
get: function () {
return brushToString(this.i.shapeOutline);
},
set: function (v) {
this.i.shapeOutline = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataAnnotationItem.prototype, "shapeThickness", {
/**
* Gets or sets outline thickness of the annotation shape
*/
get: function () {
return this.i.shapeThickness;
},
set: function (v) {
this.i.shapeThickness = +v;
},
enumerable: false,
configurable: true
});
IgrDataAnnotationItem.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
return IgrDataAnnotationItem;
}());
export { IgrDataAnnotationItem };