igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
991 lines (990 loc) • 36.7 kB
JavaScript
import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { ValueLayerValueMode_$type } from "./ValueLayerValueMode";
import { IgcSeriesComponent } from "./igc-series-component";
import { IgcAxisComponent } from "./igc-axis-component";
import { OverlayTextLocation_$type } from "./OverlayTextLocation";
import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode";
import { IgcOverlayTextUpdatingEventArgs } from "./igc-overlay-text-updating-event-args";
import { IgcAnnotationLayerComponent } from "./igc-annotation-layer-component";
import { ValueLayer } from "./ValueLayer";
import { getAllPropertyNames, toSpinal, ensureBool, ensureEnum, enumToString, brushToString, stringToBrush, toPoint } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
import { FontInfo } from "igniteui-webcomponents-core";
/**
* Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
export var IgcValueLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcValueLayerComponent, _super);
function IgcValueLayerComponent() {
var _this = _super.call(this) || this;
_this._targetSeriesName = null;
_this._targetAxisName = null;
_this._stylingOverlayText = null;
_this._stylingOverlayText_wrapped = null;
return _this;
}
IgcValueLayerComponent.prototype.createImplementation = function () {
return new ValueLayer();
};
Object.defineProperty(IgcValueLayerComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcValueLayerComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
};
IgcValueLayerComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcValueLayerComponent, "observedAttributes", {
get: function () {
if (IgcValueLayerComponent._observedAttributesIgcValueLayerComponent == null) {
var names = getAllPropertyNames(IgcValueLayerComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcValueLayerComponent._observedAttributesIgcValueLayerComponent = names;
}
return IgcValueLayerComponent._observedAttributesIgcValueLayerComponent;
},
enumerable: false,
configurable: true
});
IgcValueLayerComponent.register = function () {
if (!IgcValueLayerComponent._isElementRegistered) {
IgcValueLayerComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcValueLayerComponent.htmlTagName, IgcValueLayerComponent);
}
};
Object.defineProperty(IgcValueLayerComponent.prototype, "isAnnotationValueLayer", {
/**
* Gets whether the series is an crosshair annotation layer.
*/
get: function () {
return this.i.ew;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "valueMode", {
/**
* Gets or sets the value mode for the overlay.
*/
get: function () {
return this.i.aa5;
},
set: function (v) {
this.i.aa5 = ensureEnum(ValueLayerValueMode_$type, v);
this._a("valueMode", enumToString(ValueLayerValueMode_$type, this.i.aa5));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "horizontalLineStroke", {
/**
* Gets or sets the color to use for the horizontal line. Leave null for an automatic value.
*/
get: function () {
return brushToString(this.i.afi);
},
set: function (v) {
this.i.afi = stringToBrush(v);
this._a("horizontalLineStroke", brushToString(this.i.afi));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "verticalLineStroke", {
/**
* Gets or sets the color to use for vertical line. Leave null for an automatic value.
*/
get: function () {
return brushToString(this.i.afm);
},
set: function (v) {
this.i.afm = stringToBrush(v);
this._a("verticalLineStroke", brushToString(this.i.afm));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.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.aa3;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgcSeriesComponent._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.aa3 = null : this.i.aa3 = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "targetSeriesName", {
/**
* Gets or sets the name to use to resolve targetSeries from markup.
*/
get: function () {
return this._targetSeriesName;
},
set: function (v) {
this._targetSeriesName = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "targetAxis", {
/**
* Gets or sets the axis to target this annotation to. If null, this annotation targets all value axis simultaneously.
*/
get: function () {
var r = this.i.aaw;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgcAxisComponent._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.aaw = null : this.i.aaw = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "targetAxisName", {
/**
* Gets or sets the name to use to resolve targetAxis from markup.
*/
get: function () {
return this._targetAxisName;
},
set: function (v) {
this._targetAxisName = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "useInterpolation", {
/**
* Gets or sets whether to use value interpolation when drawing a line through the best value for the cursor position.
*/
get: function () {
return this.i.abg;
},
set: function (v) {
this.i.abg = ensureBool(v);
this._a("useInterpolation", this.i.abg);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "isAxisAnnotationEnabled", {
/**
* Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
*/
get: function () {
return this.i.aa9;
},
set: function (v) {
this.i.aa9 = ensureBool(v);
this._a("isAxisAnnotationEnabled", this.i.aa9);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationFormatLabel", {
/**
* Sets or gets a function which takes an object that produces a formatted label for the x axis annotation.
*/
get: function () {
return this.i.aax;
},
set: function (v) {
this.i.aax = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationFormatLabel", {
/**
* Sets or gets a function which takes an object that produces a formatted label for the y axis annotation.
*/
get: function () {
return this.i.aay;
},
set: function (v) {
this.i.aay = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationTextColor", {
/**
* Gets or sets the color to use for the x axis annotation text. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.afp);
},
set: function (v) {
this.i.afp = stringToBrush(v);
this._a("xAxisAnnotationTextColor", brushToString(this.i.afp));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationBackground", {
/**
* Gets or sets the color to use for the x axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.afn);
},
set: function (v) {
this.i.afn = stringToBrush(v);
this._a("xAxisAnnotationBackground", brushToString(this.i.afn));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationBackgroundCornerRadius", {
/**
* Gets or sets the corner radius to use for the x axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return this.i.abt;
},
set: function (v) {
this.i.abt = +v;
this._a("xAxisAnnotationBackgroundCornerRadius", this.i.abt);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationInterpolatedValuePrecision", {
/**
* Gets or sets the precision to use displaying values for interpolated crosshair positions.
*/
get: function () {
return this.i.ab5;
},
set: function (v) {
this.i.ab5 = +v;
this._a("xAxisAnnotationInterpolatedValuePrecision", this.i.ab5);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationOutline", {
/**
* Gets or sets the color to use for the x axis annotation outline. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.afo);
},
set: function (v) {
this.i.afo = stringToBrush(v);
this._a("xAxisAnnotationOutline", brushToString(this.i.afo));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationPaddingLeft", {
/**
* 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.abv;
},
set: function (v) {
this.i.abv = +v;
this._a("xAxisAnnotationPaddingLeft", this.i.abv);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationPaddingTop", {
/**
* 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.abx;
},
set: function (v) {
this.i.abx = +v;
this._a("xAxisAnnotationPaddingTop", this.i.abx);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationPaddingRight", {
/**
* 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.abw;
},
set: function (v) {
this.i.abw = +v;
this._a("xAxisAnnotationPaddingRight", this.i.abw);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationPaddingBottom", {
/**
* 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.abu;
},
set: function (v) {
this.i.abu = +v;
this._a("xAxisAnnotationPaddingBottom", this.i.abu);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationPaddingLeft", {
/**
* 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.ab1;
},
set: function (v) {
this.i.ab1 = +v;
this._a("yAxisAnnotationPaddingLeft", this.i.ab1);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationPaddingTop", {
/**
* 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.ab3;
},
set: function (v) {
this.i.ab3 = +v;
this._a("yAxisAnnotationPaddingTop", this.i.ab3);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationPaddingRight", {
/**
* 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.ab2;
},
set: function (v) {
this.i.ab2 = +v;
this._a("yAxisAnnotationPaddingRight", this.i.ab2);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationPaddingBottom", {
/**
* 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.ab0;
},
set: function (v) {
this.i.ab0 = +v;
this._a("yAxisAnnotationPaddingBottom", this.i.ab0);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "xAxisAnnotationStrokeThickness", {
/**
* Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return this.i.aby;
},
set: function (v) {
this.i.aby = +v;
this._a("xAxisAnnotationStrokeThickness", this.i.aby);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationTextColor", {
/**
* Gets or sets the color to use for the y axis annotation text. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.afs);
},
set: function (v) {
this.i.afs = stringToBrush(v);
this._a("yAxisAnnotationTextColor", brushToString(this.i.afs));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationBackground", {
/**
* Gets or sets the color to use for the y axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.afq);
},
set: function (v) {
this.i.afq = stringToBrush(v);
this._a("yAxisAnnotationBackground", brushToString(this.i.afq));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationBackgroundCornerRadius", {
/**
* Gets or sets the corner radius to use for the y axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return this.i.abz;
},
set: function (v) {
this.i.abz = +v;
this._a("yAxisAnnotationBackgroundCornerRadius", this.i.abz);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationInterpolatedValuePrecision", {
/**
* Gets or sets the precision to use displaying values for interpolated crosshair positions.
*/
get: function () {
return this.i.ab6;
},
set: function (v) {
this.i.ab6 = +v;
this._a("yAxisAnnotationInterpolatedValuePrecision", this.i.ab6);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationOutline", {
/**
* Gets or sets the color to use for the y axis annotation outline. Leave unset for an automatic value.
*/
get: function () {
return brushToString(this.i.afr);
},
set: function (v) {
this.i.afr = stringToBrush(v);
this._a("yAxisAnnotationOutline", brushToString(this.i.afr));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "yAxisAnnotationStrokeThickness", {
/**
* Gets or sets the stroke thickness for the y axis annotation backing. Leave unset for an automatic value.
*/
get: function () {
return this.i.ab4;
},
set: function (v) {
this.i.ab4 = +v;
this._a("yAxisAnnotationStrokeThickness", this.i.ab4);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "skipUnknownValues", {
/**
* Gets or sets whether to skip unknown values when searching for series values.
*/
get: function () {
return this.i.abf;
},
set: function (v) {
this.i.abf = ensureBool(v);
this._a("skipUnknownValues", this.i.abf);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextLocation", {
/**
* Gets or sets location of the overlay text in relation to shape of data annotation.
*/
get: function () {
return this.i.aaz;
},
set: function (v) {
this.i.aaz = ensureEnum(OverlayTextLocation_$type, v);
this._a("overlayTextLocation", enumToString(OverlayTextLocation_$type, this.i.aaz));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextHorizontalMargin", {
/**
* Gets or sets the horizontal margin of the overlay text in relation to shape of data annotation.
*/
get: function () {
return this.i.abp;
},
set: function (v) {
this.i.abp = +v;
this._a("overlayTextHorizontalMargin", this.i.abp);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextVerticalMargin", {
/**
* Gets or sets the vertical margin of the overlay text in relation to shape of data annotation.
*/
get: function () {
return this.i.abr;
},
set: function (v) {
this.i.abr = +v;
this._a("overlayTextVerticalMargin", this.i.abr);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextHorizontalPadding", {
/**
* Gets or sets the horizontal padding of the overlay text in relation to shape of data annotation.
*/
get: function () {
return this.i.abq;
},
set: function (v) {
this.i.abq = +v;
this._a("overlayTextHorizontalPadding", this.i.abq);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextVerticalPadding", {
/**
* Gets or sets the vertical padding of the overlay text in relation to shape of data annotation.
*/
get: function () {
return this.i.abs;
},
set: function (v) {
this.i.abs = +v;
this._a("overlayTextVerticalPadding", this.i.abs);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextAngle", {
/**
* Gets or sets the angle rotation (in degrees) of the overlay text in relation to shape of data annotation.
*/
get: function () {
return this.i.abj;
},
set: function (v) {
this.i.abj = +v;
this._a("overlayTextAngle", this.i.abj);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextColor", {
/**
* Gets or sets the color the overlay text.
*/
get: function () {
return brushToString(this.i.afl);
},
set: function (v) {
this.i.afl = stringToBrush(v);
this._a("overlayTextColor", brushToString(this.i.afl));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBackground", {
/**
* Gets or sets the background the overlay text.
*/
get: function () {
return brushToString(this.i.afj);
},
set: function (v) {
this.i.afj = stringToBrush(v);
this._a("overlayTextBackground", brushToString(this.i.afj));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBorderColor", {
/**
* Gets or sets the border stroke of the overlay text.
*/
get: function () {
return brushToString(this.i.afk);
},
set: function (v) {
this.i.afk = stringToBrush(v);
this._a("overlayTextBorderColor", brushToString(this.i.afk));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBorderRadius", {
/**
* Gets or sets the border corner of the overlay text.
*/
get: function () {
return this.i.abl;
},
set: function (v) {
this.i.abl = +v;
this._a("overlayTextBorderRadius", this.i.abl);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBorderThickness", {
/**
* Gets or sets the border thickness of the overlay text.
*/
get: function () {
return this.i.abn;
},
set: function (v) {
this.i.abn = +v;
this._a("overlayTextBorderThickness", this.i.abn);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextVisible", {
/**
* Gets or sets whether the overlay text is visible in shape of data annotation
*/
get: function () {
return this.i.abe;
},
set: function (v) {
this.i.abe = ensureBool(v);
this._a("overlayTextVisible", this.i.abe);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayText", {
/**
* Gets or sets the text that will be displayed as the overlay annotation.
*/
get: function () {
return this.i.acb;
},
set: function (v) {
this.i.acb = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextColorShift", {
/**
* Gets or sets the shift of the overlay text color based on OverlayTextColorMode. Value must range between -1.0 to 1.0, where 0 means no color shift.
*/
get: function () {
return this.i.abo;
},
set: function (v) {
this.i.abo = +v;
this._a("overlayTextColorShift", this.i.abo);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextColorMode", {
/**
* Gets or sets the mode used for shifting the background of overlay text based on the target series.
*/
get: function () {
return this.i.aav;
},
set: function (v) {
this.i.aav = ensureEnum(AnnotationAppearanceMode_$type, v);
this._a("overlayTextColorMode", enumToString(AnnotationAppearanceMode_$type, this.i.aav));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextColorMatchLayer", {
/**
* Gets or sets whether the overlay text color matches brush of the layer
*/
get: function () {
return this.i.abd;
},
set: function (v) {
this.i.abd = ensureBool(v);
this._a("overlayTextColorMatchLayer", this.i.abd);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBackgroundShift", {
/**
* Gets or sets the shift of the overlay background based on OverlayTextBackgroundMode. Value must range between -1.0 to 1.0, where 0 means no color shift.
*/
get: function () {
return this.i.abk;
},
set: function (v) {
this.i.abk = +v;
this._a("overlayTextBackgroundShift", this.i.abk);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBackgroundMode", {
/**
* Gets or sets the mode used for shifting the background of overlay text based on the target series.
*/
get: function () {
return this.i.aat;
},
set: function (v) {
this.i.aat = ensureEnum(AnnotationAppearanceMode_$type, v);
this._a("overlayTextBackgroundMode", enumToString(AnnotationAppearanceMode_$type, this.i.aat));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBackgroundMatchLayer", {
/**
* Gets or sets whether the overlay text background matches brush of the layer
*/
get: function () {
return this.i.abb;
},
set: function (v) {
this.i.abb = ensureBool(v);
this._a("overlayTextBackgroundMatchLayer", this.i.abb);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBorderShift", {
/**
* Gets or sets the shift of the overlay border based on OverlayTextBorderMode. Value must range between -1.0 to 1.0, where 0 means no color shift.
*/
get: function () {
return this.i.abm;
},
set: function (v) {
this.i.abm = +v;
this._a("overlayTextBorderShift", this.i.abm);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBorderMode", {
/**
* Gets or sets the mode used for shifting the border of overlay text based on the target series.
*/
get: function () {
return this.i.aau;
},
set: function (v) {
this.i.aau = ensureEnum(AnnotationAppearanceMode_$type, v);
this._a("overlayTextBorderMode", enumToString(AnnotationAppearanceMode_$type, this.i.aau));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextBorderMatchLayer", {
/**
* Gets or sets whether the overlay text border matches brush of the layer
*/
get: function () {
return this.i.abc;
},
set: function (v) {
this.i.abc = ensureBool(v);
this._a("overlayTextBorderMatchLayer", this.i.abc);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "overlayTextStyle", {
/**
* Gets or Sets the style to use for the display text.
*/
get: function () {
if (this.i.aa8 == null) {
return null;
}
return this.i.aa8.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.aa8 = fi;
this._a("overlayTextStyle", this.i.aa8 != null ? this.i.aa8.fontString : "");
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "actualValueLayerBrush", {
/**
* Gets the effective brush for the current value layer. Can be null for value
* modes that target multiple series.
*/
get: function () {
return brushToString(this.i.afh);
},
set: function (v) {
this.i.afh = stringToBrush(v);
this._a("actualValueLayerBrush", brushToString(this.i.afh));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcValueLayerComponent.prototype, "isSummarizationSupported", {
get: function () {
return this.i.isSummarizationSupported;
},
enumerable: false,
configurable: true
});
IgcValueLayerComponent.prototype.bindSeries = function (series) {
_super.prototype.bindSeries.call(this, series);
for (var i = 0; i < series.length; i++) {
if (this.targetSeriesName && this.targetSeriesName.length > 0 &&
series[i].name == this.targetSeriesName) {
this.targetSeries = series[i];
}
}
};
IgcValueLayerComponent.prototype.bindAxes = function (axes) {
_super.prototype.bindAxes.call(this, axes);
for (var i = 0; i < axes.length; i++) {
if (this.targetAxisName && this.targetAxisName.length > 0 &&
axes[i].name == this.targetAxisName) {
this.targetAxis = axes[i];
}
}
};
IgcValueLayerComponent.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;
}
if (this.targetAxis && this.targetAxis.name && this.targetAxis.name == name) {
return this.targetAxis;
}
return null;
};
IgcValueLayerComponent.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);
}
if (this.targetAxis && this.targetAxis._styling) {
this.targetAxis._styling(container, component, this);
}
this._inStyling = false;
};
IgcValueLayerComponent.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) {
var iv = this.i.jd(toPoint(world), useInterpolation, skipUnknowns);
return (iv);
};
Object.defineProperty(IgcValueLayerComponent.prototype, "stylingOverlayText", {
/**
* Event raised when updating style of overlay text
*/
get: function () {
return this._stylingOverlayText;
},
set: function (ev) {
var _this = this;
if (this._stylingOverlayText_wrapped !== null) {
this.i.stylingOverlayText = delegateRemove(this.i.stylingOverlayText, this._stylingOverlayText_wrapped);
this._stylingOverlayText_wrapped = null;
this._stylingOverlayText = null;
}
this._stylingOverlayText = ev;
this._stylingOverlayText_wrapped = function (o, e) {
var outerArgs = new IgcOverlayTextUpdatingEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeStylingOverlayText) {
_this.beforeStylingOverlayText(_this, outerArgs);
}
if (_this._stylingOverlayText) {
_this._stylingOverlayText(_this, outerArgs);
}
};
this.i.stylingOverlayText = delegateCombine(this.i.stylingOverlayText, this._stylingOverlayText_wrapped);
;
},
enumerable: false,
configurable: true
});
IgcValueLayerComponent._observedAttributesIgcValueLayerComponent = null;
IgcValueLayerComponent.htmlTagName = "igc-value-layer";
IgcValueLayerComponent._isElementRegistered = false;
return IgcValueLayerComponent;
}(IgcAnnotationLayerComponent));