UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

1,272 lines (1,269 loc) 35.9 kB
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; } /** * Gets whether the series is an annotation layer displayed only when hovering over the chart. */ get isAnnotationHoverLayer() { return this.i.et; } /** * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present. */ get isDefaultTooltipBehaviorDisabled() { return this.i.e4; } /** * 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.aap; 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.aap = null : this.i.aap = 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.ab7; } set useInterpolation(v) { this.i.ab7 = ensureBool(v); } /** * Gets or sets the grouping mode to apply to use for the tooltip layer. */ get groupingMode() { return this.i.aa8; } set groupingMode(v) { this.i.aa8 = ensureEnum(DataToolTipLayerGroupingMode_$type, v); } /** * Gets the actual resolved tooltip layer grouping mode. */ get actualGroupingMode() { return this.i.aa7; } set actualGroupingMode(v) { this.i.aa7 = ensureEnum(DataToolTipLayerGroupingMode_$type, v); } /** * Gets or sets the offset of the tooltip layer on the X axis. */ get positionOffsetX() { return this.i.acg; } set positionOffsetX(v) { this.i.acg = +v; } /** * Gets or sets the offset of the tooltip layer on the Y axis. */ get positionOffsetY() { return this.i.ach; } set positionOffsetY(v) { this.i.ach = +v; } /** * Gets or sets the default offset of the tooltip layer on the X axis. */ get defaultPositionOffsetX() { return this.i.ace; } set defaultPositionOffsetX(v) { this.i.ace = +v; } /** * Gets or sets the default offset of the tooltip layer on the Y axis. */ get defaultPositionOffsetY() { return this.i.acf; } set defaultPositionOffsetY(v) { this.i.acf = +v; } /** * Gets or sets the tooltip position mode on the X axis for grouped series. */ get groupedPositionModeX() { return this.i.aa0; } set groupedPositionModeX(v) { this.i.aa0 = ensureEnum(DataTooltipGroupedPositionX_$type, v); } /** * Gets the actual resolved tooltip position mode on the X axis for grouped series. */ get actualGroupedPositionModeX() { return this.i.aaz; } set actualGroupedPositionModeX(v) { this.i.aaz = ensureEnum(DataTooltipGroupedPositionX_$type, v); } /** * Gets or sets the tooltip position mode on the Y axis for grouped series. */ get groupedPositionModeY() { return this.i.aa4; } set groupedPositionModeY(v) { this.i.aa4 = ensureEnum(DataTooltipGroupedPositionY_$type, v); } /** * Gets the actual resolved tooltip position mode on the Y axis for grouped series. */ get actualGroupedPositionModeY() { return this.i.aa3; } set actualGroupedPositionModeY(v) { this.i.aa3 = ensureEnum(DataTooltipGroupedPositionY_$type, v); } /** * Gets or sets whether the data legend should update when the series data is mutated. */ get shouldUpdateWhenSeriesDataChanges() { return this.i.ab6; } set shouldUpdateWhenSeriesDataChanges(v) { this.i.ab6 = 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.aam; } set includedSeries(v) { if (v && !Array.isArray(v) && typeof (v) == "string") { const re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.aam = 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.aah; } set excludedSeries(v) { if (v && !Array.isArray(v) && typeof (v) == "string") { const re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.aah = 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.aal; } set includedColumns(v) { if (v && !Array.isArray(v) && typeof (v) == "string") { const re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.aal = 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.aag; } set excludedColumns(v) { if (v && !Array.isArray(v) && typeof (v) == "string") { const re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.aag = 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.aaq; } set valueFormatAbbreviation(v) { this.i.aaq = 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.adh; } set valueFormatMaxFractions(v) { this.i.adh = +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.adi; } set valueFormatMinFractions(v) { this.i.adi = +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.aax; } set valueFormatMode(v) { this.i.aax = 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.afl; } set valueFormatCulture(v) { this.i.afl = 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.ab8; } set valueFormatUseGrouping(v) { this.i.ab8 = ensureBool(v); } /** * Gets or sets the format string for values displayed in the data legend. */ get valueFormatString() { return this.i.afr; } set valueFormatString(v) { this.i.afr = v; } /** * Gets or sets the format specifiers to use with the ValueFormatString string. */ get valueFormatSpecifiers() { return this.i.aan; } set valueFormatSpecifiers(v) { if (v && !Array.isArray(v) && typeof (v) == "string") { const re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.aan = v; } get valueRowMarginBottom() { return this.i.aiv ? this.i.aiv.bottom : NaN; } set valueRowMarginBottom(v) { this.ensureValueRowMargin(); this.i.aiv.bottom = +v; this.i.aiv = this.i.aiv; } get valueRowMarginLeft() { return this.i.aiv ? this.i.aiv.left : NaN; } set valueRowMarginLeft(v) { this.ensureValueRowMargin(); this.i.aiv.left = +v; this.i.aiv = this.i.aiv; } get valueRowMarginRight() { return this.i.aiv ? this.i.aiv.right : NaN; } set valueRowMarginRight(v) { this.ensureValueRowMargin(); this.i.aiv.right = +v; this.i.aiv = this.i.aiv; } get valueRowMarginTop() { return this.i.aiv ? this.i.aiv.top : NaN; } set valueRowMarginTop(v) { this.ensureValueRowMargin(); this.i.aiv.top = +v; this.i.aiv = this.i.aiv; } ensureValueRowMargin() { if (this.i.aiv) { return; } this.i.aiv = new Thickness(2); } /** * Gets or sets whether to show series rows. */ get valueRowVisible() { return this.i.ab9; } set valueRowVisible(v) { this.i.ab9 = ensureBool(v); } /** * Gets or sets text displayed when data column is missing a value, e.g. "no data" */ get valueTextWhenMissingData() { return this.i.af0; } set valueTextWhenMissingData(v) { this.i.af0 = v; } /** * Gets or sets whether to use series colors when displaying values in the legend */ get valueTextUseSeriesColors() { return this.i.aca; } set valueTextUseSeriesColors(v) { this.i.aca = ensureBool(v); } get valueTextMarginBottom() { return this.i.aiw ? this.i.aiw.bottom : NaN; } set valueTextMarginBottom(v) { this.ensureValueTextMargin(); this.i.aiw.bottom = +v; this.i.aiw = this.i.aiw; } get valueTextMarginLeft() { return this.i.aiw ? this.i.aiw.left : NaN; } set valueTextMarginLeft(v) { this.ensureValueTextMargin(); this.i.aiw.left = +v; this.i.aiw = this.i.aiw; } get valueTextMarginRight() { return this.i.aiw ? this.i.aiw.right : NaN; } set valueTextMarginRight(v) { this.ensureValueTextMargin(); this.i.aiw.right = +v; this.i.aiw = this.i.aiw; } get valueTextMarginTop() { return this.i.aiw ? this.i.aiw.top : NaN; } set valueTextMarginTop(v) { this.ensureValueTextMargin(); this.i.aiw.top = +v; this.i.aiw = this.i.aiw; } ensureValueTextMargin() { if (this.i.aiw) { return; } this.i.aiw = new Thickness(2); } /** * Gets or sets the units text color. */ get valueTextColor() { return brushToString(this.i.aie); } set valueTextColor(v) { this.i.aie = stringToBrush(v); } /** * Gets or Sets the style to use for the units text. */ get valueTextStyle() { if (this.i.abw == null) { return null; } return this.i.abw.fontString; } set valueTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abw = fi; } /** * Gets or sets the format string for header text displayed in the data legend. */ get headerFormatString() { return this.i.ad5; } set headerFormatString(v) { this.i.ad5 = v; } /** * Gets or sets the format specifiers to use with the HeaderFormatString string. */ get headerFormatSpecifiers() { return this.i.aak; } set headerFormatSpecifiers(v) { if (v && !Array.isArray(v) && typeof (v) == "string") { const re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.aak = 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.ad1; } set headerFormatCulture(v) { this.i.ad1 = v; } /** * Gets or sets date format for the header * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties */ get headerFormatDate() { return this.i.aar; } set headerFormatDate(v) { this.i.aar = 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.aas; } set headerFormatTime(v) { this.i.aas = ensureEnum(DataLegendHeaderTimeMode_$type, v); } /** * Gets or sets the HeaderText for the data legend. */ get headerText() { return this.i.aea; } set headerText(v) { this.i.aea = v; } /** * Gets or sets the header text color. */ get headerTextColor() { return brushToString(this.i.ah4); } set headerTextColor(v) { this.i.ah4 = stringToBrush(v); } get headerTextMarginBottom() { return this.i.aip ? this.i.aip.bottom : NaN; } set headerTextMarginBottom(v) { this.ensureHeaderTextMargin(); this.i.aip.bottom = +v; this.i.aip = this.i.aip; } get headerTextMarginLeft() { return this.i.aip ? this.i.aip.left : NaN; } set headerTextMarginLeft(v) { this.ensureHeaderTextMargin(); this.i.aip.left = +v; this.i.aip = this.i.aip; } get headerTextMarginRight() { return this.i.aip ? this.i.aip.right : NaN; } set headerTextMarginRight(v) { this.ensureHeaderTextMargin(); this.i.aip.right = +v; this.i.aip = this.i.aip; } get headerTextMarginTop() { return this.i.aip ? this.i.aip.top : NaN; } set headerTextMarginTop(v) { this.ensureHeaderTextMargin(); this.i.aip.top = +v; this.i.aip = this.i.aip; } ensureHeaderTextMargin() { if (this.i.aip) { return; } this.i.aip = new Thickness(2); } get headerRowMarginBottom() { return this.i.aio ? this.i.aio.bottom : NaN; } set headerRowMarginBottom(v) { this.ensureHeaderRowMargin(); this.i.aio.bottom = +v; this.i.aio = this.i.aio; } get headerRowMarginLeft() { return this.i.aio ? this.i.aio.left : NaN; } set headerRowMarginLeft(v) { this.ensureHeaderRowMargin(); this.i.aio.left = +v; this.i.aio = this.i.aio; } get headerRowMarginRight() { return this.i.aio ? this.i.aio.right : NaN; } set headerRowMarginRight(v) { this.ensureHeaderRowMargin(); this.i.aio.right = +v; this.i.aio = this.i.aio; } get headerRowMarginTop() { return this.i.aio ? this.i.aio.top : NaN; } set headerRowMarginTop(v) { this.ensureHeaderRowMargin(); this.i.aio.top = +v; this.i.aio = this.i.aio; } ensureHeaderRowMargin() { if (this.i.aio) { return; } this.i.aio = new Thickness(2); } /** * Gets or sets whether to show Header row. */ get headerRowVisible() { return this.i.abz; } set headerRowVisible(v) { this.i.abz = ensureBool(v); } /** * Gets or Sets the style to use for the header text. */ get headerTextStyle() { if (this.i.abo == null) { return null; } return this.i.abo.fontString; } set headerTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abo = fi; } /** * Gets or sets whether to show Header row. */ get groupRowVisible() { return this.i.aby; } set groupRowVisible(v) { this.i.aby = ensureBool(v); } /** * Gets or sets the Group text color. */ get groupTextColor() { return brushToString(this.i.ah3); } set groupTextColor(v) { this.i.ah3 = stringToBrush(v); } get groupTextMarginBottom() { return this.i.ain ? this.i.ain.bottom : NaN; } set groupTextMarginBottom(v) { this.ensureGroupTextMargin(); this.i.ain.bottom = +v; this.i.ain = this.i.ain; } get groupTextMarginLeft() { return this.i.ain ? this.i.ain.left : NaN; } set groupTextMarginLeft(v) { this.ensureGroupTextMargin(); this.i.ain.left = +v; this.i.ain = this.i.ain; } get groupTextMarginRight() { return this.i.ain ? this.i.ain.right : NaN; } set groupTextMarginRight(v) { this.ensureGroupTextMargin(); this.i.ain.right = +v; this.i.ain = this.i.ain; } get groupTextMarginTop() { return this.i.ain ? this.i.ain.top : NaN; } set groupTextMarginTop(v) { this.ensureGroupTextMargin(); this.i.ain.top = +v; this.i.ain = this.i.ain; } ensureGroupTextMargin() { if (this.i.ain) { return; } this.i.ain = new Thickness(2); } get groupRowMarginBottom() { return this.i.aim ? this.i.aim.bottom : NaN; } set groupRowMarginBottom(v) { this.ensureGroupRowMargin(); this.i.aim.bottom = +v; this.i.aim = this.i.aim; } get groupRowMarginLeft() { return this.i.aim ? this.i.aim.left : NaN; } set groupRowMarginLeft(v) { this.ensureGroupRowMargin(); this.i.aim.left = +v; this.i.aim = this.i.aim; } get groupRowMarginRight() { return this.i.aim ? this.i.aim.right : NaN; } set groupRowMarginRight(v) { this.ensureGroupRowMargin(); this.i.aim.right = +v; this.i.aim = this.i.aim; } get groupRowMarginTop() { return this.i.aim ? this.i.aim.top : NaN; } set groupRowMarginTop(v) { this.ensureGroupRowMargin(); this.i.aim.top = +v; this.i.aim = this.i.aim; } ensureGroupRowMargin() { if (this.i.aim) { return; } this.i.aim = new Thickness(2); } /** * Gets or Sets the style to use for the Group text. */ get groupTextStyle() { if (this.i.abn == null) { return null; } return this.i.abn.fontString; } set groupTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abn = fi; } /** * Gets or sets the summary text color. */ get summaryTitleTextColor() { return brushToString(this.i.ah7); } set summaryTitleTextColor(v) { this.i.ah7 = stringToBrush(v); } /** * Gets or Sets the style to use for the summary text. */ get summaryTitleTextStyle() { if (this.i.abr == null) { return null; } return this.i.abr.fontString; } set summaryTitleTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abr = fi; } /** * Gets or sets the SummaryType for the data legend. */ get summaryType() { return this.i.aav; } set summaryType(v) { this.i.aav = ensureEnum(DataLegendSummaryType_$type, v); } /** * Gets or sets the SummaryTitleText for the data legend. */ get summaryTitleText() { return this.i.aeu; } set summaryTitleText(v) { this.i.aeu = v; } get summaryTitleTextMarginBottom() { return this.i.ais ? this.i.ais.bottom : NaN; } set summaryTitleTextMarginBottom(v) { this.ensureSummaryTitleTextMargin(); this.i.ais.bottom = +v; this.i.ais = this.i.ais; } get summaryTitleTextMarginLeft() { return this.i.ais ? this.i.ais.left : NaN; } set summaryTitleTextMarginLeft(v) { this.ensureSummaryTitleTextMargin(); this.i.ais.left = +v; this.i.ais = this.i.ais; } get summaryTitleTextMarginRight() { return this.i.ais ? this.i.ais.right : NaN; } set summaryTitleTextMarginRight(v) { this.ensureSummaryTitleTextMargin(); this.i.ais.right = +v; this.i.ais = this.i.ais; } get summaryTitleTextMarginTop() { return this.i.ais ? this.i.ais.top : NaN; } set summaryTitleTextMarginTop(v) { this.ensureSummaryTitleTextMargin(); this.i.ais.top = +v; this.i.ais = this.i.ais; } ensureSummaryTitleTextMargin() { if (this.i.ais) { return; } this.i.ais = new Thickness(2); } get summaryRowMarginBottom() { return this.i.air ? this.i.air.bottom : NaN; } set summaryRowMarginBottom(v) { this.ensureSummaryRowMargin(); this.i.air.bottom = +v; this.i.air = this.i.air; } get summaryRowMarginLeft() { return this.i.air ? this.i.air.left : NaN; } set summaryRowMarginLeft(v) { this.ensureSummaryRowMargin(); this.i.air.left = +v; this.i.air = this.i.air; } get summaryRowMarginRight() { return this.i.air ? this.i.air.right : NaN; } set summaryRowMarginRight(v) { this.ensureSummaryRowMargin(); this.i.air.right = +v; this.i.air = this.i.air; } get summaryRowMarginTop() { return this.i.air ? this.i.air.top : NaN; } set summaryRowMarginTop(v) { this.ensureSummaryRowMargin(); this.i.air.top = +v; this.i.air = this.i.air; } ensureSummaryRowMargin() { if (this.i.air) { return; } this.i.air = new Thickness(2); } /** * Gets or sets the units text color. */ get summaryValueTextColor() { return brushToString(this.i.ah9); } set summaryValueTextColor(v) { this.i.ah9 = stringToBrush(v); } /** * Gets or Sets the style to use for the units text. */ get summaryValueTextStyle() { if (this.i.abt == null) { return null; } return this.i.abt.fontString; } set summaryValueTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abt = fi; } /** * Gets or sets the units text for the data legend. */ get summaryLabelText() { return this.i.aep; } set summaryLabelText(v) { this.i.aep = v; } /** * Gets or sets the units text color. */ get summaryLabelTextColor() { return brushToString(this.i.ah6); } set summaryLabelTextColor(v) { this.i.ah6 = stringToBrush(v); } /** * Gets or Sets the style to use for the units text. */ get summaryLabelTextStyle() { if (this.i.abq == null) { return null; } return this.i.abq.fontString; } set summaryLabelTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abq = fi; } /** * Gets or sets the units text for the data legend. */ get summaryUnitsText() { return this.i.ae0; } set summaryUnitsText(v) { this.i.ae0 = v; } /** * Gets or sets the units text color. */ get summaryUnitsTextColor() { return brushToString(this.i.ah8); } set summaryUnitsTextColor(v) { this.i.ah8 = stringToBrush(v); } /** * Gets or Sets the style to use for the units text. */ get summaryUnitsTextStyle() { if (this.i.abs == null) { return null; } return this.i.abs.fontString; } set summaryUnitsTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abs = fi; } get badgeMarginBottom() { return this.i.ail ? this.i.ail.bottom : NaN; } set badgeMarginBottom(v) { this.ensureBadgeMargin(); this.i.ail.bottom = +v; this.i.ail = this.i.ail; } get badgeMarginLeft() { return this.i.ail ? this.i.ail.left : NaN; } set badgeMarginLeft(v) { this.ensureBadgeMargin(); this.i.ail.left = +v; this.i.ail = this.i.ail; } get badgeMarginRight() { return this.i.ail ? this.i.ail.right : NaN; } set badgeMarginRight(v) { this.ensureBadgeMargin(); this.i.ail.right = +v; this.i.ail = this.i.ail; } get badgeMarginTop() { return this.i.ail ? this.i.ail.top : NaN; } set badgeMarginTop(v) { this.ensureBadgeMargin(); this.i.ail.top = +v; this.i.ail = this.i.ail; } ensureBadgeMargin() { if (this.i.ail) { return; } this.i.ail = new Thickness(2); } /** * Gets or sets the BadgeShape for the data legend. */ get badgeShape() { return this.i.abc; } set badgeShape(v) { this.i.abc = ensureEnum(LegendItemBadgeShape_$type, v); } /** * Gets or sets the layout of content in the data legend */ get layoutMode() { return this.i.aau; } set layoutMode(v) { this.i.aau = ensureEnum(DataLegendLayoutMode_$type, v); } /** * Gets or sets the UnitsMode for the data legend. */ get unitsDisplayMode() { return this.i.aaw; } set unitsDisplayMode(v) { this.i.aaw = ensureEnum(DataLegendUnitsMode_$type, v); } /** * Gets or sets the units text for the data legend. */ get unitsText() { return this.i.afe; } set unitsText(v) { this.i.afe = v; } /** * Gets or sets the units text color. */ get unitsTextColor() { return brushToString(this.i.aid); } set unitsTextColor(v) { this.i.aid = stringToBrush(v); } get unitsTextMarginBottom() { return this.i.aiu ? this.i.aiu.bottom : NaN; } set unitsTextMarginBottom(v) { this.ensureUnitsTextMargin(); this.i.aiu.bottom = +v; this.i.aiu = this.i.aiu; } get unitsTextMarginLeft() { return this.i.aiu ? this.i.aiu.left : NaN; } set unitsTextMarginLeft(v) { this.ensureUnitsTextMargin(); this.i.aiu.left = +v; this.i.aiu = this.i.aiu; } get unitsTextMarginRight() { return this.i.aiu ? this.i.aiu.right : NaN; } set unitsTextMarginRight(v) { this.ensureUnitsTextMargin(); this.i.aiu.right = +v; this.i.aiu = this.i.aiu; } get unitsTextMarginTop() { return this.i.aiu ? this.i.aiu.top : NaN; } set unitsTextMarginTop(v) { this.ensureUnitsTextMargin(); this.i.aiu.top = +v; this.i.aiu = this.i.aiu; } ensureUnitsTextMargin() { if (this.i.aiu) { return; } this.i.aiu = new Thickness(2); } /** * Gets or Sets the style to use for the units text. */ get unitsTextStyle() { if (this.i.abv == null) { return null; } return this.i.abv.fontString; } set unitsTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abv = fi; } get titleTextMarginBottom() { return this.i.ait ? this.i.ait.bottom : NaN; } set titleTextMarginBottom(v) { this.ensureTitleTextMargin(); this.i.ait.bottom = +v; this.i.ait = this.i.ait; } get titleTextMarginLeft() { return this.i.ait ? this.i.ait.left : NaN; } set titleTextMarginLeft(v) { this.ensureTitleTextMargin(); this.i.ait.left = +v; this.i.ait = this.i.ait; } get titleTextMarginRight() { return this.i.ait ? this.i.ait.right : NaN; } set titleTextMarginRight(v) { this.ensureTitleTextMargin(); this.i.ait.right = +v; this.i.ait = this.i.ait; } get titleTextMarginTop() { return this.i.ait ? this.i.ait.top : NaN; } set titleTextMarginTop(v) { this.ensureTitleTextMargin(); this.i.ait.top = +v; this.i.ait = this.i.ait; } ensureTitleTextMargin() { if (this.i.ait) { return; } this.i.ait = new Thickness(2); } /** * Gets or sets the display text color. */ get titleTextColor() { return brushToString(this.i.aia); } set titleTextColor(v) { this.i.aia = stringToBrush(v); } /** * Gets or Sets the style to use for the display text. */ get titleTextStyle() { if (this.i.abu == null) { return null; } return this.i.abu.fontString; } set titleTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abu = 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.aat; } set labelDisplayMode(v) { this.i.aat = ensureEnum(DataLegendLabelMode_$type, v); } /** * Gets or sets the units text color. */ get labelTextColor() { return brushToString(this.i.ah5); } set labelTextColor(v) { this.i.ah5 = stringToBrush(v); } get labelTextMarginBottom() { return this.i.aiq ? this.i.aiq.bottom : NaN; } set labelTextMarginBottom(v) { this.ensureLabelTextMargin(); this.i.aiq.bottom = +v; this.i.aiq = this.i.aiq; } get labelTextMarginLeft() { return this.i.aiq ? this.i.aiq.left : NaN; } set labelTextMarginLeft(v) { this.ensureLabelTextMargin(); this.i.aiq.left = +v; this.i.aiq = this.i.aiq; } get labelTextMarginRight() { return this.i.aiq ? this.i.aiq.right : NaN; } set labelTextMarginRight(v) { this.ensureLabelTextMargin(); this.i.aiq.right = +v; this.i.aiq = this.i.aiq; } get labelTextMarginTop() { return this.i.aiq ? this.i.aiq.top : NaN; } set labelTextMarginTop(v) { this.ensureLabelTextMargin(); this.i.aiq.top = +v; this.i.aiq = this.i.aiq; } ensureLabelTextMargin() { if (this.i.aiq) { return; } this.i.aiq = new Thickness(2); } /** * Gets or Sets the style to use for the units text. */ get labelTextStyle() { if (this.i.abp == null) { return null; } return this.i.abp.fontString; } set labelTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.abp = fi; } /** * Gets or sets the background of the tooltip containers. */ get toolTipBackground() { return brushToString(this.i.aib); } set toolTipBackground(v) { this.i.aib = stringToBrush(v); } /** * Gets or sets the border color of the tooltip containers. */ get toolTipBorderBrush() { return brushToString(this.i.aic); } set toolTipBorderBrush(v) { this.i.aic = stringToBrush(v); } /** * Gets or sets the border thickness of the tooltip containers. */ get toolTipBorderThickness() { return this.i.acm; } set toolTipBorderThickness(v) { this.i.acm = +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.qd(); } /** * Hides any tooltips presented by the layer, if any. */ hideToolTipsImmediate() { this.i.qe(); } }