igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
321 lines (320 loc) • 9.6 kB
JavaScript
import { brushToString, ensureBool, stringToBrush } from "igniteui-react-core";
import { TypeRegistrar } from "igniteui-react-core";
/**
* Represents base class for all user annotations, e.g. UserPointAnnotation, UserSliceAnnotation, UserStripAnnotation, UserAxisAnnotation
*/
var IgrUserBaseAnnotation = /** @class */ /*@__PURE__*/ (function () {
function IgrUserBaseAnnotation() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgrUserBaseAnnotation.prototype.createImplementation = function () {
return null;
};
Object.defineProperty(IgrUserBaseAnnotation.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
} /**
* @hidden
*/,
enumerable: false,
configurable: true
});
IgrUserBaseAnnotation._createFromInternal = function (internal) {
if (!internal) {
return null;
}
if (!internal.$type) {
return null;
}
var name = internal.$type.name;
var externalName = "Igr" + name;
if (!TypeRegistrar.isRegistered(externalName)) {
return null;
}
return TypeRegistrar.create(externalName);
};
IgrUserBaseAnnotation.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
};
IgrUserBaseAnnotation.prototype.onImplementationCreated = function () {
};
Object.defineProperty(IgrUserBaseAnnotation.prototype, "identifier", {
get: function () {
return this.i.an;
},
set: function (v) {
this.i.an = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "label", {
/**
* Gets or sets the text that should be displayed on axis annotation.
*/
get: function () {
return this.i.aq;
},
set: function (v) {
this.i.aq = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "annotationData", {
/**
* Gets or sets the additional data that should be stored with the annotation.
*/
get: function () {
return this.i.ac;
},
set: function (v) {
this.i.ac = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "isVisible", {
/**
* Gets or sets whether to the annotations is rendered
*/
get: function () {
return this.i.s;
},
set: function (v) {
this.i.s = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "labelColor", {
/**
* Gets or sets the color of text displayed in the annotation.
*/
get: function () {
return brushToString(this.i.bo);
},
set: function (v) {
this.i.bo = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "labelBackground", {
/**
* Gets or sets the background text displayed in the annotation.
*/
get: function () {
return brushToString(this.i.bm);
},
set: function (v) {
this.i.bm = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "labelBorderColor", {
/**
* Gets or sets the border color of the axis annotation.
*/
get: function () {
return brushToString(this.i.bn);
},
set: function (v) {
this.i.bn = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "labelBorderThickness", {
/**
* Gets or sets border thickness of the axis annotations.
*/
get: function () {
return this.i.y;
},
set: function (v) {
this.i.y = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "labelBorderRadius", {
/**
* Gets or sets the border radius of the annotation.
*/
get: function () {
return this.i.x;
},
set: function (v) {
this.i.x = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "labelPadding", {
/**
* Gets or sets padding around the label in annotation.
*/
get: function () {
return this.i.z;
},
set: function (v) {
this.i.z = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeVisible", {
/**
* Gets or sets whether to draw the badge in annotation
*/
get: function () {
return this.i.p;
},
set: function (v) {
this.i.p = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeBackground", {
/**
* Gets or sets the background of badge annotation.
*/
get: function () {
return brushToString(this.i.bk);
},
set: function (v) {
this.i.bk = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeOutline", {
/**
* Gets or sets the outline of badge annotation.
*/
get: function () {
return brushToString(this.i.bl);
},
set: function (v) {
this.i.bl = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeThickness", {
/**
* Gets or sets thickness of the badge annotations.
*/
get: function () {
return this.i.w;
},
set: function (v) {
this.i.w = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeSize", {
/**
* Gets or sets size of the badge annotations.
*/
get: function () {
return this.i.v;
},
set: function (v) {
this.i.v = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeCornerRadius", {
/**
* Gets or sets border radius of the badge annotations.
*/
get: function () {
return this.i.t;
},
set: function (v) {
this.i.t = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeMargin", {
/**
* Gets or sets margin of the badge annotations.
*/
get: function () {
return this.i.u;
},
set: function (v) {
this.i.u = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "badgeImagePath", {
/**
* Gets or sets image path for displayed in the badge annotations.
*/
get: function () {
return this.i.ag;
},
set: function (v) {
this.i.ag = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrUserBaseAnnotation.prototype, "isPillShaped", {
/**
* Gets or sets whether the annotation is pill shaped.
*/
get: function () {
return this.i.r;
},
set: function (v) {
this.i.r = ensureBool(v);
},
enumerable: false,
configurable: true
});
IgrUserBaseAnnotation.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
IgrUserBaseAnnotation.prototype.bindAxes = function (axes) {
};
IgrUserBaseAnnotation.prototype.bindSeries = function (series) {
};
return IgrUserBaseAnnotation;
}());
export { IgrUserBaseAnnotation };