igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
241 lines (240 loc) • 8.55 kB
JavaScript
import { __extends } from "tslib";
import { IgrSeries } from "./igr-series";
import { FinalValueSelectionMode_$type } from "./FinalValueSelectionMode";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { FinalValueLayer } from "./FinalValueLayer";
import { ensureEnum, brushToString, stringToBrush } from "igniteui-react-core";
/**
* Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
var IgrFinalValueLayer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrFinalValueLayer, _super);
function IgrFinalValueLayer(props) {
return _super.call(this, props) || this;
}
IgrFinalValueLayer.prototype.createImplementation = function () {
return new FinalValueLayer();
};
Object.defineProperty(IgrFinalValueLayer.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "isAnnotationFinalValue", {
/**
* Gets whether the series is final value annotation layer.
*/
get: function () {
return this.i.es;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "targetSeriesName", {
/**
* Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously.
*/
get: function () {
return this.i.aa5;
},
set: function (v) {
this.i.aa5 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "targetSeries", {
/**
* Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
*/
get: function () {
var r = this.i.aaj;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrSeries._createFromInternal(r);
if (e) {
e._implementation = r;
}
r.externalObject = e;
}
return r.externalObject;
},
set: function (v) {
if (v != null && this._stylingContainer && v._styling)
v._styling(this._stylingContainer, this, this);
v == null ? this.i.aaj = null : this.i.aaj = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "finalValueSelectionMode", {
/**
* Gets or sets how to select the final value to annotate.
*/
get: function () {
return this.i.aai;
},
set: function (v) {
this.i.aai = ensureEnum(FinalValueSelectionMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationTextColor", {
/**
* Gets or sets the color to use for the axis annotation text. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.abp);
},
set: function (v) {
this.i.abp = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationBackground", {
/**
* Gets or sets the color to use for the axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.abn);
},
set: function (v) {
this.i.abn = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationBackgroundCornerRadius", {
/**
* Gets or sets the corner radius to use for the axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return this.i.aan;
},
set: function (v) {
this.i.aan = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationInterpolatedValuePrecision", {
/**
* Gets or sets the precision to use displaying values for interpolated crosshair positions.
*/
get: function () {
return this.i.aat;
},
set: function (v) {
this.i.aat = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationOutline", {
/**
* Gets or sets the color to use for the axis annotation outline. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.abo);
},
set: function (v) {
this.i.abo = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingLeft", {
/**
* Gets or sets the left padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
*/
get: function () {
return this.i.aap;
},
set: function (v) {
this.i.aap = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingTop", {
/**
* Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
*/
get: function () {
return this.i.aar;
},
set: function (v) {
this.i.aar = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingRight", {
/**
* Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
*/
get: function () {
return this.i.aaq;
},
set: function (v) {
this.i.aaq = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingBottom", {
/**
* Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
*/
get: function () {
return this.i.aao;
},
set: function (v) {
this.i.aao = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationStrokeThickness", {
/**
* Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return this.i.aas;
},
set: function (v) {
this.i.aas = +v;
},
enumerable: false,
configurable: true
});
IgrFinalValueLayer.prototype.findByName = function (name) {
var baseResult = _super.prototype.findByName.call(this, name);
if (baseResult) {
return baseResult;
}
if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
return this.targetSeries;
}
return null;
};
IgrFinalValueLayer.prototype._styling = function (container, component, parent) {
_super.prototype._styling.call(this, container, component, parent);
this._inStyling = true;
if (this.targetSeries && this.targetSeries._styling) {
this.targetSeries._styling(container, component, this);
}
this._inStyling = false;
};
return IgrFinalValueLayer;
}(IgrAnnotationLayer));
export { IgrFinalValueLayer };