igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,670 lines (1,669 loc) • 77.6 kB
JavaScript
import { Output, EventEmitter, Component, ViewContainerRef, Injector, Renderer2, ViewChild, Input, NgZone, ChangeDetectionStrategy } from '@angular/core';
import { XamDataLegend } from "./XamDataLegend";
import { arrayFindByName, ensureEnum, brushToString, stringToBrush, ensureBool, toSpinal, initializePropertiesFromCss, NamePatcher } from "igniteui-angular-core";
import { FontInfo } from "igniteui-angular-core";
import { AngularRenderer } from "igniteui-angular-core";
import { delegateCombine } from "igniteui-angular-core";
import { Thickness } from "igniteui-angular-core";
import { DataAbbreviationMode, DataAbbreviationMode_$type } from "igniteui-angular-core";
import { DataLegendHeaderTimeMode, DataLegendHeaderTimeMode_$type } from "igniteui-angular-core";
import { DataLegendHeaderDateMode, DataLegendHeaderDateMode_$type } from "igniteui-angular-core";
import { DataLegendUnitsMode, DataLegendUnitsMode_$type } from "igniteui-angular-core";
import { DataLegendLabelMode, DataLegendLabelMode_$type } from "igniteui-angular-core";
import { DataLegendValueMode, DataLegendValueMode_$type } from "igniteui-angular-core";
import { DataLegendLayoutMode, DataLegendLayoutMode_$type } from "igniteui-angular-core";
import { DataLegendSummaryType, DataLegendSummaryType_$type } from "igniteui-angular-core";
import { IgxDataLegendSummaryEventArgs } from './igx-data-legend-summary-event-args';
import { IgxDataLegendStylingRowEventArgs } from './igx-data-legend-styling-row-event-args';
import { IgxDataLegendStylingColumnEventArgs } from './igx-data-legend-styling-column-event-args';
import { LegendItemBadgeShape, LegendItemBadgeShape_$type } from "igniteui-angular-core";
import * as i0 from "@angular/core";
const DataLegendStylingDefaults = {};
/**
* Represents data legend that displays information about each series including values and summaries.
*/
export class IgxDataLegendComponent {
set height(value) {
this._height = value;
this.renderer.setStyle(this._elRef.element.nativeElement, "height", value);
this._dataLegend.notifySizeChanged();
}
get height() {
return this._height;
}
set width(value) {
this._width = value;
this.renderer.setStyle(this._elRef.element.nativeElement, "width", value);
this._dataLegend.notifySizeChanged();
}
get width() {
return this._width;
}
constructor(renderer, _elRef, ngZone, injector) {
this.renderer = renderer;
this._elRef = _elRef;
this.ngZone = ngZone;
this.injector = injector;
this._wrapper = null;
this._root = null;
this._implementation = null;
this.__p = null;
this._hasUserValues = new Set();
this._stylingContainer = null;
this._stylingParent = null;
this._inStyling = false;
this._calculateColumnSummary = null;
this._styleHeaderRow = null;
this._styleGroupRow = null;
this._styleSeriesRow = null;
this._styleSummaryRow = null;
this._styleSeriesColumn = null;
this._styleSummaryColumn = null;
this._zoneRunner = null;
if (this._styling) {
NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
}
this._implementation = this.createImplementation();
if (renderer) {
this.container = renderer.createElement("div");
renderer.appendChild(_elRef.element.nativeElement, this.container);
renderer.setStyle(this.container, "display", "block");
renderer.setStyle(this.container, "width", "100%");
renderer.setStyle(this.container, "height", "100%");
}
var root;
root = this.container;
if (this.container != null) {
root = this.container;
}
if (root && root.nativeElement) {
root = root.nativeElement;
}
this._root = root;
var dataLegend = this.i;
this._dataLegend = dataLegend;
this._dataLegend.externalObject = this;
if (renderer) {
var ren = new AngularRenderer(root, this.renderer, window.document, this.ngZone, true, DataLegendStylingDefaults);
this._wrapper = ren;
dataLegend.provideContainer(ren);
dataLegend.notifySizeChanged();
ren.addSizeWatcher(() => {
this._dataLegend.notifySizeChanged();
});
}
}
// supports angular themes or custom properties set in CSS
updateStyle() {
this._styling(this._root, this);
}
ngOnDestroy() {
this._dataLegend.destroy();
this._wrapper.destroy();
}
ngAfterContentInit() {
this.updateStyle();
}
createImplementation() {
return new XamDataLegend();
}
get i() {
return this._implementation;
}
static _staticStyling(container, component, parent) {
let genericPrefix = "";
let typeName = (component.i ? component.i : component).$type.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
genericPrefix = toSpinal("DataLegend");
let additionalPrefixes = [];
let prefix = toSpinal(typeName);
additionalPrefixes.push(prefix + "-");
let 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);
}
let basePrefix = toSpinal(typeName);
additionalPrefixes.push(basePrefix + "-");
b = b.baseType;
}
if (parent) {
let parentTypeName = parent.i.$type.name;
if (parentTypeName.indexOf("Xam") === 0) {
parentTypeName = parentTypeName.substring(3);
}
let parentPrefix = toSpinal(parentTypeName);
additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
}
initializePropertiesFromCss(container, component, genericPrefix + "-", new Set(), false, additionalPrefixes);
}
/**
* Gets or sets the target for the data legend.
*/
get target() {
var ret = this.i.target;
if (!ret) {
return ret;
}
if (ret.externalObject != null) {
ret = ret.externalObject;
}
return ret;
}
set target(v) {
if (v && v._implementation) {
v = v._implementation;
}
this.i.target = v;
}
/**
* Gets whether or not at least one badge is visible based on BadgesShape and setting of a row's IsVisble in StyleSeriesRow event
*/
get actualBadgesVisible() {
return this.i.b0;
}
set actualBadgesVisible(v) {
this.i.b0 = ensureBool(v);
}
/**
* 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 actualPixelScalingRatio() {
return this.i.ct;
}
set actualPixelScalingRatio(v) {
this.i.ct = +v;
}
/**
* Gets the effective background of the data legend.
*/
get actualBackground() {
return brushToString(this.i.i5);
}
set actualBackground(v) {
this.i.i5 = stringToBrush(v);
}
/**
* Gets the effective border brush of the data legend.
*/
get actualBorderBrush() {
return brushToString(this.i.i6);
}
set actualBorderBrush(v) {
this.i.i6 = stringToBrush(v);
}
get actualBorderThicknessBottom() {
return this.i.js ? this.i.js.bottom : NaN;
}
set actualBorderThicknessBottom(v) {
this.ensureActualBorderThickness();
const __nv = +v;
if (this.i.js.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.js.left;
__copy.right = this.i.js.right;
__copy.top = this.i.js.top;
this.i.js = __copy;
}
get actualBorderThicknessLeft() {
return this.i.js ? this.i.js.left : NaN;
}
set actualBorderThicknessLeft(v) {
this.ensureActualBorderThickness();
const __nv = +v;
if (this.i.js.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.js.bottom;
__copy.right = this.i.js.right;
__copy.top = this.i.js.top;
this.i.js = __copy;
}
get actualBorderThicknessRight() {
return this.i.js ? this.i.js.right : NaN;
}
set actualBorderThicknessRight(v) {
this.ensureActualBorderThickness();
const __nv = +v;
if (this.i.js.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.js.bottom;
__copy.left = this.i.js.left;
__copy.top = this.i.js.top;
this.i.js = __copy;
}
get actualBorderThicknessTop() {
return this.i.js ? this.i.js.top : NaN;
}
set actualBorderThicknessTop(v) {
this.ensureActualBorderThickness();
const __nv = +v;
if (this.i.js.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.js.bottom;
__copy.left = this.i.js.left;
__copy.right = this.i.js.right;
this.i.js = __copy;
}
ensureActualBorderThickness() {
if (this.i.js) {
return;
}
this.i.js = new Thickness(2);
}
/**
* Gets or sets whether the legend is embedded in a DataTooltip
*/
get isEmbeddedInDataTooltip() {
return this.i.isEmbeddedInDataTooltip;
}
set isEmbeddedInDataTooltip(v) {
this.i.isEmbeddedInDataTooltip = ensureBool(v);
}
/**
* 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 includedSeries() {
return this.i.includedSeries;
}
set includedSeries(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.includedSeries = v;
}
/**
* 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 excludedSeries() {
return this.i.excludedSeries;
}
set excludedSeries(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.excludedSeries = v;
}
/**
* 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 includedColumns() {
return this.i.includedColumns;
}
set includedColumns(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.includedColumns = v;
}
/**
* 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 excludedColumns() {
return this.i.excludedColumns;
}
set excludedColumns(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.excludedColumns = v;
}
/**
* Gets or sets whether the data legend should update when the series data is mutated.
*/
get shouldUpdateWhenSeriesDataChanges() {
return this.i.b9;
}
set shouldUpdateWhenSeriesDataChanges(v) {
this.i.b9 = ensureBool(v);
}
/**
* Gets or sets mode for abbreviating large numbers displayed in the legend
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get valueFormatAbbreviation() {
return this.i.an;
}
set valueFormatAbbreviation(v) {
this.i.an = ensureEnum(DataAbbreviationMode_$type, v);
}
/**
* Gets or sets maximum digits for formatting numbers displayed in the legend
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get valueFormatMaxFractions() {
return this.i.c0;
}
set valueFormatMaxFractions(v) {
this.i.c0 = +v;
}
/**
* Gets or sets minimum digits for formatting numbers displayed in the legend
* This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
*/
get valueFormatMinFractions() {
return this.i.c1;
}
set valueFormatMinFractions(v) {
this.i.c1 = +v;
}
/**
* Gets or sets the mode for displaying values in the data legend, e.g. Currency ($500.25), Decimal (500.25), Integer (500)
*/
get valueFormatMode() {
return this.i.a5;
}
set valueFormatMode(v) {
this.i.a5 = ensureEnum(DataLegendValueMode_$type, v);
}
/**
* 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 valueFormatCulture() {
return this.i.fg;
}
set valueFormatCulture(v) {
this.i.fg = v;
}
/**
* 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 valueFormatCurrencyCode() {
return this.i.fi;
}
set valueFormatCurrencyCode(v) {
this.i.fi = v;
}
/**
* 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 valueFormatUseGrouping() {
return this.i.ca;
}
set valueFormatUseGrouping(v) {
this.i.ca = ensureBool(v);
}
/**
* Gets or sets the format string for values displayed in the data legend.
*/
get valueFormatString() {
return this.i.fo;
}
set valueFormatString(v) {
this.i.fo = v;
}
/**
* Gets or sets the format specifiers to use with the ValueFormatString string.
*/
get valueFormatSpecifiers() {
return this.i.ah;
}
set valueFormatSpecifiers(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.ah = v;
}
get valueRowMarginBottom() {
return this.i.j5 ? this.i.j5.bottom : NaN;
}
set valueRowMarginBottom(v) {
this.ensureValueRowMargin();
const __nv = +v;
if (this.i.j5.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.j5.left;
__copy.right = this.i.j5.right;
__copy.top = this.i.j5.top;
this.i.j5 = __copy;
}
get valueRowMarginLeft() {
return this.i.j5 ? this.i.j5.left : NaN;
}
set valueRowMarginLeft(v) {
this.ensureValueRowMargin();
const __nv = +v;
if (this.i.j5.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.j5.bottom;
__copy.right = this.i.j5.right;
__copy.top = this.i.j5.top;
this.i.j5 = __copy;
}
get valueRowMarginRight() {
return this.i.j5 ? this.i.j5.right : NaN;
}
set valueRowMarginRight(v) {
this.ensureValueRowMargin();
const __nv = +v;
if (this.i.j5.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.j5.bottom;
__copy.left = this.i.j5.left;
__copy.top = this.i.j5.top;
this.i.j5 = __copy;
}
get valueRowMarginTop() {
return this.i.j5 ? this.i.j5.top : NaN;
}
set valueRowMarginTop(v) {
this.ensureValueRowMargin();
const __nv = +v;
if (this.i.j5.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.j5.bottom;
__copy.left = this.i.j5.left;
__copy.right = this.i.j5.right;
this.i.j5 = __copy;
}
ensureValueRowMargin() {
if (this.i.j5) {
return;
}
this.i.j5 = new Thickness(2);
}
/**
* Gets or sets whether to show series rows.
*/
get valueRowVisible() {
return this.i.cb;
}
set valueRowVisible(v) {
this.i.cb = ensureBool(v);
}
/**
* Gets or sets text displayed when data column is missing a value, e.g. "no data"
*/
get valueTextWhenMissingData() {
return this.i.fx;
}
set valueTextWhenMissingData(v) {
this.i.fx = v;
}
/**
* Gets or sets whether to use series colors when displaying values in the legend
*/
get valueTextUseSeriesColors() {
return this.i.cc;
}
set valueTextUseSeriesColors(v) {
this.i.cc = ensureBool(v);
}
get valueTextMarginBottom() {
return this.i.j6 ? this.i.j6.bottom : NaN;
}
set valueTextMarginBottom(v) {
this.ensureValueTextMargin();
const __nv = +v;
if (this.i.j6.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.j6.left;
__copy.right = this.i.j6.right;
__copy.top = this.i.j6.top;
this.i.j6 = __copy;
}
get valueTextMarginLeft() {
return this.i.j6 ? this.i.j6.left : NaN;
}
set valueTextMarginLeft(v) {
this.ensureValueTextMargin();
const __nv = +v;
if (this.i.j6.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.j6.bottom;
__copy.right = this.i.j6.right;
__copy.top = this.i.j6.top;
this.i.j6 = __copy;
}
get valueTextMarginRight() {
return this.i.j6 ? this.i.j6.right : NaN;
}
set valueTextMarginRight(v) {
this.ensureValueTextMargin();
const __nv = +v;
if (this.i.j6.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.j6.bottom;
__copy.left = this.i.j6.left;
__copy.top = this.i.j6.top;
this.i.j6 = __copy;
}
get valueTextMarginTop() {
return this.i.j6 ? this.i.j6.top : NaN;
}
set valueTextMarginTop(v) {
this.ensureValueTextMargin();
const __nv = +v;
if (this.i.j6.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.j6.bottom;
__copy.left = this.i.j6.left;
__copy.right = this.i.j6.right;
this.i.j6 = __copy;
}
ensureValueTextMargin() {
if (this.i.j6) {
return;
}
this.i.j6 = new Thickness(2);
}
/**
* Gets or sets the units text color.
*/
get valueTextColor() {
return brushToString(this.i.jl);
}
set valueTextColor(v) {
this.i.jl = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get valueTextStyle() {
if (this.i.bx == null) {
return null;
}
return this.i.bx.fontString;
}
set valueTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bx = fi;
}
/**
* Gets or sets the format string for header text displayed in the data legend.
*/
get headerFormatString() {
return this.i.dv;
}
set headerFormatString(v) {
this.i.dv = v;
}
/**
* Gets or sets the format specifiers to use with the HeaderFormatString string.
*/
get headerFormatSpecifiers() {
return this.i.ag;
}
set headerFormatSpecifiers(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.ag = v;
}
/**
* 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 headerFormatCulture() {
return this.i.dr;
}
set headerFormatCulture(v) {
this.i.dr = v;
}
/**
* 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 headerFormatDate() {
return this.i.ap;
}
set headerFormatDate(v) {
this.i.ap = ensureEnum(DataLegendHeaderDateMode_$type, v);
}
/**
* 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 headerFormatTime() {
return this.i.aq;
}
set headerFormatTime(v) {
this.i.aq = ensureEnum(DataLegendHeaderTimeMode_$type, v);
}
/**
* Gets or sets the HeaderText for the data legend.
*/
get headerText() {
return this.i.d0;
}
set headerText(v) {
this.i.d0 = v;
}
/**
* Gets or sets the header text color.
*/
get headerTextColor() {
return brushToString(this.i.jc);
}
set headerTextColor(v) {
this.i.jc = stringToBrush(v);
}
get headerTextMarginBottom() {
return this.i.jy ? this.i.jy.bottom : NaN;
}
set headerTextMarginBottom(v) {
this.ensureHeaderTextMargin();
const __nv = +v;
if (this.i.jy.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.jy.left;
__copy.right = this.i.jy.right;
__copy.top = this.i.jy.top;
this.i.jy = __copy;
}
get headerTextMarginLeft() {
return this.i.jy ? this.i.jy.left : NaN;
}
set headerTextMarginLeft(v) {
this.ensureHeaderTextMargin();
const __nv = +v;
if (this.i.jy.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.jy.bottom;
__copy.right = this.i.jy.right;
__copy.top = this.i.jy.top;
this.i.jy = __copy;
}
get headerTextMarginRight() {
return this.i.jy ? this.i.jy.right : NaN;
}
set headerTextMarginRight(v) {
this.ensureHeaderTextMargin();
const __nv = +v;
if (this.i.jy.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.jy.bottom;
__copy.left = this.i.jy.left;
__copy.top = this.i.jy.top;
this.i.jy = __copy;
}
get headerTextMarginTop() {
return this.i.jy ? this.i.jy.top : NaN;
}
set headerTextMarginTop(v) {
this.ensureHeaderTextMargin();
const __nv = +v;
if (this.i.jy.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.jy.bottom;
__copy.left = this.i.jy.left;
__copy.right = this.i.jy.right;
this.i.jy = __copy;
}
ensureHeaderTextMargin() {
if (this.i.jy) {
return;
}
this.i.jy = new Thickness(2);
}
get headerRowMarginBottom() {
return this.i.jx ? this.i.jx.bottom : NaN;
}
set headerRowMarginBottom(v) {
this.ensureHeaderRowMargin();
const __nv = +v;
if (this.i.jx.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.jx.left;
__copy.right = this.i.jx.right;
__copy.top = this.i.jx.top;
this.i.jx = __copy;
}
get headerRowMarginLeft() {
return this.i.jx ? this.i.jx.left : NaN;
}
set headerRowMarginLeft(v) {
this.ensureHeaderRowMargin();
const __nv = +v;
if (this.i.jx.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.jx.bottom;
__copy.right = this.i.jx.right;
__copy.top = this.i.jx.top;
this.i.jx = __copy;
}
get headerRowMarginRight() {
return this.i.jx ? this.i.jx.right : NaN;
}
set headerRowMarginRight(v) {
this.ensureHeaderRowMargin();
const __nv = +v;
if (this.i.jx.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.jx.bottom;
__copy.left = this.i.jx.left;
__copy.top = this.i.jx.top;
this.i.jx = __copy;
}
get headerRowMarginTop() {
return this.i.jx ? this.i.jx.top : NaN;
}
set headerRowMarginTop(v) {
this.ensureHeaderRowMargin();
const __nv = +v;
if (this.i.jx.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.jx.bottom;
__copy.left = this.i.jx.left;
__copy.right = this.i.jx.right;
this.i.jx = __copy;
}
ensureHeaderRowMargin() {
if (this.i.jx) {
return;
}
this.i.jx = new Thickness(2);
}
/**
* Gets or sets whether to show Header row.
*/
get headerRowVisible() {
return this.i.b5;
}
set headerRowVisible(v) {
this.i.b5 = ensureBool(v);
}
/**
* Gets or Sets the style to use for the header text.
*/
get headerTextStyle() {
if (this.i.bp == null) {
return null;
}
return this.i.bp.fontString;
}
set headerTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bp = fi;
}
/**
* Gets or sets whether to show Header row.
*/
get groupRowVisible() {
return this.i.b3;
}
set groupRowVisible(v) {
this.i.b3 = ensureBool(v);
}
/**
* Gets or sets the Group text color.
*/
get groupTextColor() {
return brushToString(this.i.jb);
}
set groupTextColor(v) {
this.i.jb = stringToBrush(v);
}
get groupTextMarginBottom() {
return this.i.jw ? this.i.jw.bottom : NaN;
}
set groupTextMarginBottom(v) {
this.ensureGroupTextMargin();
const __nv = +v;
if (this.i.jw.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.jw.left;
__copy.right = this.i.jw.right;
__copy.top = this.i.jw.top;
this.i.jw = __copy;
}
get groupTextMarginLeft() {
return this.i.jw ? this.i.jw.left : NaN;
}
set groupTextMarginLeft(v) {
this.ensureGroupTextMargin();
const __nv = +v;
if (this.i.jw.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.jw.bottom;
__copy.right = this.i.jw.right;
__copy.top = this.i.jw.top;
this.i.jw = __copy;
}
get groupTextMarginRight() {
return this.i.jw ? this.i.jw.right : NaN;
}
set groupTextMarginRight(v) {
this.ensureGroupTextMargin();
const __nv = +v;
if (this.i.jw.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.jw.bottom;
__copy.left = this.i.jw.left;
__copy.top = this.i.jw.top;
this.i.jw = __copy;
}
get groupTextMarginTop() {
return this.i.jw ? this.i.jw.top : NaN;
}
set groupTextMarginTop(v) {
this.ensureGroupTextMargin();
const __nv = +v;
if (this.i.jw.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.jw.bottom;
__copy.left = this.i.jw.left;
__copy.right = this.i.jw.right;
this.i.jw = __copy;
}
ensureGroupTextMargin() {
if (this.i.jw) {
return;
}
this.i.jw = new Thickness(2);
}
get groupRowMarginBottom() {
return this.i.jv ? this.i.jv.bottom : NaN;
}
set groupRowMarginBottom(v) {
this.ensureGroupRowMargin();
const __nv = +v;
if (this.i.jv.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.jv.left;
__copy.right = this.i.jv.right;
__copy.top = this.i.jv.top;
this.i.jv = __copy;
}
get groupRowMarginLeft() {
return this.i.jv ? this.i.jv.left : NaN;
}
set groupRowMarginLeft(v) {
this.ensureGroupRowMargin();
const __nv = +v;
if (this.i.jv.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.jv.bottom;
__copy.right = this.i.jv.right;
__copy.top = this.i.jv.top;
this.i.jv = __copy;
}
get groupRowMarginRight() {
return this.i.jv ? this.i.jv.right : NaN;
}
set groupRowMarginRight(v) {
this.ensureGroupRowMargin();
const __nv = +v;
if (this.i.jv.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.jv.bottom;
__copy.left = this.i.jv.left;
__copy.top = this.i.jv.top;
this.i.jv = __copy;
}
get groupRowMarginTop() {
return this.i.jv ? this.i.jv.top : NaN;
}
set groupRowMarginTop(v) {
this.ensureGroupRowMargin();
const __nv = +v;
if (this.i.jv.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.jv.bottom;
__copy.left = this.i.jv.left;
__copy.right = this.i.jv.right;
this.i.jv = __copy;
}
ensureGroupRowMargin() {
if (this.i.jv) {
return;
}
this.i.jv = new Thickness(2);
}
/**
* Gets or Sets the style to use for the Group text.
*/
get groupTextStyle() {
if (this.i.bo == null) {
return null;
}
return this.i.bo.fontString;
}
set groupTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bo = fi;
}
/**
* Gets or sets the summary text color.
*/
get summaryTitleTextColor() {
return brushToString(this.i.jg);
}
set summaryTitleTextColor(v) {
this.i.jg = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the summary text.
*/
get summaryTitleTextStyle() {
if (this.i.bs == null) {
return null;
}
return this.i.bs.fontString;
}
set summaryTitleTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bs = fi;
}
/**
* Gets or sets the SummaryType for the data legend.
*/
get summaryType() {
return this.i.a3;
}
set summaryType(v) {
this.i.a3 = ensureEnum(DataLegendSummaryType_$type, v);
}
/**
* Gets or sets the SummaryTitleText for the data legend.
*/
get summaryTitleText() {
return this.i.er;
}
set summaryTitleText(v) {
this.i.er = v;
}
get summaryTitleTextMarginBottom() {
return this.i.j1 ? this.i.j1.bottom : NaN;
}
set summaryTitleTextMarginBottom(v) {
this.ensureSummaryTitleTextMargin();
const __nv = +v;
if (this.i.j1.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.j1.left;
__copy.right = this.i.j1.right;
__copy.top = this.i.j1.top;
this.i.j1 = __copy;
}
get summaryTitleTextMarginLeft() {
return this.i.j1 ? this.i.j1.left : NaN;
}
set summaryTitleTextMarginLeft(v) {
this.ensureSummaryTitleTextMargin();
const __nv = +v;
if (this.i.j1.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.j1.bottom;
__copy.right = this.i.j1.right;
__copy.top = this.i.j1.top;
this.i.j1 = __copy;
}
get summaryTitleTextMarginRight() {
return this.i.j1 ? this.i.j1.right : NaN;
}
set summaryTitleTextMarginRight(v) {
this.ensureSummaryTitleTextMargin();
const __nv = +v;
if (this.i.j1.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.j1.bottom;
__copy.left = this.i.j1.left;
__copy.top = this.i.j1.top;
this.i.j1 = __copy;
}
get summaryTitleTextMarginTop() {
return this.i.j1 ? this.i.j1.top : NaN;
}
set summaryTitleTextMarginTop(v) {
this.ensureSummaryTitleTextMargin();
const __nv = +v;
if (this.i.j1.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.j1.bottom;
__copy.left = this.i.j1.left;
__copy.right = this.i.j1.right;
this.i.j1 = __copy;
}
ensureSummaryTitleTextMargin() {
if (this.i.j1) {
return;
}
this.i.j1 = new Thickness(2);
}
get summaryRowMarginBottom() {
return this.i.j0 ? this.i.j0.bottom : NaN;
}
set summaryRowMarginBottom(v) {
this.ensureSummaryRowMargin();
const __nv = +v;
if (this.i.j0.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.j0.left;
__copy.right = this.i.j0.right;
__copy.top = this.i.j0.top;
this.i.j0 = __copy;
}
get summaryRowMarginLeft() {
return this.i.j0 ? this.i.j0.left : NaN;
}
set summaryRowMarginLeft(v) {
this.ensureSummaryRowMargin();
const __nv = +v;
if (this.i.j0.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.j0.bottom;
__copy.right = this.i.j0.right;
__copy.top = this.i.j0.top;
this.i.j0 = __copy;
}
get summaryRowMarginRight() {
return this.i.j0 ? this.i.j0.right : NaN;
}
set summaryRowMarginRight(v) {
this.ensureSummaryRowMargin();
const __nv = +v;
if (this.i.j0.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.j0.bottom;
__copy.left = this.i.j0.left;
__copy.top = this.i.j0.top;
this.i.j0 = __copy;
}
get summaryRowMarginTop() {
return this.i.j0 ? this.i.j0.top : NaN;
}
set summaryRowMarginTop(v) {
this.ensureSummaryRowMargin();
const __nv = +v;
if (this.i.j0.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.j0.bottom;
__copy.left = this.i.j0.left;
__copy.right = this.i.j0.right;
this.i.j0 = __copy;
}
ensureSummaryRowMargin() {
if (this.i.j0) {
return;
}
this.i.j0 = new Thickness(2);
}
/**
* Gets or sets the units text color.
*/
get summaryValueTextColor() {
return brushToString(this.i.ji);
}
set summaryValueTextColor(v) {
this.i.ji = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get summaryValueTextStyle() {
if (this.i.bu == null) {
return null;
}
return this.i.bu.fontString;
}
set summaryValueTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bu = fi;
}
/**
* Gets or sets the units text for the data legend.
*/
get summaryLabelText() {
return this.i.em;
}
set summaryLabelText(v) {
this.i.em = v;
}
/**
* Gets or sets the units text color.
*/
get summaryLabelTextColor() {
return brushToString(this.i.jf);
}
set summaryLabelTextColor(v) {
this.i.jf = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get summaryLabelTextStyle() {
if (this.i.br == null) {
return null;
}
return this.i.br.fontString;
}
set summaryLabelTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.br = fi;
}
/**
* Gets or sets the units text for the data legend.
*/
get summaryUnitsText() {
return this.i.ex;
}
set summaryUnitsText(v) {
this.i.ex = v;
}
/**
* Gets or sets the units text color.
*/
get summaryUnitsTextColor() {
return brushToString(this.i.jh);
}
set summaryUnitsTextColor(v) {
this.i.jh = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get summaryUnitsTextStyle() {
if (this.i.bt == null) {
return null;
}
return this.i.bt.fontString;
}
set summaryUnitsTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bt = fi;
}
get badgeMarginBottom() {
return this.i.jt ? this.i.jt.bottom : NaN;
}
set badgeMarginBottom(v) {
this.ensureBadgeMargin();
const __nv = +v;
if (this.i.jt.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.jt.left;
__copy.right = this.i.jt.right;
__copy.top = this.i.jt.top;
this.i.jt = __copy;
}
get badgeMarginLeft() {
return this.i.jt ? this.i.jt.left : NaN;
}
set badgeMarginLeft(v) {
this.ensureBadgeMargin();
const __nv = +v;
if (this.i.jt.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.jt.bottom;
__copy.right = this.i.jt.right;
__copy.top = this.i.jt.top;
this.i.jt = __copy;
}
get badgeMarginRight() {
return this.i.jt ? this.i.jt.right : NaN;
}
set badgeMarginRight(v) {
this.ensureBadgeMargin();
const __nv = +v;
if (this.i.jt.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.jt.bottom;
__copy.left = this.i.jt.left;
__copy.top = this.i.jt.top;
this.i.jt = __copy;
}
get badgeMarginTop() {
return this.i.jt ? this.i.jt.top : NaN;
}
set badgeMarginTop(v) {
this.ensureBadgeMargin();
const __nv = +v;
if (this.i.jt.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.jt.bottom;
__copy.left = this.i.jt.left;
__copy.right = this.i.jt.right;
this.i.jt = __copy;
}
ensureBadgeMargin() {
if (this.i.jt) {
return;
}
this.i.jt = new Thickness(2);
}
/**
* Gets or sets the BadgeShape for the data legend.
*/
get badgeShape() {
return this.i.ba;
}
set badgeShape(v) {
this.i.ba = ensureEnum(LegendItemBadgeShape_$type, v);
}
/**
* Gets or sets horizontal position (between 0.0 and 1.0) in viewport of the target component
*/
get targetCursorPositionX() {
return this.i.targetCursorPositionX;
}
set targetCursorPositionX(v) {
this.i.targetCursorPositionX = +v;
}
/**
* Gets or sets vertical position (between 0.0 and 1.0) in viewport of the target component
*/
get targetCursorPositionY() {
return this.i.targetCursorPositionY;
}
set targetCursorPositionY(v) {
this.i.targetCursorPositionY = +v;
}
/**
* Gets or sets the UnitsMode for the data legend.
*/
get unitsDisplayMode() {
return this.i.a4;
}
set unitsDisplayMode(v) {
this.i.a4 = ensureEnum(DataLegendUnitsMode_$type, v);
}
/**
* Gets or sets the units text for the data legend.
*/
get unitsText() {
return this.i.fa;
}
set unitsText(v) {
this.i.fa = v;
}
/**
* Gets or sets the units text color.
*/
get unitsTextColor() {
return brushToString(this.i.jk);
}
set unitsTextColor(v) {
this.i.jk = stringToBrush(v);
}
get unitsTextMarginBottom() {
return this.i.j3 ? this.i.j3.bottom : NaN;
}
set unitsTextMarginBottom(v) {
this.ensureUnitsTextMargin();
const __nv = +v;
if (this.i.j3.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.j3.left;
__copy.right = this.i.j3.right;
__copy.top = this.i.j3.top;
this.i.j3 = __copy;
}
get unitsTextMarginLeft() {
return this.i.j3 ? this.i.j3.left : NaN;
}
set unitsTextMarginLeft(v) {
this.ensureUnitsTextMargin();
const __nv = +v;
if (this.i.j3.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.j3.bottom;
__copy.right = this.i.j3.right;
__copy.top = this.i.j3.top;
this.i.j3 = __copy;
}
get unitsTextMarginRight() {
return this.i.j3 ? this.i.j3.right : NaN;
}
set unitsTextMarginRight(v) {
this.ensureUnitsTextMargin();
const __nv = +v;
if (this.i.j3.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.j3.bottom;
__copy.left = this.i.j3.left;
__copy.top = this.i.j3.top;
this.i.j3 = __copy;
}
get unitsTextMarginTop() {
return this.i.j3 ? this.i.j3.top : NaN;
}
set unitsTextMarginTop(v) {
this.ensureUnitsTextMargin();
const __nv = +v;
if (this.i.j3.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.j3.bottom;
__copy.left = this.i.j3.left;
__copy.right = this.i.j3.right;
this.i.j3 = __copy;
}
ensureUnitsTextMargin() {
if (this.i.j3) {
return;
}
this.i.j3 = new Thickness(2);
}
/**
* Gets or Sets the style to use for the units text.
*/
get unitsTextStyle() {
if (this.i.bw == null) {
return null;
}
return this.i.bw.fontString;
}
set unitsTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bw = fi;
}
get titleTextMarginBottom() {
return this.i.j2 ? this.i.j2.bottom : NaN;
}
set titleTextMarginBottom(v) {
this.ensureTitleTextMargin();
const __nv = +v;
if (this.i.j2.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.j2.left;
__copy.right = this.i.j2.right;
__copy.top = this.i.j2.top;
this.i.j2 = __copy;
}
get titleTextMarginLeft() {
return this.i.j2 ? this.i.j2.left : NaN;
}
set titleTextMarginLeft(v) {
this.ensureTitleTextMargin();
const __nv = +v;
if (this.i.j2.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.j2.bottom;
__copy.right = this.i.j2.right;
__copy.top = this.i.j2.top;
this.i.j2 = __copy;
}
get titleTextMarginRight() {
return this.i.j2 ? this.i.j2.right : NaN;
}
set titleTextMarginRight(v) {
this.ensureTitleTextMargin();
const __nv = +v;
if (this.i.j2.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.j2.bottom;
__copy.left = this.i.j2.left;
__copy.top = this.i.j2.top;
this.i.j2 = __copy;
}
get titleTextMarginTop() {
return this.i.j2 ? this.i.j2.top : NaN;
}
set titleTextMarginTop(v) {
this.ensureTitleTextMargin();
const __nv = +v;
if (this.i.j2.top === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.top = __nv;
__copy.bottom = this.i.j2.bottom;
__copy.left = this.i.j2.left;
__copy.right = this.i.j2.right;
this.i.j2 = __copy;
}
ensureTitleTextMargin() {
if (this.i.j2) {
return;
}
this.i.j2 = new Thickness(2);
}
/**
* Gets or sets the display text color.
*/
get titleTextColor() {
return brushToString(this.i.jj);
}
set titleTextColor(v) {
this.i.jj = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the display text.
*/
get titleTextStyle() {
if (this.i.bv == null) {
return null;
}
return this.i.bv.fontString;
}
set titleTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.bv = fi;
}
/**
* Gets or sets the mode for displaying labels before series values in the data legend, e.g. O: H: L: C: for financial series
*/
get labelDisplayMode() {
return this.i.ar;
}
set labelDisplayMode(v) {
this.i.ar = ensureEnum(DataLegendLabelMode_$type, v);
}
/**
* Gets or sets the units text color.
*/
get labelTextColor() {
return brushToString(this.i.jd);
}
set labelTextColor(v) {
this.i.jd = stringToBrush(v);
}
get labelTextMarginBottom() {
return this.i.jz ? this.i.jz.bottom : NaN;
}
set labelTextMarginBottom(v) {
this.ensureLabelTextMargin();
const __nv = +v;
if (this.i.jz.bottom === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.bottom = __nv;
__copy.left = this.i.jz.left;
__copy.right = this.i.jz.right;
__copy.top = this.i.jz.top;
this.i.jz = __copy;
}
get labelTextMarginLeft() {
return this.i.jz ? this.i.jz.left : NaN;
}
set labelTextMarginLeft(v) {
this.ensureLabelTextMargin();
const __nv = +v;
if (this.i.jz.left === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.left = __nv;
__copy.bottom = this.i.jz.bottom;
__copy.right = this.i.jz.right;
__copy.top = this.i.jz.top;
this.i.jz = __copy;
}
get labelTextMarginRight() {
return this.i.jz ? this.i.jz.right : NaN;
}
set labelTextMarginRight(v) {
this.ensureLabelTextMargin();
const __nv = +v;
if (this.i.jz.right === __nv) {
return;
}
const __copy = new Thickness(2);
__copy.right = __nv;
__copy.bottom = this.i.jz.bottom;
__copy.left = this.i.jz.left;
__copy.top = this.i.jz.top;
this.i.jz = __copy;
}
get labelTextMarginTop() {