igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,519 lines • 75.1 kB
JavaScript
import { __extends, __values } from "tslib";
import * as React from 'react';
import { XamDataLegend } from "./XamDataLegend";
import { arrayFindByName, ensureEnum, brushToString, stringToBrush, ensureBool, initializePropertiesFromCss, NamePatcher, isValidProp, toSpinal, getModifiedProps } from "igniteui-react-core";
import { FontInfo } from "igniteui-react-core";
import { ReactRenderer } from "igniteui-react-core";
import { Thickness } from "igniteui-react-core";
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { DataAbbreviationMode_$type } from "igniteui-react-core";
import { DataLegendHeaderTimeMode_$type } from "igniteui-react-core";
import { DataLegendHeaderDateMode_$type } from "igniteui-react-core";
import { DataLegendUnitsMode_$type } from "igniteui-react-core";
import { DataLegendLabelMode_$type } from "igniteui-react-core";
import { DataLegendValueMode_$type } from "igniteui-react-core";
import { DataLegendLayoutMode_$type } from "igniteui-react-core";
import { DataLegendSummaryType_$type } from "igniteui-react-core";
import { IgrDataLegendSummaryEventArgs } from './igr-data-legend-summary-event-args';
import { IgrDataLegendStylingRowEventArgs } from './igr-data-legend-styling-row-event-args';
import { IgrDataLegendStylingColumnEventArgs } from './igr-data-legend-styling-column-event-args';
import { LegendItemBadgeShape_$type } from "igniteui-react-core";
var DataLegendStylingDefaults = {};
/**
* Represents data legend that displays information about each series including values and summaries.
*/
var IgrDataLegend = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrDataLegend, _super);
function IgrDataLegend(props) {
var _this = _super.call(this, props) || this;
_this._wrapper = null;
_this._implementation = null;
_this.__p = null;
_this._hasUserValues = new Set();
_this._stylingContainer = null;
_this._stylingParent = null;
_this._inStyling = false;
_this._calculateColumnSummary = null;
_this._calculateColumnSummary_wrapped = null;
_this._styleHeaderRow = null;
_this._styleHeaderRow_wrapped = null;
_this._styleGroupRow = null;
_this._styleGroupRow_wrapped = null;
_this._styleSeriesRow = null;
_this._styleSeriesRow_wrapped = null;
_this._styleSummaryRow = null;
_this._styleSummaryRow_wrapped = null;
_this._styleSeriesColumn = null;
_this._styleSeriesColumn_wrapped = null;
_this._styleSummaryColumn = null;
_this._styleSummaryColumn_wrapped = null;
if (_this._styling) {
NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this));
}
_this._getMainRef = _this._getMainRef.bind(_this);
_this._implementation = _this.createImplementation();
if (document) {
_this._container = document.createElement("div");
_this._container.style.display = "block";
_this._container.style.width = "100%";
_this._container.style.height = "100%";
}
var root;
root = _this._container;
if (_this._container != null) {
root = _this._container;
}
var ren = new ReactRenderer(root, document, true, DataLegendStylingDefaults);
_this._wrapper = ren;
var dataLegend = _this.i;
_this._dataLegend = dataLegend;
_this._dataLegend.externalObject = _this;
dataLegend.provideContainer(ren);
dataLegend.notifySizeChanged();
if (props) {
_this.initializeProperties();
}
ren.addSizeWatcher(function () {
_this._dataLegend.notifySizeChanged();
});
return _this;
}
Object.defineProperty(IgrDataLegend.prototype, "height", {
get: function () {
return this._height;
},
set: function (value) {
this._height = value;
if (this._elRef) {
this._elRef.style.height = value;
this._dataLegend.notifySizeChanged();
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "width", {
//private desiredSizeChanged(width: number, height: number) {
// //if (this.width == undefined || this.width == '') {
// // this._elRef.style.width = width + "px";
// //}
// //if (this.height == undefined || this.height == '') {
// // this._elRef.style.height = height + "px";
// //}
// //this._elRef.style.minWidth = width + "px";
// //this._elRef.style.minHeight = height + "px";
// this._dataLegend.notifySizeChanged();
//}
get: function () {
return this._width;
},
set: function (value) {
this._width = value;
if (this._elRef) {
this._elRef.style.height = value;
this._dataLegend.notifySizeChanged();
}
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype._getMainRef = function (ref) {
this._elRef = ref;
};
IgrDataLegend.prototype.render = function () {
var div = React.createElement("div", {
className: "ig-data-legend igr-data-legend",
ref: this._getMainRef
});
//}
return div;
};
IgrDataLegend.prototype.shouldComponentUpdate = function (nextProps, nextState) {
var e_1, _a;
var mod = getModifiedProps(this.props, nextProps);
try {
for (var _b = __values(Object.keys(mod)), _c = _b.next(); !_c.done; _c = _b.next()) {
var p = _c.value;
if (isValidProp(this, p)) {
this[p] = mod[p];
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
return true;
};
IgrDataLegend.prototype.initializeProperties = function () {
var e_2, _a;
try {
for (var _b = __values(Object.keys(this.props)), _c = _b.next(); !_c.done; _c = _b.next()) {
var p = _c.value;
if (isValidProp(this, p)) {
this[p] = this.props[p];
}
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
};
// supports angular themes or custom properties set in CSS
IgrDataLegend.prototype.updateStyle = function () {
this._styling(this._elRef, this);
};
IgrDataLegend.prototype.destroy = function () {
this._dataLegend.destroy();
this._wrapper.destroy();
};
IgrDataLegend.prototype.componentWillUnmount = function () {
};
IgrDataLegend.prototype.componentDidMount = function () {
this._elRef.style.width = this._width ? this._width : "";
this._elRef.style.height = this._height ? this._height : "";
this._elRef.appendChild(this._container);
this._dataLegend.notifySizeChanged();
this.initializeContent();
};
IgrDataLegend.prototype.initializeContent = function () {
this.updateStyle();
};
IgrDataLegend.prototype.createImplementation = function () {
return new XamDataLegend();
};
Object.defineProperty(IgrDataLegend.prototype, "i", {
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrDataLegend._staticStyling = function (container, component, parent) {
var genericPrefix = "";
var typeName = (component.i ? component.i : component).$type.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
genericPrefix = toSpinal("DataLegend");
var additionalPrefixes = [];
var prefix = toSpinal(typeName);
additionalPrefixes.push(prefix + "-");
var b = (component.i ? component.i : component).$type.baseType;
while (b && b.name != "Object" &&
b.name != "Base" &&
b.name != "Control" &&
b.Name != "DependencyObject" &&
b.Name != "FrameworkElement") {
typeName = b.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
var basePrefix = toSpinal(typeName);
additionalPrefixes.push(basePrefix + "-");
b = b.baseType;
}
if (parent) {
var parentTypeName = parent.i.$type.name;
if (parentTypeName.indexOf("Xam") === 0) {
parentTypeName = parentTypeName.substring(3);
}
var parentPrefix = toSpinal(parentTypeName);
additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
}
initializePropertiesFromCss(container, component, genericPrefix + "-", new Set(), false, additionalPrefixes);
};
Object.defineProperty(IgrDataLegend.prototype, "target", {
/**
* Gets or sets the target for the data legend.
*/
get: function () {
var ret = this.i.target;
if (!ret) {
return ret;
}
if (ret.externalObject != null) {
ret = ret.externalObject;
}
return ret;
},
set: function (v) {
if (v && v._implementation) {
v = v._implementation;
}
this.i.target = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualBadgesVisible", {
/**
* Gets whether or not at least one badge is visible based on BadgesShape and setting of a row's IsVisble in StyleSeriesRow event
*/
get: function () {
return this.i.b0;
},
set: function (v) {
this.i.b0 = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualPixelScalingRatio", {
/**
* Gets the actual pixel scaling ratio used to affect the pixel density of the control.
* A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control to appear blurry.
*/
get: function () {
return this.i.ct;
},
set: function (v) {
this.i.ct = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualBackground", {
/**
* Gets the effective background of the data legend.
*/
get: function () {
return brushToString(this.i.i4);
},
set: function (v) {
this.i.i4 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualBorderBrush", {
/**
* Gets the effective border brush of the data legend.
*/
get: function () {
return brushToString(this.i.i5);
},
set: function (v) {
this.i.i5 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualBorderThicknessBottom", {
get: function () {
return this.i.jr ? this.i.jr.bottom : NaN;
},
set: function (v) {
this.ensureActualBorderThickness();
this.i.jr.bottom = +v;
this.i.jr = this.i.jr;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualBorderThicknessLeft", {
get: function () {
return this.i.jr ? this.i.jr.left : NaN;
},
set: function (v) {
this.ensureActualBorderThickness();
this.i.jr.left = +v;
this.i.jr = this.i.jr;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualBorderThicknessRight", {
get: function () {
return this.i.jr ? this.i.jr.right : NaN;
},
set: function (v) {
this.ensureActualBorderThickness();
this.i.jr.right = +v;
this.i.jr = this.i.jr;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "actualBorderThicknessTop", {
get: function () {
return this.i.jr ? this.i.jr.top : NaN;
},
set: function (v) {
this.ensureActualBorderThickness();
this.i.jr.top = +v;
this.i.jr = this.i.jr;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureActualBorderThickness = function () {
if (this.i.jr) {
return;
}
this.i.jr = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "isEmbeddedInDataTooltip", {
/**
* Gets or sets whether the legend is embedded in a DataTooltip
*/
get: function () {
return this.i.isEmbeddedInDataTooltip;
},
set: function (v) {
this.i.isEmbeddedInDataTooltip = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "includedSeries", {
/**
* Gets or sets indexes, titles, or names of series to include in displaying in the data legend, e.g. "0, 1" or "Series1 Title, Series2 Title"
* The ExcludedSeries property takes precedence over values of IncludedSeries property
*/
get: function () {
return this.i.includedSeries;
},
set: function (v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
var re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.includedSeries = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "excludedSeries", {
/**
* Gets or sets indexes, titles, or names of series to exclude from displaying in the data legend, e.g. "0, 1" or "Series1 Title, Series2 Title"
* The ExcludedSeries property takes precedence over values of IncludedSeries property
*/
get: function () {
return this.i.excludedSeries;
},
set: function (v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
var re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.excludedSeries = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "includedColumns", {
/**
* Gets or sets names of data columns or their labels to include in displaying in the data legend, e.g. "High, Low" or "H, L"
* The ExcludedColumns property takes precedence over values of IncludedColumns property
*/
get: function () {
return this.i.includedColumns;
},
set: function (v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
var re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.includedColumns = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "excludedColumns", {
/**
* Gets or sets names of data columns or their labels to exclude from displaying in the data legend, e.g. "High, Low" or "H, L"
* The ExcludedColumns property takes precedence over values of IncludedColumns property
*/
get: function () {
return this.i.excludedColumns;
},
set: function (v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
var re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.excludedColumns = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "shouldUpdateWhenSeriesDataChanges", {
/**
* Gets or sets whether the data legend should update when the series data is mutated.
*/
get: function () {
return this.i.b9;
},
set: function (v) {
this.i.b9 = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatAbbreviation", {
/**
* Gets or sets mode for abbreviating large numbers displayed in the legend
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get: function () {
return this.i.an;
},
set: function (v) {
this.i.an = ensureEnum(DataAbbreviationMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatMaxFractions", {
/**
* Gets or sets maximum digits for formatting numbers displayed in the legend
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get: function () {
return this.i.c0;
},
set: function (v) {
this.i.c0 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatMinFractions", {
/**
* Gets or sets minimum digits for formatting numbers displayed in the legend
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get: function () {
return this.i.c1;
},
set: function (v) {
this.i.c1 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatMode", {
/**
* Gets or sets the mode for displaying values in the data legend, e.g. Currency ($500.25), Decimal (500.25), Integer (500)
*/
get: function () {
return this.i.a5;
},
set: function (v) {
this.i.a5 = ensureEnum(DataLegendValueMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatCulture", {
/**
* Gets or sets globalization culture when displaying values as currencies, e.g. use "en-GB" to display British pound symbol when the ValueFormatMode property is set to 'Currency' mode
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get: function () {
return this.i.fg;
},
set: function (v) {
this.i.fg = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatCurrencyCode", {
/**
* Gets or sets the currency code used for displaying currency symbol next to values, e.g. USD for $, EUR for €
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get: function () {
return this.i.fi;
},
set: function (v) {
this.i.fi = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatUseGrouping", {
/**
* Gets or sets whether or not use grouping separator, e.g, 15,000 for 15000
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get: function () {
return this.i.ca;
},
set: function (v) {
this.i.ca = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatString", {
/**
* Gets or sets the format string for values displayed in the data legend.
*/
get: function () {
return this.i.fo;
},
set: function (v) {
this.i.fo = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueFormatSpecifiers", {
/**
* Gets or sets the format specifiers to use with the ValueFormatString string.
*/
get: function () {
return this.i.ah;
},
set: function (v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
var re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.ah = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueRowMarginBottom", {
get: function () {
return this.i.j4 ? this.i.j4.bottom : NaN;
},
set: function (v) {
this.ensureValueRowMargin();
this.i.j4.bottom = +v;
this.i.j4 = this.i.j4;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueRowMarginLeft", {
get: function () {
return this.i.j4 ? this.i.j4.left : NaN;
},
set: function (v) {
this.ensureValueRowMargin();
this.i.j4.left = +v;
this.i.j4 = this.i.j4;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueRowMarginRight", {
get: function () {
return this.i.j4 ? this.i.j4.right : NaN;
},
set: function (v) {
this.ensureValueRowMargin();
this.i.j4.right = +v;
this.i.j4 = this.i.j4;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueRowMarginTop", {
get: function () {
return this.i.j4 ? this.i.j4.top : NaN;
},
set: function (v) {
this.ensureValueRowMargin();
this.i.j4.top = +v;
this.i.j4 = this.i.j4;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureValueRowMargin = function () {
if (this.i.j4) {
return;
}
this.i.j4 = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "valueRowVisible", {
/**
* Gets or sets whether to show series rows.
*/
get: function () {
return this.i.cb;
},
set: function (v) {
this.i.cb = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueTextWhenMissingData", {
/**
* Gets or sets text displayed when data column is missing a value, e.g. "no data"
*/
get: function () {
return this.i.fx;
},
set: function (v) {
this.i.fx = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueTextUseSeriesColors", {
/**
* Gets or sets whether to use series colors when displaying values in the legend
*/
get: function () {
return this.i.cc;
},
set: function (v) {
this.i.cc = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueTextMarginBottom", {
get: function () {
return this.i.j5 ? this.i.j5.bottom : NaN;
},
set: function (v) {
this.ensureValueTextMargin();
this.i.j5.bottom = +v;
this.i.j5 = this.i.j5;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueTextMarginLeft", {
get: function () {
return this.i.j5 ? this.i.j5.left : NaN;
},
set: function (v) {
this.ensureValueTextMargin();
this.i.j5.left = +v;
this.i.j5 = this.i.j5;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueTextMarginRight", {
get: function () {
return this.i.j5 ? this.i.j5.right : NaN;
},
set: function (v) {
this.ensureValueTextMargin();
this.i.j5.right = +v;
this.i.j5 = this.i.j5;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueTextMarginTop", {
get: function () {
return this.i.j5 ? this.i.j5.top : NaN;
},
set: function (v) {
this.ensureValueTextMargin();
this.i.j5.top = +v;
this.i.j5 = this.i.j5;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureValueTextMargin = function () {
if (this.i.j5) {
return;
}
this.i.j5 = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "valueTextColor", {
/**
* Gets or sets the units text color.
*/
get: function () {
return brushToString(this.i.jk);
},
set: function (v) {
this.i.jk = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "valueTextStyle", {
/**
* Gets or Sets the style to use for the units text.
*/
get: function () {
if (this.i.bx == null) {
return null;
}
return this.i.bx.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.bx = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerFormatString", {
/**
* Gets or sets the format string for header text displayed in the data legend.
*/
get: function () {
return this.i.dv;
},
set: function (v) {
this.i.dv = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerFormatSpecifiers", {
/**
* Gets or sets the format specifiers to use with the HeaderFormatString string.
*/
get: function () {
return this.i.ag;
},
set: function (v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
var re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.ag = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerFormatCulture", {
/**
* Gets or sets globalization culture applied to header only when it displays dates that are fetched from date/time axes
* This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
*/
get: function () {
return this.i.dr;
},
set: function (v) {
this.i.dr = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerFormatDate", {
/**
* Gets or sets date format for the header only when it displays dates that are fetched from date/time axes
* This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
*/
get: function () {
return this.i.ap;
},
set: function (v) {
this.i.ap = ensureEnum(DataLegendHeaderDateMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerFormatTime", {
/**
* Gets or sets time format for the header only when it displays dates that are fetched from date/time axes
* This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
*/
get: function () {
return this.i.aq;
},
set: function (v) {
this.i.aq = ensureEnum(DataLegendHeaderTimeMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerText", {
/**
* Gets or sets the HeaderText for the data legend.
*/
get: function () {
return this.i.d0;
},
set: function (v) {
this.i.d0 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerTextColor", {
/**
* Gets or sets the header text color.
*/
get: function () {
return brushToString(this.i.jb);
},
set: function (v) {
this.i.jb = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerTextMarginBottom", {
get: function () {
return this.i.jx ? this.i.jx.bottom : NaN;
},
set: function (v) {
this.ensureHeaderTextMargin();
this.i.jx.bottom = +v;
this.i.jx = this.i.jx;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerTextMarginLeft", {
get: function () {
return this.i.jx ? this.i.jx.left : NaN;
},
set: function (v) {
this.ensureHeaderTextMargin();
this.i.jx.left = +v;
this.i.jx = this.i.jx;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerTextMarginRight", {
get: function () {
return this.i.jx ? this.i.jx.right : NaN;
},
set: function (v) {
this.ensureHeaderTextMargin();
this.i.jx.right = +v;
this.i.jx = this.i.jx;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerTextMarginTop", {
get: function () {
return this.i.jx ? this.i.jx.top : NaN;
},
set: function (v) {
this.ensureHeaderTextMargin();
this.i.jx.top = +v;
this.i.jx = this.i.jx;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureHeaderTextMargin = function () {
if (this.i.jx) {
return;
}
this.i.jx = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "headerRowMarginBottom", {
get: function () {
return this.i.jw ? this.i.jw.bottom : NaN;
},
set: function (v) {
this.ensureHeaderRowMargin();
this.i.jw.bottom = +v;
this.i.jw = this.i.jw;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerRowMarginLeft", {
get: function () {
return this.i.jw ? this.i.jw.left : NaN;
},
set: function (v) {
this.ensureHeaderRowMargin();
this.i.jw.left = +v;
this.i.jw = this.i.jw;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerRowMarginRight", {
get: function () {
return this.i.jw ? this.i.jw.right : NaN;
},
set: function (v) {
this.ensureHeaderRowMargin();
this.i.jw.right = +v;
this.i.jw = this.i.jw;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerRowMarginTop", {
get: function () {
return this.i.jw ? this.i.jw.top : NaN;
},
set: function (v) {
this.ensureHeaderRowMargin();
this.i.jw.top = +v;
this.i.jw = this.i.jw;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureHeaderRowMargin = function () {
if (this.i.jw) {
return;
}
this.i.jw = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "headerRowVisible", {
/**
* Gets or sets whether to show Header row.
*/
get: function () {
return this.i.b5;
},
set: function (v) {
this.i.b5 = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "headerTextStyle", {
/**
* Gets or Sets the style to use for the header text.
*/
get: function () {
if (this.i.bp == null) {
return null;
}
return this.i.bp.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.bp = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupRowVisible", {
/**
* Gets or sets whether to show Header row.
*/
get: function () {
return this.i.b3;
},
set: function (v) {
this.i.b3 = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupTextColor", {
/**
* Gets or sets the Group text color.
*/
get: function () {
return brushToString(this.i.ja);
},
set: function (v) {
this.i.ja = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupTextMarginBottom", {
get: function () {
return this.i.jv ? this.i.jv.bottom : NaN;
},
set: function (v) {
this.ensureGroupTextMargin();
this.i.jv.bottom = +v;
this.i.jv = this.i.jv;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupTextMarginLeft", {
get: function () {
return this.i.jv ? this.i.jv.left : NaN;
},
set: function (v) {
this.ensureGroupTextMargin();
this.i.jv.left = +v;
this.i.jv = this.i.jv;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupTextMarginRight", {
get: function () {
return this.i.jv ? this.i.jv.right : NaN;
},
set: function (v) {
this.ensureGroupTextMargin();
this.i.jv.right = +v;
this.i.jv = this.i.jv;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupTextMarginTop", {
get: function () {
return this.i.jv ? this.i.jv.top : NaN;
},
set: function (v) {
this.ensureGroupTextMargin();
this.i.jv.top = +v;
this.i.jv = this.i.jv;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureGroupTextMargin = function () {
if (this.i.jv) {
return;
}
this.i.jv = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "groupRowMarginBottom", {
get: function () {
return this.i.ju ? this.i.ju.bottom : NaN;
},
set: function (v) {
this.ensureGroupRowMargin();
this.i.ju.bottom = +v;
this.i.ju = this.i.ju;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupRowMarginLeft", {
get: function () {
return this.i.ju ? this.i.ju.left : NaN;
},
set: function (v) {
this.ensureGroupRowMargin();
this.i.ju.left = +v;
this.i.ju = this.i.ju;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupRowMarginRight", {
get: function () {
return this.i.ju ? this.i.ju.right : NaN;
},
set: function (v) {
this.ensureGroupRowMargin();
this.i.ju.right = +v;
this.i.ju = this.i.ju;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "groupRowMarginTop", {
get: function () {
return this.i.ju ? this.i.ju.top : NaN;
},
set: function (v) {
this.ensureGroupRowMargin();
this.i.ju.top = +v;
this.i.ju = this.i.ju;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureGroupRowMargin = function () {
if (this.i.ju) {
return;
}
this.i.ju = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "groupTextStyle", {
/**
* Gets or Sets the style to use for the Group text.
*/
get: function () {
if (this.i.bo == null) {
return null;
}
return this.i.bo.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.bo = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryTitleTextColor", {
/**
* Gets or sets the summary text color.
*/
get: function () {
return brushToString(this.i.jf);
},
set: function (v) {
this.i.jf = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryTitleTextStyle", {
/**
* Gets or Sets the style to use for the summary text.
*/
get: function () {
if (this.i.bs == null) {
return null;
}
return this.i.bs.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.bs = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryType", {
/**
* Gets or sets the SummaryType for the data legend.
*/
get: function () {
return this.i.a3;
},
set: function (v) {
this.i.a3 = ensureEnum(DataLegendSummaryType_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryTitleText", {
/**
* Gets or sets the SummaryTitleText for the data legend.
*/
get: function () {
return this.i.er;
},
set: function (v) {
this.i.er = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryTitleTextMarginBottom", {
get: function () {
return this.i.j0 ? this.i.j0.bottom : NaN;
},
set: function (v) {
this.ensureSummaryTitleTextMargin();
this.i.j0.bottom = +v;
this.i.j0 = this.i.j0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryTitleTextMarginLeft", {
get: function () {
return this.i.j0 ? this.i.j0.left : NaN;
},
set: function (v) {
this.ensureSummaryTitleTextMargin();
this.i.j0.left = +v;
this.i.j0 = this.i.j0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryTitleTextMarginRight", {
get: function () {
return this.i.j0 ? this.i.j0.right : NaN;
},
set: function (v) {
this.ensureSummaryTitleTextMargin();
this.i.j0.right = +v;
this.i.j0 = this.i.j0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryTitleTextMarginTop", {
get: function () {
return this.i.j0 ? this.i.j0.top : NaN;
},
set: function (v) {
this.ensureSummaryTitleTextMargin();
this.i.j0.top = +v;
this.i.j0 = this.i.j0;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureSummaryTitleTextMargin = function () {
if (this.i.j0) {
return;
}
this.i.j0 = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "summaryRowMarginBottom", {
get: function () {
return this.i.jz ? this.i.jz.bottom : NaN;
},
set: function (v) {
this.ensureSummaryRowMargin();
this.i.jz.bottom = +v;
this.i.jz = this.i.jz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryRowMarginLeft", {
get: function () {
return this.i.jz ? this.i.jz.left : NaN;
},
set: function (v) {
this.ensureSummaryRowMargin();
this.i.jz.left = +v;
this.i.jz = this.i.jz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryRowMarginRight", {
get: function () {
return this.i.jz ? this.i.jz.right : NaN;
},
set: function (v) {
this.ensureSummaryRowMargin();
this.i.jz.right = +v;
this.i.jz = this.i.jz;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryRowMarginTop", {
get: function () {
return this.i.jz ? this.i.jz.top : NaN;
},
set: function (v) {
this.ensureSummaryRowMargin();
this.i.jz.top = +v;
this.i.jz = this.i.jz;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureSummaryRowMargin = function () {
if (this.i.jz) {
return;
}
this.i.jz = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "summaryValueTextColor", {
/**
* Gets or sets the units text color.
*/
get: function () {
return brushToString(this.i.jh);
},
set: function (v) {
this.i.jh = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryValueTextStyle", {
/**
* Gets or Sets the style to use for the units text.
*/
get: function () {
if (this.i.bu == null) {
return null;
}
return this.i.bu.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.bu = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryLabelText", {
/**
* Gets or sets the units text for the data legend.
*/
get: function () {
return this.i.em;
},
set: function (v) {
this.i.em = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryLabelTextColor", {
/**
* Gets or sets the units text color.
*/
get: function () {
return brushToString(this.i.je);
},
set: function (v) {
this.i.je = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryLabelTextStyle", {
/**
* Gets or Sets the style to use for the units text.
*/
get: function () {
if (this.i.br == null) {
return null;
}
return this.i.br.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.br = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryUnitsText", {
/**
* Gets or sets the units text for the data legend.
*/
get: function () {
return this.i.ex;
},
set: function (v) {
this.i.ex = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryUnitsTextColor", {
/**
* Gets or sets the units text color.
*/
get: function () {
return brushToString(this.i.jg);
},
set: function (v) {
this.i.jg = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "summaryUnitsTextStyle", {
/**
* Gets or Sets the style to use for the units text.
*/
get: function () {
if (this.i.bt == null) {
return null;
}
return this.i.bt.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.bt = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "badgeMarginBottom", {
get: function () {
return this.i.js ? this.i.js.bottom : NaN;
},
set: function (v) {
this.ensureBadgeMargin();
this.i.js.bottom = +v;
this.i.js = this.i.js;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "badgeMarginLeft", {
get: function () {
return this.i.js ? this.i.js.left : NaN;
},
set: function (v) {
this.ensureBadgeMargin();
this.i.js.left = +v;
this.i.js = this.i.js;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "badgeMarginRight", {
get: function () {
return this.i.js ? this.i.js.right : NaN;
},
set: function (v) {
this.ensureBadgeMargin();
this.i.js.right = +v;
this.i.js = this.i.js;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataLegend.prototype, "badgeMarginTop", {
get: function () {
return this.i.js ? this.i.js.top : NaN;
},
set: function (v) {
this.ensureBadgeMargin();
this.i.js.top = +v;
this.i.js = this.i.js;
},
enumerable: false,
configurable: true
});
IgrDataLegend.prototype.ensureBadgeMargin = function () {
if (this.i.js) {
return;
}
this.i.js = new Thickness(2);
};
Object.defineProperty(IgrDataLegend.prototype, "badgeShape", {
/**
* Gets or sets the BadgeShape for the data legend.
*/
get: function () {
return this.i.ba;
},
set: function (v) {
this.i.ba = ensureEnum(LegendItemBadgeShape_$type, v);
},
enumerable: false,
configurable: true
});
Object.definePrope