igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
232 lines (231 loc) • 9.22 kB
JavaScript
import { IgcSeriesComponent } from "./igc-series-component";
import { FinalValueSelectionMode_$type } from "./FinalValueSelectionMode";
import { IgcAnnotationLayerComponent } from "./igc-annotation-layer-component";
import { FinalValueLayer } from "./FinalValueLayer";
import { getAllPropertyNames, toSpinal, ensureEnum, enumToString, brushToString, stringToBrush } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
let IgcFinalValueLayerComponent = /*@__PURE__*/ (() => {
class IgcFinalValueLayerComponent extends IgcAnnotationLayerComponent {
createImplementation() {
return new FinalValueLayer();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
connectedCallback() {
if (super["connectedCallback"]) {
super["connectedCallback"]();
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
}
disconnectedCallback() {
if (super["disconnectedCallback"]) {
super["disconnectedCallback"]();
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
}
static get observedAttributes() {
if (IgcFinalValueLayerComponent._observedAttributesIgcFinalValueLayerComponent == null) {
let names = getAllPropertyNames(IgcFinalValueLayerComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcFinalValueLayerComponent._observedAttributesIgcFinalValueLayerComponent = names;
}
return IgcFinalValueLayerComponent._observedAttributesIgcFinalValueLayerComponent;
}
static register() {
if (!IgcFinalValueLayerComponent._isElementRegistered) {
IgcFinalValueLayerComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcFinalValueLayerComponent.htmlTagName, IgcFinalValueLayerComponent);
}
}
/**
* Gets whether the series is final value annotation layer.
*/
get isAnnotationFinalValue() {
return this.i.et;
}
/**
* Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously.
*/
get targetSeriesName() {
return this.i.abh;
}
set targetSeriesName(v) {
this.i.abh = v;
}
/**
* Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
*/
get targetSeries() {
const r = this.i.aav;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = IgcSeriesComponent._createFromInternal(r);
if (e) {
e._implementation = r;
}
r.externalObject = e;
}
return r.externalObject;
}
set targetSeries(v) {
if (v != null && this._stylingContainer && v._styling)
v._styling(this._stylingContainer, this, this);
v == null ? this.i.aav = null : this.i.aav = v.i;
}
/**
* Gets or sets how to select the final value to annotate.
*/
get finalValueSelectionMode() {
return this.i.aau;
}
set finalValueSelectionMode(v) {
this.i.aau = ensureEnum(FinalValueSelectionMode_$type, v);
this._a("finalValueSelectionMode", enumToString(FinalValueSelectionMode_$type, this.i.aau));
}
/**
* Gets or sets the color to use for the axis annotation text. Leave unset for an automatic value.
*/
get axisAnnotationTextColor() {
return brushToString(this.i.ab1);
}
set axisAnnotationTextColor(v) {
this.i.ab1 = stringToBrush(v);
this._a("axisAnnotationTextColor", brushToString(this.i.ab1));
}
/**
* Gets or sets the color to use for the axis annotation backing. Leave unset for an automatic value.
*/
get axisAnnotationBackground() {
return brushToString(this.i.abz);
}
set axisAnnotationBackground(v) {
this.i.abz = stringToBrush(v);
this._a("axisAnnotationBackground", brushToString(this.i.abz));
}
/**
* Gets or sets the corner radius to use for the axis annotation backing. Leave unset for an automatic value.
*/
get axisAnnotationBackgroundCornerRadius() {
return this.i.aaz;
}
set axisAnnotationBackgroundCornerRadius(v) {
this.i.aaz = +v;
this._a("axisAnnotationBackgroundCornerRadius", this.i.aaz);
}
/**
* Gets or sets the precision to use displaying values for interpolated crosshair positions.
*/
get axisAnnotationInterpolatedValuePrecision() {
return this.i.aa5;
}
set axisAnnotationInterpolatedValuePrecision(v) {
this.i.aa5 = +v;
this._a("axisAnnotationInterpolatedValuePrecision", this.i.aa5);
}
/**
* Gets or sets the color to use for the axis annotation outline. Leave unset for an automatic value.
*/
get axisAnnotationOutline() {
return brushToString(this.i.ab0);
}
set axisAnnotationOutline(v) {
this.i.ab0 = stringToBrush(v);
this._a("axisAnnotationOutline", brushToString(this.i.ab0));
}
/**
* 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 axisAnnotationPaddingLeft() {
return this.i.aa1;
}
set axisAnnotationPaddingLeft(v) {
this.i.aa1 = +v;
this._a("axisAnnotationPaddingLeft", this.i.aa1);
}
/**
* 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 axisAnnotationPaddingTop() {
return this.i.aa3;
}
set axisAnnotationPaddingTop(v) {
this.i.aa3 = +v;
this._a("axisAnnotationPaddingTop", this.i.aa3);
}
/**
* 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 axisAnnotationPaddingRight() {
return this.i.aa2;
}
set axisAnnotationPaddingRight(v) {
this.i.aa2 = +v;
this._a("axisAnnotationPaddingRight", this.i.aa2);
}
/**
* 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 axisAnnotationPaddingBottom() {
return this.i.aa0;
}
set axisAnnotationPaddingBottom(v) {
this.i.aa0 = +v;
this._a("axisAnnotationPaddingBottom", this.i.aa0);
}
/**
* Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
*/
get axisAnnotationStrokeThickness() {
return this.i.aa4;
}
set axisAnnotationStrokeThickness(v) {
this.i.aa4 = +v;
this._a("axisAnnotationStrokeThickness", this.i.aa4);
}
findByName(name) {
var baseResult = super.findByName(name);
if (baseResult) {
return baseResult;
}
if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
return this.targetSeries;
}
return null;
}
_styling(container, component, parent) {
super._styling(container, component, parent);
this._inStyling = true;
if (this.targetSeries && this.targetSeries._styling) {
this.targetSeries._styling(container, component, this);
}
this._inStyling = false;
}
}
IgcFinalValueLayerComponent._observedAttributesIgcFinalValueLayerComponent = null;
IgcFinalValueLayerComponent.htmlTagName = "igc-final-value-layer";
IgcFinalValueLayerComponent._isElementRegistered = false;
return IgcFinalValueLayerComponent;
})();
export { IgcFinalValueLayerComponent };