igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,275 lines (1,272 loc) • 36 kB
JavaScript
import { IgrAxis } from "./igr-axis";
import { DataToolTipLayerGroupingMode_$type } from "igniteui-react-core";
import { DataTooltipGroupedPositionX_$type } from "igniteui-react-core";
import { DataTooltipGroupedPositionY_$type } from "igniteui-react-core";
import { DataAbbreviationMode_$type } from "igniteui-react-core";
import { DataLegendValueMode_$type } from "igniteui-react-core";
import { DataLegendHeaderDateMode_$type } from "igniteui-react-core";
import { DataLegendHeaderTimeMode_$type } from "igniteui-react-core";
import { DataLegendSummaryType_$type } from "igniteui-react-core";
import { LegendItemBadgeShape_$type } from "igniteui-react-core";
import { DataLegendLayoutMode_$type } from "igniteui-react-core";
import { DataLegendUnitsMode_$type } from "igniteui-react-core";
import { DataLegendLabelMode_$type } from "igniteui-react-core";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { DataToolTipLayer } from "./DataToolTipLayer";
import { ensureBool, ensureEnum, brushToString, stringToBrush, arrayFindByName } from "igniteui-react-core";
import { Thickness } from "igniteui-react-core";
import { FontInfo } from "igniteui-react-core";
/**
* Represents an annotation layer that displays grouped tooltips with summaries for series.
*/
export class IgrDataToolTipLayer extends IgrAnnotationLayer {
createImplementation() {
return new DataToolTipLayer();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
this._targetAxisName = null;
}
get isToolTipLayer() {
return this.i.f7;
}
/**
* Gets whether the series is an annotation layer displayed only when hovering over the chart.
*/
get isAnnotationHoverLayer() {
return this.i.eu;
}
/**
* Gets whether the default tooltip behaviors for the chart are disabled if this layer is present.
*/
get isDefaultTooltipBehaviorDisabled() {
return this.i.e5;
}
/**
* Gets or sets the Axis to target this annotation to. If null, this annotation layer will not render content.
*/
get targetAxis() {
const r = this.i.aa1;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = IgrAxis._createFromInternal(r);
if (e) {
e._implementation = r;
}
r.externalObject = e;
}
return r.externalObject;
}
set targetAxis(v) {
if (v != null && this._stylingContainer && v._styling)
v._styling(this._stylingContainer, this, this);
v == null ? this.i.aa1 = null : this.i.aa1 = v.i;
}
/**
* Gets or sets the name to use to resolve targetAxis from markup.
*/
get targetAxisName() {
return this._targetAxisName;
}
set targetAxisName(v) {
this._targetAxisName = v;
}
/**
* Gets or sets whether to use value interpolation when drawing the tooltips.
*/
get useInterpolation() {
return this.i.acj;
}
set useInterpolation(v) {
this.i.acj = ensureBool(v);
}
/**
* Gets or sets the grouping mode to apply to use for the tooltip layer.
*/
get groupingMode() {
return this.i.abk;
}
set groupingMode(v) {
this.i.abk = ensureEnum(DataToolTipLayerGroupingMode_$type, v);
}
/**
* Gets the actual resolved tooltip layer grouping mode.
*/
get actualGroupingMode() {
return this.i.abj;
}
set actualGroupingMode(v) {
this.i.abj = ensureEnum(DataToolTipLayerGroupingMode_$type, v);
}
/**
* Gets or sets the offset of the tooltip layer on the X axis.
*/
get positionOffsetX() {
return this.i.acs;
}
set positionOffsetX(v) {
this.i.acs = +v;
}
/**
* Gets or sets the offset of the tooltip layer on the Y axis.
*/
get positionOffsetY() {
return this.i.act;
}
set positionOffsetY(v) {
this.i.act = +v;
}
/**
* Gets or sets the default offset of the tooltip layer on the X axis.
*/
get defaultPositionOffsetX() {
return this.i.acq;
}
set defaultPositionOffsetX(v) {
this.i.acq = +v;
}
/**
* Gets or sets the default offset of the tooltip layer on the Y axis.
*/
get defaultPositionOffsetY() {
return this.i.acr;
}
set defaultPositionOffsetY(v) {
this.i.acr = +v;
}
/**
* Gets or sets the tooltip position mode on the X axis for grouped series.
*/
get groupedPositionModeX() {
return this.i.abc;
}
set groupedPositionModeX(v) {
this.i.abc = ensureEnum(DataTooltipGroupedPositionX_$type, v);
}
/**
* Gets the actual resolved tooltip position mode on the X axis for grouped series.
*/
get actualGroupedPositionModeX() {
return this.i.abb;
}
set actualGroupedPositionModeX(v) {
this.i.abb = ensureEnum(DataTooltipGroupedPositionX_$type, v);
}
/**
* Gets or sets the tooltip position mode on the Y axis for grouped series.
*/
get groupedPositionModeY() {
return this.i.abg;
}
set groupedPositionModeY(v) {
this.i.abg = ensureEnum(DataTooltipGroupedPositionY_$type, v);
}
/**
* Gets the actual resolved tooltip position mode on the Y axis for grouped series.
*/
get actualGroupedPositionModeY() {
return this.i.abf;
}
set actualGroupedPositionModeY(v) {
this.i.abf = ensureEnum(DataTooltipGroupedPositionY_$type, v);
}
/**
* Gets or sets whether the data legend should update when the series data is mutated.
*/
get shouldUpdateWhenSeriesDataChanges() {
return this.i.aci;
}
set shouldUpdateWhenSeriesDataChanges(v) {
this.i.aci = 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.aay;
}
set includedSeries(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aay = 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.aat;
}
set excludedSeries(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aat = v;
}
/**
* Gets or sets names of data columns or their labels to include in displaying in the data tooltip, e.g. "High, Low" or "H, L"
* The ExcludedColumns property takes precedence over values of IncludedColumns property
*/
get includedColumns() {
return this.i.aax;
}
set includedColumns(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aax = v;
}
/**
* Gets or sets names of data columns or their labels to exclude from displaying in the data tooltip, e.g. "High, Low" or "H, L"
* The ExcludedColumns property takes precedence over values of IncludedColumns property
*/
get excludedColumns() {
return this.i.aas;
}
set excludedColumns(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aas = 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.aa2;
}
set valueFormatAbbreviation(v) {
this.i.aa2 = 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.adt;
}
set valueFormatMaxFractions(v) {
this.i.adt = +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.adu;
}
set valueFormatMinFractions(v) {
this.i.adu = +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.aa9;
}
set valueFormatMode(v) {
this.i.aa9 = 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.afx;
}
set valueFormatCulture(v) {
this.i.afx = 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.ack;
}
set valueFormatUseGrouping(v) {
this.i.ack = ensureBool(v);
}
/**
* Gets or sets the format string for values displayed in the data legend.
*/
get valueFormatString() {
return this.i.af3;
}
set valueFormatString(v) {
this.i.af3 = v;
}
/**
* Gets or sets the format specifiers to use with the ValueFormatString string.
*/
get valueFormatSpecifiers() {
return this.i.aaz;
}
set valueFormatSpecifiers(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aaz = v;
}
get valueRowMarginBottom() {
return this.i.ai7 ? this.i.ai7.bottom : NaN;
}
set valueRowMarginBottom(v) {
this.ensureValueRowMargin();
this.i.ai7.bottom = +v;
this.i.ai7 = this.i.ai7;
}
get valueRowMarginLeft() {
return this.i.ai7 ? this.i.ai7.left : NaN;
}
set valueRowMarginLeft(v) {
this.ensureValueRowMargin();
this.i.ai7.left = +v;
this.i.ai7 = this.i.ai7;
}
get valueRowMarginRight() {
return this.i.ai7 ? this.i.ai7.right : NaN;
}
set valueRowMarginRight(v) {
this.ensureValueRowMargin();
this.i.ai7.right = +v;
this.i.ai7 = this.i.ai7;
}
get valueRowMarginTop() {
return this.i.ai7 ? this.i.ai7.top : NaN;
}
set valueRowMarginTop(v) {
this.ensureValueRowMargin();
this.i.ai7.top = +v;
this.i.ai7 = this.i.ai7;
}
ensureValueRowMargin() {
if (this.i.ai7) {
return;
}
this.i.ai7 = new Thickness(2);
}
/**
* Gets or sets whether to show series rows.
*/
get valueRowVisible() {
return this.i.acl;
}
set valueRowVisible(v) {
this.i.acl = ensureBool(v);
}
/**
* Gets or sets text displayed when data column is missing a value, e.g. "no data"
*/
get valueTextWhenMissingData() {
return this.i.agc;
}
set valueTextWhenMissingData(v) {
this.i.agc = v;
}
/**
* Gets or sets whether to use series colors when displaying values in the legend
*/
get valueTextUseSeriesColors() {
return this.i.acm;
}
set valueTextUseSeriesColors(v) {
this.i.acm = ensureBool(v);
}
get valueTextMarginBottom() {
return this.i.ai8 ? this.i.ai8.bottom : NaN;
}
set valueTextMarginBottom(v) {
this.ensureValueTextMargin();
this.i.ai8.bottom = +v;
this.i.ai8 = this.i.ai8;
}
get valueTextMarginLeft() {
return this.i.ai8 ? this.i.ai8.left : NaN;
}
set valueTextMarginLeft(v) {
this.ensureValueTextMargin();
this.i.ai8.left = +v;
this.i.ai8 = this.i.ai8;
}
get valueTextMarginRight() {
return this.i.ai8 ? this.i.ai8.right : NaN;
}
set valueTextMarginRight(v) {
this.ensureValueTextMargin();
this.i.ai8.right = +v;
this.i.ai8 = this.i.ai8;
}
get valueTextMarginTop() {
return this.i.ai8 ? this.i.ai8.top : NaN;
}
set valueTextMarginTop(v) {
this.ensureValueTextMargin();
this.i.ai8.top = +v;
this.i.ai8 = this.i.ai8;
}
ensureValueTextMargin() {
if (this.i.ai8) {
return;
}
this.i.ai8 = new Thickness(2);
}
/**
* Gets or sets the units text color.
*/
get valueTextColor() {
return brushToString(this.i.aiq);
}
set valueTextColor(v) {
this.i.aiq = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get valueTextStyle() {
if (this.i.ab8 == null) {
return null;
}
return this.i.ab8.fontString;
}
set valueTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab8 = fi;
}
/**
* Gets or sets the format string for header text displayed in the data legend.
*/
get headerFormatString() {
return this.i.aeh;
}
set headerFormatString(v) {
this.i.aeh = v;
}
/**
* Gets or sets the format specifiers to use with the HeaderFormatString string.
*/
get headerFormatSpecifiers() {
return this.i.aaw;
}
set headerFormatSpecifiers(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aaw = v;
}
/**
* Gets or sets globalization culture when displaying header as date time
* This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
*/
get headerFormatCulture() {
return this.i.aed;
}
set headerFormatCulture(v) {
this.i.aed = v;
}
/**
* Gets or sets date format for the header
* This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
*/
get headerFormatDate() {
return this.i.aa3;
}
set headerFormatDate(v) {
this.i.aa3 = ensureEnum(DataLegendHeaderDateMode_$type, v);
}
/**
* Gets or sets time format for the header
* This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
*/
get headerFormatTime() {
return this.i.aa4;
}
set headerFormatTime(v) {
this.i.aa4 = ensureEnum(DataLegendHeaderTimeMode_$type, v);
}
/**
* Gets or sets the HeaderText for the data legend.
*/
get headerText() {
return this.i.aem;
}
set headerText(v) {
this.i.aem = v;
}
/**
* Gets or sets the header text color.
*/
get headerTextColor() {
return brushToString(this.i.aig);
}
set headerTextColor(v) {
this.i.aig = stringToBrush(v);
}
get headerTextMarginBottom() {
return this.i.ai1 ? this.i.ai1.bottom : NaN;
}
set headerTextMarginBottom(v) {
this.ensureHeaderTextMargin();
this.i.ai1.bottom = +v;
this.i.ai1 = this.i.ai1;
}
get headerTextMarginLeft() {
return this.i.ai1 ? this.i.ai1.left : NaN;
}
set headerTextMarginLeft(v) {
this.ensureHeaderTextMargin();
this.i.ai1.left = +v;
this.i.ai1 = this.i.ai1;
}
get headerTextMarginRight() {
return this.i.ai1 ? this.i.ai1.right : NaN;
}
set headerTextMarginRight(v) {
this.ensureHeaderTextMargin();
this.i.ai1.right = +v;
this.i.ai1 = this.i.ai1;
}
get headerTextMarginTop() {
return this.i.ai1 ? this.i.ai1.top : NaN;
}
set headerTextMarginTop(v) {
this.ensureHeaderTextMargin();
this.i.ai1.top = +v;
this.i.ai1 = this.i.ai1;
}
ensureHeaderTextMargin() {
if (this.i.ai1) {
return;
}
this.i.ai1 = new Thickness(2);
}
get headerRowMarginBottom() {
return this.i.ai0 ? this.i.ai0.bottom : NaN;
}
set headerRowMarginBottom(v) {
this.ensureHeaderRowMargin();
this.i.ai0.bottom = +v;
this.i.ai0 = this.i.ai0;
}
get headerRowMarginLeft() {
return this.i.ai0 ? this.i.ai0.left : NaN;
}
set headerRowMarginLeft(v) {
this.ensureHeaderRowMargin();
this.i.ai0.left = +v;
this.i.ai0 = this.i.ai0;
}
get headerRowMarginRight() {
return this.i.ai0 ? this.i.ai0.right : NaN;
}
set headerRowMarginRight(v) {
this.ensureHeaderRowMargin();
this.i.ai0.right = +v;
this.i.ai0 = this.i.ai0;
}
get headerRowMarginTop() {
return this.i.ai0 ? this.i.ai0.top : NaN;
}
set headerRowMarginTop(v) {
this.ensureHeaderRowMargin();
this.i.ai0.top = +v;
this.i.ai0 = this.i.ai0;
}
ensureHeaderRowMargin() {
if (this.i.ai0) {
return;
}
this.i.ai0 = new Thickness(2);
}
/**
* Gets or sets whether to show Header row.
*/
get headerRowVisible() {
return this.i.acb;
}
set headerRowVisible(v) {
this.i.acb = ensureBool(v);
}
/**
* Gets or Sets the style to use for the header text.
*/
get headerTextStyle() {
if (this.i.ab0 == null) {
return null;
}
return this.i.ab0.fontString;
}
set headerTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab0 = fi;
}
/**
* Gets or sets whether to show Header row.
*/
get groupRowVisible() {
return this.i.aca;
}
set groupRowVisible(v) {
this.i.aca = ensureBool(v);
}
/**
* Gets or sets the Group text color.
*/
get groupTextColor() {
return brushToString(this.i.aif);
}
set groupTextColor(v) {
this.i.aif = stringToBrush(v);
}
get groupTextMarginBottom() {
return this.i.aiz ? this.i.aiz.bottom : NaN;
}
set groupTextMarginBottom(v) {
this.ensureGroupTextMargin();
this.i.aiz.bottom = +v;
this.i.aiz = this.i.aiz;
}
get groupTextMarginLeft() {
return this.i.aiz ? this.i.aiz.left : NaN;
}
set groupTextMarginLeft(v) {
this.ensureGroupTextMargin();
this.i.aiz.left = +v;
this.i.aiz = this.i.aiz;
}
get groupTextMarginRight() {
return this.i.aiz ? this.i.aiz.right : NaN;
}
set groupTextMarginRight(v) {
this.ensureGroupTextMargin();
this.i.aiz.right = +v;
this.i.aiz = this.i.aiz;
}
get groupTextMarginTop() {
return this.i.aiz ? this.i.aiz.top : NaN;
}
set groupTextMarginTop(v) {
this.ensureGroupTextMargin();
this.i.aiz.top = +v;
this.i.aiz = this.i.aiz;
}
ensureGroupTextMargin() {
if (this.i.aiz) {
return;
}
this.i.aiz = new Thickness(2);
}
get groupRowMarginBottom() {
return this.i.aiy ? this.i.aiy.bottom : NaN;
}
set groupRowMarginBottom(v) {
this.ensureGroupRowMargin();
this.i.aiy.bottom = +v;
this.i.aiy = this.i.aiy;
}
get groupRowMarginLeft() {
return this.i.aiy ? this.i.aiy.left : NaN;
}
set groupRowMarginLeft(v) {
this.ensureGroupRowMargin();
this.i.aiy.left = +v;
this.i.aiy = this.i.aiy;
}
get groupRowMarginRight() {
return this.i.aiy ? this.i.aiy.right : NaN;
}
set groupRowMarginRight(v) {
this.ensureGroupRowMargin();
this.i.aiy.right = +v;
this.i.aiy = this.i.aiy;
}
get groupRowMarginTop() {
return this.i.aiy ? this.i.aiy.top : NaN;
}
set groupRowMarginTop(v) {
this.ensureGroupRowMargin();
this.i.aiy.top = +v;
this.i.aiy = this.i.aiy;
}
ensureGroupRowMargin() {
if (this.i.aiy) {
return;
}
this.i.aiy = new Thickness(2);
}
/**
* Gets or Sets the style to use for the Group text.
*/
get groupTextStyle() {
if (this.i.abz == null) {
return null;
}
return this.i.abz.fontString;
}
set groupTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.abz = fi;
}
/**
* Gets or sets the summary text color.
*/
get summaryTitleTextColor() {
return brushToString(this.i.aij);
}
set summaryTitleTextColor(v) {
this.i.aij = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the summary text.
*/
get summaryTitleTextStyle() {
if (this.i.ab3 == null) {
return null;
}
return this.i.ab3.fontString;
}
set summaryTitleTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab3 = fi;
}
/**
* Gets or sets the SummaryType for the data legend.
*/
get summaryType() {
return this.i.aa7;
}
set summaryType(v) {
this.i.aa7 = ensureEnum(DataLegendSummaryType_$type, v);
}
/**
* Gets or sets the SummaryTitleText for the data legend.
*/
get summaryTitleText() {
return this.i.ae6;
}
set summaryTitleText(v) {
this.i.ae6 = v;
}
get summaryTitleTextMarginBottom() {
return this.i.ai4 ? this.i.ai4.bottom : NaN;
}
set summaryTitleTextMarginBottom(v) {
this.ensureSummaryTitleTextMargin();
this.i.ai4.bottom = +v;
this.i.ai4 = this.i.ai4;
}
get summaryTitleTextMarginLeft() {
return this.i.ai4 ? this.i.ai4.left : NaN;
}
set summaryTitleTextMarginLeft(v) {
this.ensureSummaryTitleTextMargin();
this.i.ai4.left = +v;
this.i.ai4 = this.i.ai4;
}
get summaryTitleTextMarginRight() {
return this.i.ai4 ? this.i.ai4.right : NaN;
}
set summaryTitleTextMarginRight(v) {
this.ensureSummaryTitleTextMargin();
this.i.ai4.right = +v;
this.i.ai4 = this.i.ai4;
}
get summaryTitleTextMarginTop() {
return this.i.ai4 ? this.i.ai4.top : NaN;
}
set summaryTitleTextMarginTop(v) {
this.ensureSummaryTitleTextMargin();
this.i.ai4.top = +v;
this.i.ai4 = this.i.ai4;
}
ensureSummaryTitleTextMargin() {
if (this.i.ai4) {
return;
}
this.i.ai4 = new Thickness(2);
}
get summaryRowMarginBottom() {
return this.i.ai3 ? this.i.ai3.bottom : NaN;
}
set summaryRowMarginBottom(v) {
this.ensureSummaryRowMargin();
this.i.ai3.bottom = +v;
this.i.ai3 = this.i.ai3;
}
get summaryRowMarginLeft() {
return this.i.ai3 ? this.i.ai3.left : NaN;
}
set summaryRowMarginLeft(v) {
this.ensureSummaryRowMargin();
this.i.ai3.left = +v;
this.i.ai3 = this.i.ai3;
}
get summaryRowMarginRight() {
return this.i.ai3 ? this.i.ai3.right : NaN;
}
set summaryRowMarginRight(v) {
this.ensureSummaryRowMargin();
this.i.ai3.right = +v;
this.i.ai3 = this.i.ai3;
}
get summaryRowMarginTop() {
return this.i.ai3 ? this.i.ai3.top : NaN;
}
set summaryRowMarginTop(v) {
this.ensureSummaryRowMargin();
this.i.ai3.top = +v;
this.i.ai3 = this.i.ai3;
}
ensureSummaryRowMargin() {
if (this.i.ai3) {
return;
}
this.i.ai3 = new Thickness(2);
}
/**
* Gets or sets the units text color.
*/
get summaryValueTextColor() {
return brushToString(this.i.ail);
}
set summaryValueTextColor(v) {
this.i.ail = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get summaryValueTextStyle() {
if (this.i.ab5 == null) {
return null;
}
return this.i.ab5.fontString;
}
set summaryValueTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab5 = fi;
}
/**
* Gets or sets the units text for the data legend.
*/
get summaryLabelText() {
return this.i.ae1;
}
set summaryLabelText(v) {
this.i.ae1 = v;
}
/**
* Gets or sets the units text color.
*/
get summaryLabelTextColor() {
return brushToString(this.i.aii);
}
set summaryLabelTextColor(v) {
this.i.aii = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get summaryLabelTextStyle() {
if (this.i.ab2 == null) {
return null;
}
return this.i.ab2.fontString;
}
set summaryLabelTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab2 = fi;
}
/**
* Gets or sets the units text for the data legend.
*/
get summaryUnitsText() {
return this.i.afc;
}
set summaryUnitsText(v) {
this.i.afc = v;
}
/**
* Gets or sets the units text color.
*/
get summaryUnitsTextColor() {
return brushToString(this.i.aik);
}
set summaryUnitsTextColor(v) {
this.i.aik = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the units text.
*/
get summaryUnitsTextStyle() {
if (this.i.ab4 == null) {
return null;
}
return this.i.ab4.fontString;
}
set summaryUnitsTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab4 = fi;
}
get badgeMarginBottom() {
return this.i.aix ? this.i.aix.bottom : NaN;
}
set badgeMarginBottom(v) {
this.ensureBadgeMargin();
this.i.aix.bottom = +v;
this.i.aix = this.i.aix;
}
get badgeMarginLeft() {
return this.i.aix ? this.i.aix.left : NaN;
}
set badgeMarginLeft(v) {
this.ensureBadgeMargin();
this.i.aix.left = +v;
this.i.aix = this.i.aix;
}
get badgeMarginRight() {
return this.i.aix ? this.i.aix.right : NaN;
}
set badgeMarginRight(v) {
this.ensureBadgeMargin();
this.i.aix.right = +v;
this.i.aix = this.i.aix;
}
get badgeMarginTop() {
return this.i.aix ? this.i.aix.top : NaN;
}
set badgeMarginTop(v) {
this.ensureBadgeMargin();
this.i.aix.top = +v;
this.i.aix = this.i.aix;
}
ensureBadgeMargin() {
if (this.i.aix) {
return;
}
this.i.aix = new Thickness(2);
}
/**
* Gets or sets the BadgeShape for the data legend.
*/
get badgeShape() {
return this.i.abo;
}
set badgeShape(v) {
this.i.abo = ensureEnum(LegendItemBadgeShape_$type, v);
}
/**
* Gets or sets the layout of content in the data legend
*/
get layoutMode() {
return this.i.aa6;
}
set layoutMode(v) {
this.i.aa6 = ensureEnum(DataLegendLayoutMode_$type, v);
}
/**
* Gets or sets the UnitsMode for the data legend.
*/
get unitsDisplayMode() {
return this.i.aa8;
}
set unitsDisplayMode(v) {
this.i.aa8 = ensureEnum(DataLegendUnitsMode_$type, v);
}
/**
* Gets or sets the units text for the data legend.
*/
get unitsText() {
return this.i.afq;
}
set unitsText(v) {
this.i.afq = v;
}
/**
* Gets or sets the units text color.
*/
get unitsTextColor() {
return brushToString(this.i.aip);
}
set unitsTextColor(v) {
this.i.aip = stringToBrush(v);
}
get unitsTextMarginBottom() {
return this.i.ai6 ? this.i.ai6.bottom : NaN;
}
set unitsTextMarginBottom(v) {
this.ensureUnitsTextMargin();
this.i.ai6.bottom = +v;
this.i.ai6 = this.i.ai6;
}
get unitsTextMarginLeft() {
return this.i.ai6 ? this.i.ai6.left : NaN;
}
set unitsTextMarginLeft(v) {
this.ensureUnitsTextMargin();
this.i.ai6.left = +v;
this.i.ai6 = this.i.ai6;
}
get unitsTextMarginRight() {
return this.i.ai6 ? this.i.ai6.right : NaN;
}
set unitsTextMarginRight(v) {
this.ensureUnitsTextMargin();
this.i.ai6.right = +v;
this.i.ai6 = this.i.ai6;
}
get unitsTextMarginTop() {
return this.i.ai6 ? this.i.ai6.top : NaN;
}
set unitsTextMarginTop(v) {
this.ensureUnitsTextMargin();
this.i.ai6.top = +v;
this.i.ai6 = this.i.ai6;
}
ensureUnitsTextMargin() {
if (this.i.ai6) {
return;
}
this.i.ai6 = new Thickness(2);
}
/**
* Gets or Sets the style to use for the units text.
*/
get unitsTextStyle() {
if (this.i.ab7 == null) {
return null;
}
return this.i.ab7.fontString;
}
set unitsTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab7 = fi;
}
get titleTextMarginBottom() {
return this.i.ai5 ? this.i.ai5.bottom : NaN;
}
set titleTextMarginBottom(v) {
this.ensureTitleTextMargin();
this.i.ai5.bottom = +v;
this.i.ai5 = this.i.ai5;
}
get titleTextMarginLeft() {
return this.i.ai5 ? this.i.ai5.left : NaN;
}
set titleTextMarginLeft(v) {
this.ensureTitleTextMargin();
this.i.ai5.left = +v;
this.i.ai5 = this.i.ai5;
}
get titleTextMarginRight() {
return this.i.ai5 ? this.i.ai5.right : NaN;
}
set titleTextMarginRight(v) {
this.ensureTitleTextMargin();
this.i.ai5.right = +v;
this.i.ai5 = this.i.ai5;
}
get titleTextMarginTop() {
return this.i.ai5 ? this.i.ai5.top : NaN;
}
set titleTextMarginTop(v) {
this.ensureTitleTextMargin();
this.i.ai5.top = +v;
this.i.ai5 = this.i.ai5;
}
ensureTitleTextMargin() {
if (this.i.ai5) {
return;
}
this.i.ai5 = new Thickness(2);
}
/**
* Gets or sets the display text color.
*/
get titleTextColor() {
return brushToString(this.i.aim);
}
set titleTextColor(v) {
this.i.aim = stringToBrush(v);
}
/**
* Gets or Sets the style to use for the display text.
*/
get titleTextStyle() {
if (this.i.ab6 == null) {
return null;
}
return this.i.ab6.fontString;
}
set titleTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab6 = 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.aa5;
}
set labelDisplayMode(v) {
this.i.aa5 = ensureEnum(DataLegendLabelMode_$type, v);
}
/**
* Gets or sets the units text color.
*/
get labelTextColor() {
return brushToString(this.i.aih);
}
set labelTextColor(v) {
this.i.aih = stringToBrush(v);
}
get labelTextMarginBottom() {
return this.i.ai2 ? this.i.ai2.bottom : NaN;
}
set labelTextMarginBottom(v) {
this.ensureLabelTextMargin();
this.i.ai2.bottom = +v;
this.i.ai2 = this.i.ai2;
}
get labelTextMarginLeft() {
return this.i.ai2 ? this.i.ai2.left : NaN;
}
set labelTextMarginLeft(v) {
this.ensureLabelTextMargin();
this.i.ai2.left = +v;
this.i.ai2 = this.i.ai2;
}
get labelTextMarginRight() {
return this.i.ai2 ? this.i.ai2.right : NaN;
}
set labelTextMarginRight(v) {
this.ensureLabelTextMargin();
this.i.ai2.right = +v;
this.i.ai2 = this.i.ai2;
}
get labelTextMarginTop() {
return this.i.ai2 ? this.i.ai2.top : NaN;
}
set labelTextMarginTop(v) {
this.ensureLabelTextMargin();
this.i.ai2.top = +v;
this.i.ai2 = this.i.ai2;
}
ensureLabelTextMargin() {
if (this.i.ai2) {
return;
}
this.i.ai2 = new Thickness(2);
}
/**
* Gets or Sets the style to use for the units text.
*/
get labelTextStyle() {
if (this.i.ab1 == null) {
return null;
}
return this.i.ab1.fontString;
}
set labelTextStyle(v) {
let fi = new FontInfo();
fi.fontString = v;
this.i.ab1 = fi;
}
/**
* Gets or sets the background of the tooltip containers.
*/
get toolTipBackground() {
return brushToString(this.i.ain);
}
set toolTipBackground(v) {
this.i.ain = stringToBrush(v);
}
/**
* Gets or sets the border color of the tooltip containers.
*/
get toolTipBorderBrush() {
return brushToString(this.i.aio);
}
set toolTipBorderBrush(v) {
this.i.aio = stringToBrush(v);
}
/**
* Gets or sets the border thickness of the tooltip containers.
*/
get toolTipBorderThickness() {
return this.i.acy;
}
set toolTipBorderThickness(v) {
this.i.acy = +v;
}
bindAxes(axes) {
super.bindAxes(axes);
for (let i = 0; i < axes.length; i++) {
if (this.targetAxisName && this.targetAxisName.length > 0 &&
axes[i].name == this.targetAxisName) {
this.targetAxis = axes[i];
}
}
}
findByName(name) {
var baseResult = super.findByName(name);
if (baseResult) {
return baseResult;
}
if (this.targetAxis && this.targetAxis.name && this.targetAxis.name == name) {
return this.targetAxis;
}
if (this.valueFormatSpecifiers != null && arrayFindByName(this.valueFormatSpecifiers, name)) {
return arrayFindByName(this.valueFormatSpecifiers, name);
}
if (this.headerFormatSpecifiers != null && arrayFindByName(this.headerFormatSpecifiers, name)) {
return arrayFindByName(this.headerFormatSpecifiers, name);
}
return null;
}
_styling(container, component, parent) {
super._styling(container, component, parent);
this._inStyling = true;
if (this.targetAxis && this.targetAxis._styling) {
this.targetAxis._styling(container, component, this);
}
this._inStyling = false;
}
/**
* Hides any tooltips presented by the layer, if any.
*/
hideToolTips() {
this.i.ql();
}
/**
* Hides any tooltips presented by the layer, if any.
*/
hideToolTipsImmediate() {
this.i.qm();
}
}