igniteui-react-core
Version:
Ignite UI React Core.
278 lines (276 loc) • 6.48 kB
JavaScript
import { DataLegendSeriesValueType_$type } from "./DataLegendSeriesValueType";
import { DataLegendSeriesValueInfo as DataLegendSeriesValueInfo_internal } from "./DataLegendSeriesValueInfo";
import { brushToString, stringToBrush, ensureBool, ensureEnum } from "./componentUtil";
/**
* Represent info about series values
*/
export class IgrDataLegendSeriesValueInfo {
createImplementation() {
return new DataLegendSeriesValueInfo_internal();
}
get nativeElement() {
return this._implementation.nativeElement;
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
onImplementationCreated() {
}
constructor() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
_provideImplementation(i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
/**
* Gets value of series
*/
get value() {
return this.i.l;
}
set value(v) {
this.i.l = +v;
}
/**
* Gets or sets prefix for negative value
*/
get valueNegativePrefix() {
return this.i.v;
}
set valueNegativePrefix(v) {
this.i.v = v;
}
/**
* Gets or sets suffix for negative value
*/
get valueNegativeSuffix() {
return this.i.w;
}
set valueNegativeSuffix(v) {
this.i.w = v;
}
/**
* Gets or sets prefix for positive value
*/
get valuePositivePrefix() {
return this.i.x;
}
set valuePositivePrefix(v) {
this.i.x = v;
}
/**
* Gets or sets suffix for positive value
*/
get valuePositiveSuffix() {
return this.i.y;
}
set valuePositiveSuffix(v) {
this.i.y = v;
}
/**
* Gets value color used by the series
*/
get formatWithSeriesColor() {
return brushToString(this.i.z);
}
set formatWithSeriesColor(v) {
this.i.z = stringToBrush(v);
}
/**
* Gets or sets minimum digits used for displaying faction of the value
*/
get formatMinFractions() {
return this.i.n;
}
set formatMinFractions(v) {
this.i.n = +v;
}
/**
* Gets or sets maximum digits used for displaying faction of the value
*/
get formatMaxFractions() {
return this.i.m;
}
set formatMaxFractions(v) {
this.i.m = +v;
}
/**
* Gets or sets whether or not use conditional color
*/
get formatUsePositiveColor() {
return this.i.j;
}
set formatUsePositiveColor(v) {
this.i.j = ensureBool(v);
}
/**
* Gets or sets whether or not use conditional color
*/
get formatUseNegativeColor() {
return this.i.i;
}
set formatUseNegativeColor(v) {
this.i.i = ensureBool(v);
}
/**
* Gets or sets whether or not allow displaying value as currency
*/
get formatAllowCurrency() {
return this.i.e;
}
set formatAllowCurrency(v) {
this.i.e = ensureBool(v);
}
/**
* Gets or sets whether or not allow displaying value as percentage
*/
get formatAllowPercent() {
return this.i.h;
}
set formatAllowPercent(v) {
this.i.h = ensureBool(v);
}
/**
* Gets or sets whether or not allow displaying value as decimal
*/
get formatAllowDecimal() {
return this.i.f;
}
set formatAllowDecimal(v) {
this.i.f = ensureBool(v);
}
/**
* Gets or sets whether or not allow displaying value as integer
*/
get formatAllowInteger() {
return this.i.g;
}
set formatAllowInteger(v) {
this.i.g = ensureBool(v);
}
/**
* Gets or sets whether or not allow displaying value with abbreviation
*/
get formatAllowAbbreviation() {
return this.i.d;
}
set formatAllowAbbreviation(v) {
this.i.d = ensureBool(v);
}
/**
* Gets or sets type of value
*/
get valueType() {
return this.i.a;
}
set valueType(v) {
this.i.a = ensureEnum(DataLegendSeriesValueType_$type, v);
}
/**
* Gets the index of series
*/
get index() {
return this.i.o;
}
set index(v) {
this.i.o = +v;
}
get orderIndex() {
return this.i.p;
}
set orderIndex(v) {
this.i.p = +v;
}
/**
* Gets or sets whether this value is excluded/hidden by default in Data Legend
*/
get isExcludeByDefault() {
return this.i.k;
}
set isExcludeByDefault(v) {
this.i.k = ensureBool(v);
}
/**
* Gets or sets whether the unit text is allowed by the series, e.g. "Hz"
*/
get allowUnits() {
return this.i.c;
}
set allowUnits(v) {
this.i.c = ensureBool(v);
}
/**
* Gets or sets whether the label text is allowed by the series, e.g. "H:"
*/
get allowLabels() {
return this.i.b;
}
set allowLabels(v) {
this.i.b = ensureBool(v);
}
/**
* Gets or sets member path for the series value, e.g. "HighPrice"
*/
get memberPath() {
return this.i.r;
}
set memberPath(v) {
this.i.r = v;
}
/**
* Gets or sets member path for the series value, e.g. "High"
*/
get memberLabel() {
return this.i.q;
}
set memberLabel(v) {
this.i.q = v;
}
/**
* Gets or sets label for the series value, e.g. "H:"
*/
get memberSymbol() {
return this.i.s;
}
set memberSymbol(v) {
this.i.s = v;
}
/**
* Gets or sets unit text for the value, e.g. "Hz"
*/
get memberUnit() {
return this.i.t;
}
set memberUnit(v) {
this.i.t = v;
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
}
/**
* Converts this object to a string
*/
toString() {
let iv = this.i.u();
return (iv);
}
}