UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

1,331 lines (1,330 loc) 151 kB
import { EventEmitter, Output, Component, Input } from '@angular/core'; import { delegateCombine } from "igniteui-angular-core"; import { IgxSeriesCollection } from "./igx-series-collection"; import { MarkerAutomaticBehavior_$type } from "./MarkerAutomaticBehavior"; import { SeriesHighlightingMode_$type } from "./SeriesHighlightingMode"; import { SeriesSelectionMode_$type } from "./SeriesSelectionMode"; import { SeriesSelectionBehavior_$type } from "./SeriesSelectionBehavior"; import { SeriesViewerScrollbarMode_$type } from "./SeriesViewerScrollbarMode"; import { SeriesViewerHorizontalScrollbarPosition_$type } from "./SeriesViewerHorizontalScrollbarPosition"; import { SeriesViewerVerticalScrollbarPosition_$type } from "./SeriesViewerVerticalScrollbarPosition"; import { SeriesHighlightingBehavior_$type } from "./SeriesHighlightingBehavior"; import { LegendHighlightingMode_$type } from "./LegendHighlightingMode"; import { LegendItemBadgeShape_$type } from "igniteui-angular-core"; import { LegendItemBadgeMode_$type } from "igniteui-angular-core"; import { ChartHitTestMode_$type } from "./ChartHitTestMode"; import { WindowResponse_$type } from "./WindowResponse"; import { Visibility_$type } from "igniteui-angular-core"; import { ZoomCoercionMode_$type } from "./ZoomCoercionMode"; import { InteractionState_$type } from "igniteui-angular-core"; import { ModifierKeys_$type } from "igniteui-angular-core"; import { SeriesHighlightedValuesDisplayMode_$type } from "igniteui-angular-core"; import { IgxChartSelectedItemCollection } from "./igx-chart-selected-item-collection"; import { HorizontalAlignment_$type } from "igniteui-angular-core"; import { IgxUserAnnotationInformationEventArgs } from "./igx-user-annotation-information-event-args"; import { IgxUserAnnotationToolTipContentUpdatingEventArgs } from "./igx-user-annotation-tool-tip-content-updating-event-args"; import { IgxPlotAreaMouseButtonEventArgs } from "./igx-plot-area-mouse-button-event-args"; import { IgxPlotAreaMouseEventArgs } from "./igx-plot-area-mouse-event-args"; import { IgxAxisMouseEventArgs } from "./igx-axis-mouse-event-args"; import { IgxChartCursorEventArgs } from "./igx-chart-cursor-event-args"; import { IgxDataChartMouseButtonEventArgs } from "./igx-data-chart-mouse-button-event-args"; import { IgxChartMouseEventArgs } from "./igx-chart-mouse-event-args"; import { IgxChartResizeIdleEventArgs } from "./igx-chart-resize-idle-event-args"; import { IgxSeriesViewerManipulationEventArgs } from "./igx-series-viewer-manipulation-event-args"; import { IgxRectChangedEventArgs } from "igniteui-angular-core"; import { IgxSeriesViewerSelectedSeriesItemsChangedEventArgs } from "./igx-series-viewer-selected-series-items-changed-event-args"; import { IgxRefreshCompletedEventArgs } from "./igx-refresh-completed-event-args"; import { IgxImageCapturedEventArgs } from "igniteui-angular-core"; import { TypeRegistrar } from "igniteui-angular-core"; import { NamePatcher, toBrushCollection, fromBrushCollection, ensureEnum, fromPoint, toPoint, ensureBool, brushToString, stringToBrush, fromRect, toRect, toSpinal, initializePropertiesFromCss } from "igniteui-angular-core"; import { SeriesCollection as SeriesCollection_internal } from "./SeriesCollection"; import { Series } from "./Series"; import { SyncableObservableCollection$1 } from "igniteui-angular-core"; import { ChartSelectedItemCollection as ChartSelectedItemCollection_internal } from "./ChartSelectedItemCollection"; import { ChartSelection } from "./ChartSelection"; import * as i0 from "@angular/core"; /** * Represents a control for viewing series objects. */ export let IgxSeriesViewerComponent = /*@__PURE__*/ (() => { class IgxSeriesViewerComponent { constructor() { this._fullSeries = null; this._selectedSeriesItems = null; this._focusedSeriesItems = null; this.__p = null; this._hasUserValues = new Set(); this._stylingContainer = null; this._stylingParent = null; this._inStyling = false; this._userAnnotationInformationRequested = null; this._userAnnotationToolTipContentUpdating = null; this._plotAreaMouseLeftButtonDown = null; this._plotAreaMouseLeftButtonUp = null; this._plotAreaClicked = null; this._plotAreaMouseEnter = null; this._plotAreaMouseLeave = null; this._plotAreaMouseOver = null; this._axisLabelMouseDown = null; this._axisLabelMouseUp = null; this._axisLabelMouseEnter = null; this._axisLabelMouseLeave = null; this._axisLabelMouseOver = null; this._axisLabelMouseClick = null; this._axisPanelMouseDown = null; this._axisPanelMouseUp = null; this._axisPanelMouseEnter = null; this._axisPanelMouseLeave = null; this._axisPanelMouseOver = null; this._axisPanelMouseClick = null; this._seriesCursorMouseMove = null; this._seriesMouseLeftButtonDown = null; this._seriesMouseLeftButtonUp = null; this._seriesClick = null; this._seriesMouseMove = null; this._seriesMouseEnter = null; this._seriesMouseLeave = null; this._resizeIdle = null; this._viewerManipulationStarting = null; this._viewerManipulationEnding = null; this._windowRectChanged = null; this._sizeChanged = null; this._actualWindowRectChanged = null; this._gridAreaRectChanged = null; this._selectedSeriesItemsChanged = null; this._focusedSeriesItemsChanged = null; this._refreshCompleted = null; this._imageCaptured = null; this._zoneRunner = null; if (this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this)); } this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } createImplementation() { return null; } ngOnInit() { } /** * @hidden */ get i() { return this._implementation; } /** * @hidden */ static _createFromInternal(internal) { if (!internal) { return null; } if (!internal.$type) { return null; } let name = internal.$type.name; let externalName = "Igx" + name + "Component"; if (!TypeRegistrar.isRegistered(externalName)) { return null; } return TypeRegistrar.create(externalName); } onImplementationCreated() { } get fullSeries() { if (this._fullSeries === null) { let coll = new IgxSeriesCollection(); let innerColl = this.i.b9; if (!innerColl) { innerColl = new SeriesCollection_internal(); } this._fullSeries = coll._fromInner(innerColl); } return this._fullSeries; } set fullSeries(v) { if (this._fullSeries !== null) { this._fullSeries._setSyncTarget(null); this._fullSeries = null; } let coll = new IgxSeriesCollection(); this._fullSeries = coll._fromOuter(v); let syncColl = new SyncableObservableCollection$1(Series.$type); let innerColl = this.i.b9; if (!innerColl) { innerColl = new SeriesCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._fullSeries._setSyncTarget(syncColl); } /** * Gets or sets the palette of brushes used for fill of plotted series. * These brushes are automatically assigned to series based on the index of series. */ get brushes() { return fromBrushCollection(this.i.ag); } set brushes(v) { this.i.ag = toBrushCollection(v); } /** * Gets or sets the palette of brushes used for outlines of plotted series. * These outlines are automatically assigned to series based on the index of series. */ get outlines() { return fromBrushCollection(this.i.aj); } set outlines(v) { this.i.aj = toBrushCollection(v); } /** * Gets or sets the palette of brushes used for fill of marker series. * These brushes are automatically assigned to markers based on the index of series. */ get markerBrushes() { return fromBrushCollection(this.i.ah); } set markerBrushes(v) { this.i.ah = toBrushCollection(v); } /** * Gets or sets the palette of brushes used for outlines of plotted markers. * These outlines are automatically assigned to markers based on the index of series. */ get markerOutlines() { return fromBrushCollection(this.i.ai); } set markerOutlines(v) { this.i.ai = toBrushCollection(v); } /** * Gets or sets the marker mode used for assigning a marker type to series when the marker type is automatic. */ get markerAutomaticBehavior() { return this.i.bv; } set markerAutomaticBehavior(v) { this.i.bv = ensureEnum(MarkerAutomaticBehavior_$type, v); } /** * Gets or sets the cross hair point (in world coordinates) * Either or both of the crosshair point's X and Y may be set to double.NaN, in which * case the relevant crosshair line is hidden. * * The `CrosshairPoint` property is used to gets/sets the cross hair point (in world coordinates). * * ```html * <igx-data-chart * [dataSource]="data" * crosshairVisibility="visible" * crosshairPoint={x:.8,y:.2}> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.crosshairPoint = {x:.8,y:.2}; * ``` */ get crosshairPoint() { return fromPoint(this.i.yi); } set crosshairPoint(v) { this.i.yi = toPoint(v); } /** * Gets or sets whether the series animations should be allowed when a range change has been detected on an axis. * * `AnimateSeriesWhenAxisRangeChanges` is a Boolean property to override the default behavior in which series do not animate if an axis range changes. * * ```html * <igx-data-chart * [dataSource]="data" * animateSeriesWhenAxisRangeChanges=true> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-column-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value" * transitionInMode="accordionFromBottom" * isTransitionInEnabled=true * transitionInSpeedType="indexScaled" * transitionDuration=1000> * </igx-column-series> * </igx-data-chart> * ``` * * ```ts * this.chart.animateSeriesWhenAxisRangeChanges = true; * ``` */ get animateSeriesWhenAxisRangeChanges() { return this.i.e8; } set animateSeriesWhenAxisRangeChanges(v) { this.i.e8 = ensureBool(v); } /** * Gets or sets whether the series animations should be allowed when a range change has been detected on an axis. */ get seriesValueLayerUseLegend() { return this.i.gy; } set seriesValueLayerUseLegend(v) { this.i.gy = ensureBool(v); } /** * Gets or sets whether initiating user annotations from the toolbar is enabled. */ get isUserAnnotationsEnabled() { return this.i.gd; } set isUserAnnotationsEnabled(v) { this.i.gd = ensureBool(v); } /** * Gets or sets whether to sync the vertical aspect of the window with the contained series content. This is only supported for a subset of the available series. */ get isWindowSyncedToVisibleRange() { return this.i.ge; } set isWindowSyncedToVisibleRange(v) { this.i.ge = ensureBool(v); } /** * Gets or sets whether calling SimulateHover should shift the crosshair point. */ get shouldSimulateHoverMoveCrosshairPoint() { return this.i.g3; } set shouldSimulateHoverMoveCrosshairPoint(v) { this.i.g3 = ensureBool(v); } /** * Gets or sets the highlighting mode to use for the series in the component, when supported. This takes precedence over the series level IsHighlightingEnabled. */ get highlightingMode() { return this.i.cg; } set highlightingMode(v) { this.i.cg = ensureEnum(SeriesHighlightingMode_$type, v); } /** * Gets or sets the target opacity to fade to for fade style highlighting. */ get highlightingFadeOpacity() { return this.i.iy; } set highlightingFadeOpacity(v) { this.i.iy = +v; } /** * Gets or sets the selection mode to use for the series in the component, when supported. */ get selectionMode() { return this.i.ct; } set selectionMode(v) { this.i.ct = ensureEnum(SeriesSelectionMode_$type, v); } /** * Gets or sets the selection behavior to use for the series in the component, when supported. */ get selectionBehavior() { return this.i.co; } set selectionBehavior(v) { this.i.co = ensureEnum(SeriesSelectionBehavior_$type, v); } /** * Gets or sets the focus mode to use for the series in the component, when supported. */ get focusMode() { return this.i.cr; } set focusMode(v) { this.i.cr = ensureEnum(SeriesSelectionMode_$type, v); } /** * Gets or sets the horizontal scrollbar mode to use for the series viewer. */ get horizontalViewScrollbarMode() { return this.i.cz; } set horizontalViewScrollbarMode(v) { this.i.cz = ensureEnum(SeriesViewerScrollbarMode_$type, v); } /** * Gets or sets the vertical scrollbar mode to use for the series viewer. */ get verticalViewScrollbarMode() { return this.i.c0; } set verticalViewScrollbarMode(v) { this.i.c0 = ensureEnum(SeriesViewerScrollbarMode_$type, v); } /** * Gets or sets the position to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarPosition() { return this.i.cw; } set horizontalViewScrollbarPosition(v) { this.i.cw = ensureEnum(SeriesViewerHorizontalScrollbarPosition_$type, v); } /** * Gets or sets the position to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarPosition() { return this.i.c3; } set verticalViewScrollbarPosition(v) { this.i.c3 = ensureEnum(SeriesViewerVerticalScrollbarPosition_$type, v); } /** * Gets or sets the fill to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarFill() { return brushToString(this.i.x5); } set horizontalViewScrollbarFill(v) { this.i.x5 = stringToBrush(v); } /** * Gets or sets the outline to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarOutline() { return brushToString(this.i.x6); } set horizontalViewScrollbarOutline(v) { this.i.x6 = stringToBrush(v); } /** * Gets or sets the stroke thickness to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarStrokeThickness() { return this.i.i3; } set horizontalViewScrollbarStrokeThickness(v) { this.i.i3 = +v; } /** * Gets or sets the max opacity to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarMaxOpacity() { return this.i.i2; } set horizontalViewScrollbarMaxOpacity(v) { this.i.i2 = +v; } /** * Gets or sets the corner radius to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarCornerRadius() { return this.i.iz; } set horizontalViewScrollbarCornerRadius(v) { this.i.iz = +v; } /** * Gets or sets the height to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarHeight() { return this.i.i0; } set horizontalViewScrollbarHeight(v) { this.i.i0 = +v; } /** * Gets or sets the inset distance to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarInset() { return this.i.i1; } set horizontalViewScrollbarInset(v) { this.i.i1 = +v; } /** * Gets or sets the track start inset to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarTrackStartInset() { return this.i.i5; } set horizontalViewScrollbarTrackStartInset(v) { this.i.i5 = +v; } /** * Gets or sets the track end inset to use for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarTrackEndInset() { return this.i.i4; } set horizontalViewScrollbarTrackEndInset(v) { this.i.i4 = +v; } /** * Gets or sets whether to use automatic track insets for the horizontal scrollbar in the component, when enabled. */ get horizontalViewScrollbarShouldAddAutoTrackInsets() { return this.i.fo; } set horizontalViewScrollbarShouldAddAutoTrackInsets(v) { this.i.fo = ensureBool(v); } /** * Gets or sets the fill to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarFill() { return brushToString(this.i.yf); } set verticalViewScrollbarFill(v) { this.i.yf = stringToBrush(v); } /** * Gets or sets the outline to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarOutline() { return brushToString(this.i.yg); } set verticalViewScrollbarOutline(v) { this.i.yg = stringToBrush(v); } /** * Gets or sets the stroke thickness to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarStrokeThickness() { return this.i.jp; } set verticalViewScrollbarStrokeThickness(v) { this.i.jp = +v; } /** * Gets or sets the max opacity to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarMaxOpacity() { return this.i.jo; } set verticalViewScrollbarMaxOpacity(v) { this.i.jo = +v; } /** * Gets or sets the corner radius to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarCornerRadius() { return this.i.jm; } set verticalViewScrollbarCornerRadius(v) { this.i.jm = +v; } /** * Gets or sets the width to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarWidth() { return this.i.js; } set verticalViewScrollbarWidth(v) { this.i.js = +v; } /** * Gets or sets the inset distance to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarInset() { return this.i.jn; } set verticalViewScrollbarInset(v) { this.i.jn = +v; } /** * Gets or sets the track start inset to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarTrackStartInset() { return this.i.jr; } set verticalViewScrollbarTrackStartInset(v) { this.i.jr = +v; } /** * Gets or sets the track end inset to use for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarTrackEndInset() { return this.i.jq; } set verticalViewScrollbarTrackEndInset(v) { this.i.jq = +v; } /** * Gets or sets whether to use automatic track insets for the vertical scrollbar in the component, when enabled. */ get verticalViewScrollbarShouldAddAutoTrackInsets() { return this.i.hf; } set verticalViewScrollbarShouldAddAutoTrackInsets(v) { this.i.hf = ensureBool(v); } /** * Gets or sets the highlighting Behavior to use for the series in the component, when supported. This takes precedence over the series level IsHighlightingEnabled. */ get highlightingBehavior() { return this.i.ce; } set highlightingBehavior(v) { this.i.ce = ensureEnum(SeriesHighlightingBehavior_$type, v); } /** * Gets or sets the highlighting mode to use for the legend linked to the component, when supported. */ get legendHighlightingMode() { return this.i.bs; } set legendHighlightingMode(v) { this.i.bs = ensureEnum(LegendHighlightingMode_$type, v); } /** * Gets or sets type of legend badges representing all series displayed in a legend linked to this component * This property will be ignored when the LegendItemTemplate or LegendItemBadgeTemplate property is set on a series */ get legendItemBadgeShape() { return this.i.bu; } set legendItemBadgeShape(v) { this.i.bu = ensureEnum(LegendItemBadgeShape_$type, v); } /** * Gets or sets the mode of legend badges representing all series in this chart. * This property will be ignored when the LegendItemTemplate or LegendItemBadgeTemplate property is set on a series */ get legendItemBadgeMode() { return this.i.bt; } set legendItemBadgeMode(v) { this.i.bt = ensureEnum(LegendItemBadgeMode_$type, v); } /** * Gets or sets how the mouse leave event fires when a manipulation is started. */ get fireMouseLeaveOnManipulationStart() { return this.i.fk; } set fireMouseLeaveOnManipulationStart(v) { this.i.fk = ensureBool(v); } /** * Gets the viewport rectangle associated with the SeriesViewer, the physical dimensions of the plot area. * * ```ts * let viewPortRect: IgxRect = this.chart.viewportRect; * ``` */ get viewportRect() { return fromRect(this.i.y9); } /** * Gets the EffectiveViewport rectangle, representing the effective viewport area after margins have been subtracted. * * ``ts * let viewport: IgxRect = this.chart.effectiveViewport; * * ``` * * ``` */ get effectiveViewport() { return fromRect(this.i.yv); } set effectiveViewport(v) { this.i.yv = toRect(v); } /** * Represents the subset area within the viewport into which content should be mapped. * This is the projection of the current EffectiveViewport into the viewport at current zoom level. * * ```ts * let contentViewport: IgxRect = this.chart.contentViewport; * ``` */ get contentViewport() { return fromRect(this.i.yu); } /** * A rectangle representing the portion of the SeriesViewer currently in view. * A rectangle at X=0, Y=0 with a Height and Width of 1 implies the entire plotting area is in view. A Height and Width of .5 would imply that the view is halfway zoomed in. * * You can set the `WindowRect` to zoom in on an area of interest in the chart. * * ```ts * this.chart.windowRect = {left:0, top:1, width: .5, height: .5}; * ``` */ get windowRect() { return fromRect(this.i.za); } set windowRect(v) { this.i.za = toRect(v); } /** * Gets or sets whether the series viewer should use cached tiles during zooms rather than the default live content. */ get useTiledZooming() { return this.i.he; } set useTiledZooming(v) { this.i.he = ensureBool(v); } /** * Gets or sets whether the series viewer should prefer selecting higher resolution tiles over lower resolution tiles when performing tile zooming. Setting this to true will lower performance but increase quality. */ get preferHigherResolutionTiles() { return this.i.gv; } set preferHigherResolutionTiles(v) { this.i.gv = ensureBool(v); } /** * Gets or sets the maximum number of zoom tiles that the series viewer should cache while in tiled zooming mode. */ get zoomTileCacheSize() { return this.i.kf; } set zoomTileCacheSize(v) { this.i.kf = +v; } /** * Gets or sets the duration the highlighting/de-highlighting effects. * * The `HighlightingTransitionDuration` property is used to set the time for highlighting transition in milliseconds . * * ```html * <igx-data-chart * [dataSource]="data" * HighlightingTransitionDuration=500 > * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-column-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value" > * </igx-column-series> * </igx-data-chart> * ``` * * ```ts * chart.HighlightingTransitionDuration=500; * ``` */ get highlightingTransitionDuration() { return this.i.ka; } set highlightingTransitionDuration(v) { this.i.ka = +v; } /** * Gets or sets the milliseconds before the chart will fire the resize idle event after the last resize. */ get resizeIdleMilliseconds() { return this.i.kb; } set resizeIdleMilliseconds(v) { this.i.kb = +v; } /** * Gets or sets the duration the selection/de-Selection effects. */ get selectionTransitionDuration() { return this.i.ke; } set selectionTransitionDuration(v) { this.i.ke = +v; } /** * Gets or sets the amount of time to delay before dismissing a selection effect. */ get selectionDismissDelayMilliseconds() { return this.i.kd; } set selectionDismissDelayMilliseconds(v) { this.i.kd = +v; } /** * Gets or sets the amount of time to delay before dismissing a selection effect. */ get highlightingDismissDelayMilliseconds() { return this.i.j9; } set highlightingDismissDelayMilliseconds(v) { this.i.j9 = +v; } /** * Gets or sets the amount of time to delay before dismissing a selection effect. */ get focusDismissDelayMilliseconds() { return this.i.j6; } set focusDismissDelayMilliseconds(v) { this.i.j6 = +v; } /** * Gets or sets the duration the Focus/de-Focus effects. */ get focusTransitionDuration() { return this.i.j7; } set focusTransitionDuration(v) { this.i.j7 = +v; } /** * Gets or sets the duration of the scrollbar effects. */ get scrollbarsAnimationDuration() { return this.i.kc; } set scrollbarsAnimationDuration(v) { this.i.kc = +v; } /** * Gets or sets the whether the series viewer can allow the page to pan if a control pan is not possible in the requested direction. */ get isPagePanningAllowed() { return this.i.f8; } set isPagePanningAllowed(v) { this.i.f8 = ensureBool(v); } /** * Determines the method of hit testing used when mousing over elements in the chart. * * ```ts * this.chart.contentHitTestMode = ChartHitTestMode.Computational; * ``` */ get contentHitTestMode() { return this.i.a7; } set contentHitTestMode(v) { this.i.a7 = ensureEnum(ChartHitTestMode_$type, v); } /** * Resolved method of hit testing used when the pointer is over elements in the chart. * * ```ts * let actualContentHitTestMode: ChartHitTestMode =this.chart.actualContentHitTestMode; * ``` */ get actualContentHitTestMode() { return this.i.a6; } set actualContentHitTestMode(v) { this.i.a6 = ensureEnum(ChartHitTestMode_$type, v); } /** * Gets or sets whether all surface interactions with the plot area should be disabled. * * The `IsSurfaceInteractionDisabled` property is used to enable/disable interactions with the plot surface. * * ```html * <igx-data-chart * [dataSource]="data" * isSurfaceInteractionDisabled=true> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * chart.isSurfaceInteractionDisabled=true; * ``` */ get isSurfaceInteractionDisabled() { return this.i.f9; } set isSurfaceInteractionDisabled(v) { this.i.f9 = ensureBool(v); } /** * Indicates if this SeriesViewer is a map. */ get isMap() { return this.i.f6; } /** * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. * * The `WindowResponse` property is used to set the response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. * The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. * * ```html * <igx-data-chart * [dataSource]="data" * isHorizontalZoomEnabled=true * windowResponse="deferred"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.windowResponse="deferred"; * ``` */ get windowResponse() { return this.i.c9; } set windowResponse(v) { this.i.c9 = ensureEnum(WindowResponse_$type, v); } /** * Sets or gets the minimum width that the window rect is allowed to reach before being clamped. * Decrease this value if you want to allow for further zooming into the viewer. * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. * This property accepts values between 0.0 (max zooming) and 1.0 (no zooming) * * The `WindowRectMinWidth` property is used to set or get the minimum width that the window rect is allowed to reach before being clamped. * * ```html * <igx-data-chart * [dataSource]="data" * isHorizontalZoomEnabled=true * windowRectMinWidth=.2> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.WindowRectMinWidth=".2"; * ``` */ get windowRectMinWidth() { return this.i.jw; } set windowRectMinWidth(v) { this.i.jw = +v; } /** * Sets or gets the minimum height that the window rect is allowed to reach before being clamped. * Decrease this value if you want to allow for further zooming into the viewer. * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. * This property accepts values between 0.0 (max zooming) and 1.0 (no zooming) */ get windowRectMinHeight() { return this.i.jv; } set windowRectMinHeight(v) { this.i.jv = +v; } /** * Gets the actual minimum width that the window rect is allowed to reach before being clamped. */ get actualWindowRectMinWidth() { return this.i.io; } set actualWindowRectMinWidth(v) { this.i.io = +v; } /** * Gets the actual minimum height that the window rect is allowed to reach before being clamped. */ get actualWindowRectMinHeight() { return this.i.im; } set actualWindowRectMinHeight(v) { this.i.im = +v; } /** * Sets or gets minimum pixel width that the window is allowed to reach before being clamped. * Decrease this value if you want to allow for further zooming into the viewer. * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. * This property is overridden by the WindowRectMinWidth property */ get windowSizeMinWidth() { return this.i.jy; } set windowSizeMinWidth(v) { this.i.jy = +v; } /** * Sets or gets minimum pixel height that the window is allowed to reach before being clamped. * Decrease this value if you want to allow for further zooming into the viewer. * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. * This property is overridden by the WindowRectMinHeight property */ get windowSizeMinHeight() { return this.i.jx; } set windowSizeMinHeight(v) { this.i.jx = +v; } /** * Gets or sets the current SeriesViewer's crosshair visibility override. * * The `CrosshairVisibility` property is used to gets or sets the current Chart's crosshair visibility override. Note: setting this property does not affect the mobile browser version of the chart. * * ```html * <igx-data-chart * [dataSource]="data" * crosshairVisibility="visible"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.crosshairVisibility = Visibility.Visible; * ``` */ get crosshairVisibility() { return this.i.ze; } set crosshairVisibility(v) { this.i.ze = ensureEnum(Visibility_$type, v); } /** * Gets or sets the current SeriesViewer's crosshair horizontal brush override. */ get horizontalCrosshairBrush() { return brushToString(this.i.x4); } set horizontalCrosshairBrush(v) { this.i.x4 = stringToBrush(v); } /** * Gets or sets the current SeriesViewer's crosshair vertical brush override. */ get verticalCrosshairBrush() { return brushToString(this.i.ye); } set verticalCrosshairBrush(v) { this.i.ye = stringToBrush(v); } /** * Gets or sets zoom is constrained to within the axes. Setting this to false is a preview feature at the present time. */ get zoomCoercionMode() { return this.i.dd; } set zoomCoercionMode(v) { this.i.dd = ensureEnum(ZoomCoercionMode_$type, v); } /** * Gets or sets the brush used as the background for the current SeriesViewer object's plot area. * * `PlotAreaBackground` property set the background brush to the current Chart object's plot area. * * ```html * <igx-data-chart * [dataSource]="data" * plotAreaBackground="#F0F8FF"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.plotAreaBackground="#F0F8FF"; * ``` */ get plotAreaBackground() { return brushToString(this.i.x7); } set plotAreaBackground(v) { this.i.x7 = stringToBrush(v); } /** * Gets or sets whether to match the z order of the series to their positional order in the series collection, regardless of mutation. */ get shouldMatchZOrderToSeriesOrder() { return this.i.g1; } set shouldMatchZOrderToSeriesOrder(v) { this.i.g1 = ensureBool(v); } /** * Gets or sets the DefaultInteraction property. * The default interaction state defines the SeriesViewer's response to mouse events. * * The default interaction state defines the chart's response to mouse events. * * ```html * <igx-data-chart * [dataSource]="data" * isHorizontalZoomEnabled=true * defaultInteraction="dragPan"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.defaultInteraction = InteractionState.DragPan; * ``` */ get defaultInteraction() { return this.i.di; } set defaultInteraction(v) { this.i.di = ensureEnum(InteractionState_$type, v); } /** * Gets or sets the InteractionOverride property. * The interaction override overrides the default interaction and modifiers keys and defines the SeriesViewer's response to mouse events. */ get interactionOverride() { return this.i.dj; } set interactionOverride(v) { this.i.dj = ensureEnum(InteractionState_$type, v); } /** * Gets or sets the RightButtonDefaultInteraction property. * The default interaction state defines the SeriesViewer's response to right button mouse events. */ get rightButtonDefaultInteraction() { return this.i.dl; } set rightButtonDefaultInteraction(v) { this.i.dl = ensureEnum(InteractionState_$type, v); } /** * Gets or sets the current SeriesViewer's DragModifier property. * * `DragModifier` is useful to enable zooming when zooming is not the default interaction. * * ```html * <igx-data-chart * [dataSource]="data" * isHorizontalZoomEnabled=true * defaultInteraction="dragPan" * dragModifier="alt"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.dragModifier = ModifierKeys.Alt; * ``` */ get dragModifier() { return this.i.xo; } set dragModifier(v) { this.i.xo = ensureEnum(ModifierKeys_$type, v); } /** * Gets or sets the current SeriesViewer's PanModifier property. * * `PanModifier` is useful to enable panning when panning is not the default interaction. * * ```html * <igx-data-chart * [dataSource]="data" * isHorizontalZoomEnabled=true * defaultInteraction="dragZoom" * panModifier="alt"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-line-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value"> * </igx-line-series> * </igx-data-chart> * ``` * * ```ts * this.chart.panModifier = ModifierKeys.Alt; * ``` */ get panModifier() { return this.i.xp; } set panModifier(v) { this.i.xp = ensureEnum(ModifierKeys_$type, v); } /** * Gets or sets the current SeriesViewer's SelectionModifier property. */ get selectionModifier() { return this.i.xq; } set selectionModifier(v) { this.i.xq = ensureEnum(ModifierKeys_$type, v); } /** * Gets or sets the preview rectangle. * The preview rectangle may be set to Rect.Empty, in which case the visible preview * strokePath is hidden. * * `PreviewRect` can be used to highlight an area of importance. * * ```ts * this.chart.previewRect = {left:0,top:0,height:.5,width:.5}; * ``` */ get previewRect() { return fromRect(this.i.y2); } set previewRect(v) { this.i.y2 = toRect(v); } /** * Gets or sets whether and how to display highlighted values for the series by default. Note, this is distinct from the highlighting feature that indicates what is closest or under the mouse. */ get highlightedValuesDisplayMode() { return this.i.cb; } set highlightedValuesDisplayMode(v) { this.i.cb = ensureEnum(SeriesHighlightedValuesDisplayMode_$type, v); } /** * Gets the currently selected data items. Adding or removing data items from this collection will * select or deselect the visuals associated with those items. */ get selectedSeriesItems() { if (this._selectedSeriesItems === null) { let coll = new IgxChartSelectedItemCollection(); let innerColl = this.i.selectedSeriesItems; if (!innerColl) { innerColl = new ChartSelectedItemCollection_internal(); } this._selectedSeriesItems = coll._fromInner(innerColl); this.i.selectedSeriesItems = innerColl; } return this._selectedSeriesItems; } set selectedSeriesItems(v) { if (this._selectedSeriesItems !== null) { this._selectedSeriesItems._setSyncTarget(null); this._selectedSeriesItems = null; } let coll = new IgxChartSelectedItemCollection(); this._selectedSeriesItems = coll._fromOuter(v); let syncColl = new SyncableObservableCollection$1(ChartSelection.$type); let innerColl = this.i.selectedSeriesItems; if (!innerColl) { innerColl = new ChartSelectedItemCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._selectedSeriesItems._setSyncTarget(syncColl); this.i.selectedSeriesItems = innerColl; } /** * Gets the currently focused data items. Adding or removing data items from this collection will * focus or blur the visuals associated with those items. */ get focusedSeriesItems() { if (this._focusedSeriesItems === null) { let coll = new IgxChartSelectedItemCollection(); let innerColl = this.i.focusedSeriesItems; if (!innerColl) { innerColl = new ChartSelectedItemCollection_internal(); } this._focusedSeriesItems = coll._fromInner(innerColl); this.i.focusedSeriesItems = innerColl; } return this._focusedSeriesItems; } set focusedSeriesItems(v) { if (this._focusedSeriesItems !== null) {