igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,374 lines (1,373 loc) • 1.01 MB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __generator, __read, __spreadArray, __values } from "tslib";
import { Control } from "igniteui-react-core";
import { INotifyPropertyChanged_$type, Base, Type, BaseError, EventArgs, PropertyChangedEventArgs, IEnumerable_$type, callStaticConstructors, Point_$type, runOn, delegateCombine, fromEnum, delegateRemove, fromEn, typeCast, enumGetBox, EnumUtil, Boolean_$type, Number_$type, typeGetValue, toEnum, String_$type, markType, markDep, PointUtil, TypeRegistrar, Delegate_$type, Date_$type, Array_$type, getInstanceType, IEqualityComparer$1_$type } from "igniteui-react-core";
import { ILegendOwner_$type } from "igniteui-react-core";
import { IInternalLegendOwner_$type } from "igniteui-react-core";
import { IDataLegendTarget_$type } from "igniteui-react-core";
import { IToolbarTarget_$type } from "igniteui-react-core";
import { ISupportsAnimation_$type } from "igniteui-react-core";
import { SRProvider } from "igniteui-react-core";
import { HashSet$1 } from "igniteui-react-core";
import { IToolbarContextAccessor_$type } from "igniteui-react-core";
import { DVContainer } from "igniteui-react-core";
import { SeriesPlotAreaMarginHorizontalMode_$type } from "./SeriesPlotAreaMarginHorizontalMode";
import { SeriesPlotAreaMarginVerticalMode_$type } from "./SeriesPlotAreaMarginVerticalMode";
import { SeriesViewerScrollbarMode_$type } from "./SeriesViewerScrollbarMode";
import { DoubleAnimator } from "igniteui-react-core";
import { BrushCollection } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { DependencyObject } from "igniteui-react-core";
import { MarkerAutomaticBehavior_$type } from "./MarkerAutomaticBehavior";
import { IChartLegend_$type } from "igniteui-react-core";
import { SeriesHighlightingMode_$type } from "./SeriesHighlightingMode";
import { SeriesSelectionMode_$type } from "./SeriesSelectionMode";
import { SeriesSelectionBehavior_$type } from "./SeriesSelectionBehavior";
import { SeriesViewerHorizontalScrollbarPosition_$type } from "./SeriesViewerHorizontalScrollbarPosition";
import { SeriesViewerVerticalScrollbarPosition_$type } from "./SeriesViewerVerticalScrollbarPosition";
import { Brush } from "igniteui-react-core";
import { SeriesHighlightingBehavior_$type } from "./SeriesHighlightingBehavior";
import { LegendHighlightingMode_$type } from "./LegendHighlightingMode";
import { LegendItemBadgeShape_$type } from "igniteui-react-core";
import { LegendItemBadgeMode_$type } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { ChartHitTestMode_$type } from "./ChartHitTestMode";
import { InteractionState_$type } from "igniteui-react-core";
import { WindowResponse_$type } from "./WindowResponse";
import { Visibility_$type } from "igniteui-react-core";
import { SeriesViewerComponentsFromView } from "./SeriesViewerComponentsFromView";
import { ZoomCoercionMode_$type } from "./ZoomCoercionMode";
import { ModifierKeys_$type } from "igniteui-react-core";
import { SeriesHighlightedValuesDisplayMode_$type } from "igniteui-react-core";
import { DataTemplate } from "igniteui-react-core";
import { HorizontalAlignment_$type } from "igniteui-react-core";
import { CanvasRenderScheduler } from "igniteui-react-core";
import { SyncSettings } from "./SyncSettings";
import { PropertyMetadata } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { ICommandStateChangedListener_$type } from "igniteui-react-core";
import { SeriesViewerComponentsForView } from "./SeriesViewerComponentsForView";
import { VersionQueueHelper } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { IDataLegend_$type } from "igniteui-react-core";
import { PropertyUpdatedEventArgs } from "igniteui-react-core";
import { NotifyCollectionChangedEventArgs } from "igniteui-react-core";
import { ObservableCollection$1 } from "igniteui-react-core";
import { Size } from "igniteui-react-core";
import { FrameworkElement } from "igniteui-react-core";
import { MouseEventArgs } from "igniteui-react-core";
import { MouseButtonEventArgs } from "igniteui-react-core";
import { Tuple$2 } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { SeriesViewerManipulationEventArgs } from "./SeriesViewerManipulationEventArgs";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { ChartResizeIdleEventArgs } from "./ChartResizeIdleEventArgs";
import { RectChangedEventArgs } from "igniteui-react-core";
import { MathUtil } from "igniteui-react-core";
import { DeviceUtils } from "igniteui-react-core";
import { RefreshCompletedEventArgs } from "./RefreshCompletedEventArgs";
import { Thickness } from "igniteui-react-core";
import { AxisTitlePosition_$type } from "./AxisTitlePosition";
import { FontInfo } from "igniteui-react-core";
import { CoercionInfo } from "./CoercionInfo";
import { FastItemsSource } from "igniteui-react-core";
import { FontUtil } from "igniteui-react-core";
import { IDataLegendSeries_$type } from "igniteui-react-core";
import { CaptureImageSettings } from "igniteui-react-core";
import { ImageCapturedEventArgs } from "igniteui-react-core";
import { truncate, intDivide, isNaN_, isInfinity, logBase, log10 } from "igniteui-react-core";
import { ChartContentType_$type } from "./ChartContentType";
import { AutomaticSeriesPurpose_$type } from "./AutomaticSeriesPurpose";
import { defaultDVDateParse, dateNow, dateMinValue } from "igniteui-react-core";
import { stringIsNullOrEmpty, stringEmpty, stringContains, stringReplace, stringEndsWith, stringStartsWith, stringIsNullOrWhiteSpace } from "igniteui-react-core";
import { timeSpanTotalMilliseconds } from "igniteui-react-core";
import { ISchedulableRender_$type } from "igniteui-react-core";
import { Rectangle } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { Line } from "igniteui-react-core";
import { RenderingContext } from "igniteui-react-core";
import { TextBlock } from "igniteui-react-core";
import { ITileZoomTile_$type } from "./ITileZoomTile";
import { DOMExecutionContext } from "igniteui-react-core";
import { RenderSurface } from "./RenderSurface";
import { PathFigureCollection } from "igniteui-react-core";
import { PathFigure } from "igniteui-react-core";
import { LineSegment } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { GeometryGroup } from "igniteui-react-core";
import { DataContext } from "igniteui-react-core";
import { LabelPanelsArrangeState } from "./LabelPanelsArrangeState";
import { MarkerTemplates } from "./MarkerTemplates";
import { DataTemplateRenderInfo } from "igniteui-react-core";
import { DataTemplateMeasureInfo } from "igniteui-react-core";
import { AxisLabelsLocation_$type } from "./AxisLabelsLocation";
import { IProvidesViewport_$type } from "./IProvidesViewport";
import { ArgumentNullException } from "igniteui-react-core";
import { ActualLegendItemBadgeShape_$type } from "./ActualLegendItemBadgeShape";
import { CanvasViewRenderer } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { EllipseGeometry } from "igniteui-react-core";
import { DataTemplatePassInfo } from "igniteui-react-core";
import { BrushUtil } from "igniteui-react-core";
import { LegendItemHelper } from "igniteui-react-core";
import { DomWrapper_$type } from "igniteui-react-core";
import { PointerTooltipStyle } from "./PointerTooltipStyle";
import { CanvasScalingHelpers } from "igniteui-react-core";
import { DefaultPaletteInfo } from "./DefaultPaletteInfo";
import { CssGradientUtil } from "igniteui-react-core";
import { AxisDefaults } from "./AxisDefaults";
import { BrushUtilCore } from "igniteui-react-core";
import { ImageLoader } from "igniteui-react-core";
import { AxisRange } from "./AxisRange";
import { LinearNumericSnapper } from "./LinearNumericSnapper";
import { AxisAnnotationCollection } from "./AxisAnnotationCollection";
import { VerticalAlignment_$type } from "igniteui-react-core";
import { Canvas } from "igniteui-react-core";
import { IFastItemsSourceProvider_$type } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { LabelPosition } from "./LabelPosition";
import { BindingFormatter } from "igniteui-react-core";
import { LabelFontHeuristics } from "./LabelFontHeuristics";
import { Pool$1 } from "igniteui-react-core";
import { AnnotationBackingArrangedSize } from "./AnnotationBackingArrangedSize";
import { AxisComponentsFromView } from "./AxisComponentsFromView";
import { FeatureState_$type } from "igniteui-react-core";
import { FastReflectionHelper } from "igniteui-react-core";
import { TransformGroup } from "igniteui-react-core";
import { Convert } from "igniteui-react-core";
import { GeometryUtil } from "igniteui-react-core";
import { UIElement } from "igniteui-react-core";
import { PolygonUtil } from "igniteui-react-core";
import { ContentControl } from "igniteui-react-core";
import { RotateTransform } from "igniteui-react-core";
import { AxisRangeChangedEventArgs } from "./AxisRangeChangedEventArgs";
import { RectangleGeometry } from "igniteui-react-core";
import { PathRenderingInfo } from "./PathRenderingInfo";
import { LineGeometry } from "igniteui-react-core";
import { RenderRequestedEventArgs } from "./RenderRequestedEventArgs";
import { AxisMatcher } from "./AxisMatcher";
import { CategoryMode_$type } from "./CategoryMode";
import { GridMode_$type } from "./GridMode";
import { Panel } from "igniteui-react-core";
import { RectUtil } from "igniteui-react-core";
import { TickmarkValues } from "./TickmarkValues";
import { TranslateTransform } from "igniteui-react-core";
import { AngleSimplifier } from "igniteui-react-core";
import { TransformMatrixHelpler } from "igniteui-react-core";
import { TrimmedTextInfo } from "./TrimmedTextInfo";
import { ICategoryScaler_$type } from "./ICategoryScaler";
import { OverlayCollisionInfo } from "./OverlayCollisionInfo";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { NumericAxisRenderingParameters } from "./NumericAxisRenderingParameters";
import { LogarithmicTickmarkValues } from "./LogarithmicTickmarkValues";
import { LinearTickmarkValues } from "./LinearTickmarkValues";
import { CategoryAxisRenderingParameters } from "./CategoryAxisRenderingParameters";
import { TickmarkValuesInitializationParameters } from "./TickmarkValuesInitializationParameters";
import { NumberAbbreviatorFactory } from "./NumberAbbreviatorFactory";
import { AutomaticAxisPurpose_$type } from "./AutomaticAxisPurpose";
import { SeriesMatcher } from "./SeriesMatcher";
import { Stack$1 } from "igniteui-react-core";
import { RenderValidEventArgs } from "./RenderValidEventArgs";
import { ArrayExtension } from "igniteui-react-core";
import { SeriesLayerPropertyOverlayValueResolvingEventArgs } from "./SeriesLayerPropertyOverlayValueResolvingEventArgs";
import { PlatformAPIHelper } from "igniteui-react-core";
import { PenLineCap_$type } from "igniteui-react-core";
import { Marker } from "./Marker";
import { AutoMarginsAndAngleUpdateMode_$type } from "./AutoMarginsAndAngleUpdateMode";
import { ComputedPlotAreaMarginMode_$type } from "./ComputedPlotAreaMarginMode";
import { ILegendSeries_$type } from "igniteui-react-core";
import { ILegendSeriesInternal_$type } from "igniteui-react-core";
import { ILegendTemplateProvider_$type } from "igniteui-react-core";
import { PenLineJoin_$type } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
import { SeriesVisibleRangeMode_$type } from "./SeriesVisibleRangeMode";
import { SeriesOutlineMode_$type } from "./SeriesOutlineMode";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { TransitionOutSpeedType_$type } from "./TransitionOutSpeedType";
import { SeriesHitTestMode_$type } from "./SeriesHitTestMode";
import { SeriesComponentsForView } from "./SeriesComponentsForView";
import { Binding } from "igniteui-react-core";
import { MarkerOutlineMode_$type } from "./MarkerOutlineMode";
import { MarkerFillMode_$type } from "./MarkerFillMode";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { FastItemColumn } from "igniteui-react-core";
import { TransitionOutCompletedEventArgs } from "./TransitionOutCompletedEventArgs";
import { IChartItemLegend_$type } from "igniteui-react-core";
import { SeriesComponentsFromView } from "./SeriesComponentsFromView";
import { DataLegendSeriesValueInfo } from "igniteui-react-core";
import { DataLegendSeriesContext } from "igniteui-react-core";
import { MarkerType_$type } from "./MarkerType";
import { Style } from "igniteui-react-core";
import { FastItemsSourceReference } from "igniteui-react-core";
import { stringFormat } from "igniteui-react-core";
import { EasingFunctions } from "igniteui-react-core";
/**
* @hidden
*/
var SeriesViewer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SeriesViewer, _super);
function SeriesViewer() {
var _this = _super.call(this) || this;
_this._widget = null;
_this.dw = null;
_this.ee = null;
_this.an = null;
_this.userAnnotationInformationRequested = null;
_this.userAnnotationToolTipContentUpdating = null;
_this.hm = new List$1(ICommandStateChangedListener_$type, 0);
_this._commandCompleted = null;
_this._invalidateActions = null;
_this.hi = null;
_this.bn = null;
_this.bp = null;
_this.e0 = false;
_this.ez = false;
_this.dn = null;
_this.b7 = new SeriesCollection();
_this.b8 = new SeriesCollection();
_this.j1 = 0;
_this.ch = 0;
_this.cj = 0;
_this._skipDataCleanup = false;
_this.dy = null;
_this.d0 = null;
_this.dx = null;
_this.dz = null;
_this.a3 = null;
_this.yh = 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.cx = 0;
_this.cy = 0;
_this.cc = 1;
_this.cp = 1;
_this.cl = 3;
_this.propertyChanged = null;
_this.propertyUpdated = null;
_this.kh = null;
_this.hj = new HashSet$1(IChartLegend_$type, 0);
_this.ev = false;
_this.seriesCursorMouseMove = null;
_this.seriesMouseLeftButtonDown = null;
_this.seriesMouseLeftButtonUp = null;
_this.seriesClick = null;
_this.seriesMouseMove = null;
_this.seriesMouseEnter = null;
_this.seriesMouseLeave = null;
_this.em = false;
_this.el = false;
_this.yq = Rect.empty;
_this.yo = Rect.empty;
_this.ej = true;
_this.yn = null;
_this.e5 = false;
_this.j0 = 30;
_this.resizeIdle = null;
_this.gl = false;
_this.e7 = false;
_this.cu = new SeriesViewerComponentsForView();
_this.es = false;
_this.a5 = 0;
_this.a4 = 1;
_this.seriesAnimating = null;
_this.eg = new VersionQueueHelper();
_this.ep = false;
_this.en = false;
_this.dh = 0;
_this.ex = false;
_this.ff = false;
_this.ek = false;
_this.ns = null;
_this.viewerManipulationStarting = null;
_this.viewerManipulationEnding = null;
_this.e3 = false;
_this.ey = false;
_this.windowRectChanged = null;
_this.sizeChanged = null;
_this.fr = false;
_this.actualWindowRectChanged = null;
_this.gridAreaRectChanged = null;
_this.fh = false;
_this.h0 = 0.0001;
_this.hz = 0.0001;
_this._syncChannel = null;
_this.c4 = null;
_this.g7 = false;
_this.e2 = false;
_this.fq = false;
_this.hd = false;
_this.da = 1;
_this.zb = null;
_this.j3 = 0;
_this.b5 = null;
_this.e1 = false;
_this.g8 = false;
_this.yp = Rect.empty;
_this._selectedSeriesItems = null;
_this._focusedSeriesItems = null;
_this.selectedSeriesItemsChanged = null;
_this.focusedSeriesItemsChanged = null;
_this.hu = new Date();
_this.hg = false;
_this.refreshCompleted = null;
_this.km = null;
_this.kl = null;
_this.xs = null;
_this.xr = null;
_this.ig = NaN;
_this.id = NaN;
_this.ie = NaN;
_this.ic = NaN;
_this.ib = NaN;
_this.h9 = NaN;
_this.ia = NaN;
_this.h8 = NaN;
_this.kj = null;
_this.al = null;
_this.am = null;
_this.ak = null;
_this.ew = false;
_this.ei = false;
_this._syncSettings = null;
_this.destroyed = false;
_this.kg = null;
_this.hh = new Dictionary$2(String_$type, Base.$, 0);
_this.gj = false;
_this.ih = NaN;
_this.h5 = NaN;
_this.h7 = NaN;
_this.h3 = NaN;
_this.h2 = 30;
_this.h1 = NaN;
_this.eo = true;
_this.h6 = NaN;
_this.h4 = NaN;
_this.kk = null;
_this.hw = 1;
_this.hv = NaN;
_this.ym = null;
_this.fp = false;
_this.hx = 0;
_this.hy = 0;
_this.ur = null;
_this.bc = null;
_this.fv = false;
_this.fw = false;
_this.ft = false;
_this.et = false;
_this.j2 = 0;
_this.fd = false;
_this.fz = false;
_this.seriesDataUpdated = null;
_this.hn = new List$1(IDataLegend_$type, 0);
_this.eh = null;
_this.seriesDataChanged = null;
_this.hq = null;
_this.imageCaptured = null;
_this.df = null;
_this.ht = dateMinValue();
_this.eu = false;
_this.bk = null;
_this.eq = false;
_this.er = false;
DVContainer.instance.registerIfLoaded("AnnotationFactoryManager");
DVContainer.instance.registerIfLoaded("InteractivityFactoryManager");
DVContainer.instance.registerIfLoaded("DataChartToolbarFactoryManager");
DVContainer.instance.registerIfLoaded("VisualDataFactoryManager");
_this.ym = Rect.empty;
_this.yh = { $type: Point_$type, x: NaN, y: NaN };
_this.hu = dateNow();
_this.fv = false;
_this.fw = false;
_this.al = new CanvasRenderScheduler();
_this.al.a = runOn(_this, _this.ow);
_this.am = new CanvasRenderScheduler();
_this.ak = new CanvasRenderScheduler();
SeriesViewer.y4 = new Rect(0, 0, 0, 1, 1);
_this.syncSettings = ((function () {
var $ret = new SyncSettings();
$ret.synchronizeHorizontally = true;
$ret.synchronizeVertically = true;
return $ret;
})());
_this.dw = _this.dv();
_this.rw(_this.dw);
_this.dw.c7();
_this.t0();
_this.pn();
_this.actualSyncLink = new SyncLink();
_this.t7(null, _this.actualSyncLink);
_this.a3 = new ChartContentManager(_this);
_this.propertyUpdated = delegateCombine(_this.propertyUpdated, function (a, b) { return _this.r8(a, b.propertyName, b.oldValue, b.newValue); });
_this.selectedSeriesItems = new ChartSelectedItemCollection();
var a = _this.selectedSeriesItems;
a.collectionChanged = delegateCombine(a.collectionChanged, runOn(_this, _this.rh));
var b = _this.selectedSeriesItems;
b.collectionResetting = delegateCombine(b.collectionResetting, runOn(_this, _this.tg));
_this.focusedSeriesItems = new ChartSelectedItemCollection();
var c = _this.focusedSeriesItems;
c.collectionChanged = delegateCombine(c.collectionChanged, runOn(_this, _this.qu));
var d = _this.focusedSeriesItems;
d.collectionResetting = delegateCombine(d.collectionResetting, runOn(_this, _this.pg));
var e = _this.series;
e.collectionChanged = delegateCombine(e.collectionChanged, runOn(_this, _this.sa));
var f = _this.series;
f.collectionResetting = delegateCombine(f.collectionResetting, runOn(_this, _this.sb));
var g = _this.b9;
g.collectionChanged = delegateCombine(g.collectionChanged, runOn(_this, _this.ti));
var h = _this.b9;
h.collectionResetting = delegateCombine(h.collectionResetting, runOn(_this, _this.tj));
_this.dz = new DoubleAnimator(0, 1, _this.kc);
_this.dy = new DoubleAnimator(0, 1, _this.ka);
var i = _this.dy;
i.propertyChanged = delegateCombine(i.propertyChanged, runOn(_this, _this.pm));
_this.d0 = new DoubleAnimator(0, 1, _this.ke);
_this.dx = new DoubleAnimator(0, 1, _this.j7);
var j = _this.d0;
j.propertyChanged = delegateCombine(j.propertyChanged, runOn(_this, _this.th));
var k = _this.dx;
k.propertyChanged = delegateCombine(k.propertyChanged, runOn(_this, _this.ph));
_this.dw.b0();
_this.pp();
_this.po();
return _this;
}
Object.defineProperty(SeriesViewer.prototype, "widget", {
get: function () {
return this._widget;
},
set: function (a) {
this._widget = a;
},
enumerable: false,
configurable: true
});
SeriesViewer.staticInit = function () {
SeriesViewer.y4 = new Rect(0, 0, 0, 1, 1);
};
Object.defineProperty(SeriesViewer.prototype, "ef", {
get: function () {
if (this.ee == null) {
this.ee = new SRProvider(this.dw.j.ae);
}
return this.ee;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.ao = function (a) {
if (this.an == null) {
this.an = new AutomaticSeriesManager(this, this.series, this.b9);
}
return this.an;
};
SeriesViewer.prototype.getDesiredToolbarActions = function () {
if (!this.gc) {
return null;
}
return this.bo.getDesiredToolbarActions(this);
};
SeriesViewer.prototype.ru = function (a, b) {
if (this.userAnnotationInformationRequested != null) {
this.userAnnotationInformationRequested(a, b);
}
};
SeriesViewer.prototype.rv = function (a, b) {
if (this.userAnnotationToolTipContentUpdating != null) {
this.userAnnotationToolTipContentUpdating(a, b);
}
};
SeriesViewer.prototype.op = function (a) {
if (this.fs) {
for (var b = 0; b < this.b9.count; b++) {
var c = this.b9._inner[b];
if (c.f9) {
this.bl.cancelAnnotationFlow(c, a);
}
}
}
};
SeriesViewer.prototype.pb = function (a) {
if (this.fs) {
for (var b = 0; b < this.b9.count; b++) {
var c = this.b9._inner[b];
if (c.f9) {
this.bl.finishAnnotationFlow(c, a);
}
}
}
};
SeriesViewer.prototype.onToolCommandExecuting = function (a) {
if (!this.gc) {
return 1;
}
return this.bo.onToolCommandExecuting(this, a);
};
SeriesViewer.prototype.addCommandAvailabilityListener = function (a) {
};
SeriesViewer.prototype.removeCommandAvailabilityListener = function (a) {
};
SeriesViewer.prototype.addCommandStateChangedListener = function (a) {
if (!this.hm.contains(a)) {
this.hm.add(a);
}
};
SeriesViewer.prototype.removeCommandStateChangedListener = function (a) {
if (this.hm.contains(a)) {
this.hm.remove(a);
}
};
Object.defineProperty(SeriesViewer.prototype, "commandCompleted", {
get: function () {
return this._commandCompleted;
},
set: function (a) {
this._commandCompleted = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "invalidateActions", {
get: function () {
return this._invalidateActions;
},
set: function (a) {
this._invalidateActions = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "hk", {
get: function () {
return this.hi;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.provideContextAccessor = function (a) {
if (this.hi == null) {
this.hi = new HashSet$1(IToolbarContextAccessor_$type, 0);
}
this.hi.add_1(a);
};
SeriesViewer.prototype.dismissContextAccessor = function (a) {
if (this.hi == null) {
return;
}
this.hi.remove(a);
};
SeriesViewer.prototype.ps = function () {
if (this.invalidateActions != null) {
this.invalidateActions();
}
};
Object.defineProperty(SeriesViewer.prototype, "bo", {
get: function () {
var _this = this;
if (this.bn == null) {
this.bn = DVContainer.instance.createInstance(IDataChartToolbarProvider_$type, function () { return _this.ef.n; });
this.bn.container = this.dw.bl;
}
return this.bn;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "gc", {
get: function () {
return DVContainer.instance.checkLoaded("DataChartToolbarFactoryManager");
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "bq", {
get: function () {
var _this = this;
if (this.bp == null) {
this.bp = DVContainer.instance.createInstance(ISeriesViewerInteractionManager_$type, function () { return _this.ef.n; });
}
return this.bp;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "f3", {
get: function () {
return DVContainer.instance.checkLoaded("InteractivityFactoryManager");
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.sb = function (a, b) {
if (this.an != null) {
this.an.o(a, b);
}
else {
this.b9.clear();
}
};
SeriesViewer.prototype.sa = function (a, b) {
var e_1, _a;
if (this.an != null) {
this.an.n(a, b);
}
else {
switch (b.action) {
case 0:
if (b.newItems != null) {
for (var c = 0; c < b.newItems.count; c++) {
var d = b.newItems.item(c);
this.b9.insert(c + b.newStartingIndex, d);
}
}
break;
case 1:
if (b.oldItems != null) {
for (var e = 0; e < b.oldItems.count; e++) {
this.b9.removeAt(b.oldStartingIndex);
}
}
break;
case 2:
if (b.oldItems != null) {
for (var f = 0; f < b.oldItems.count; f++) {
this.b9.removeAt(b.oldStartingIndex);
}
}
if (b.newItems != null) {
for (var g = 0; g < b.newItems.count; g++) {
var h = b.newItems.item(g);
this.b9.insert(g + b.newStartingIndex, h);
}
}
break;
case 4:
this.b9.clear();
try {
for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
var i = _c.value;
this.b9.add(i);
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
break;
}
}
};
SeriesViewer.prototype.tg = function (a, b) {
for (var c = 0; c < this.selectedSeriesItems.count; c++) {
this.q0(this.selectedSeriesItems._inner[c]);
}
};
SeriesViewer.prototype.pg = function (a, b) {
for (var c = 0; c < this.focusedSeriesItems.count; c++) {
this.qz(this.focusedSeriesItems._inner[c]);
}
};
SeriesViewer.prototype.rh = function (a, b) {
if (b.action == 4 && b.newItems == null && b.oldItems == null) {
return;
}
if (this.e0) {
return;
}
if (b.oldItems != null) {
for (var c = 0; c < b.oldItems.count; c++) {
var d = b.oldItems.item(c);
this.q0(d);
}
}
if (b.newItems != null) {
for (var e = 0; e < b.newItems.count; e++) {
var f = b.newItems.item(e);
f.f(this);
}
for (var g = 0; g < b.newItems.count; g++) {
var h = b.newItems.item(g);
this.q2(h);
}
}
var i = new ChartSelectedItemCollection();
if (b.oldItems != null) {
for (var j = 0; j < b.oldItems.count; j++) {
i.add(b.oldItems.item(j));
}
}
var k = new ChartSelectedItemCollection();
if (b.newItems != null) {
for (var l = 0; l < b.newItems.count; l++) {
k.add(b.newItems.item(l));
}
}
var m = this.selectedSeriesItems;
this.rg(this, new SeriesViewerSelectedSeriesItemsChangedEventArgs(i, k, m));
};
SeriesViewer.prototype.qu = function (a, b) {
if (b.action == 4 && b.newItems == null && b.oldItems == null) {
return;
}
if (this.ez) {
return;
}
if (b.oldItems != null) {
for (var c = 0; c < b.oldItems.count; c++) {
var d = b.oldItems.item(c);
this.qz(d);
}
}
if (b.newItems != null) {
for (var e = 0; e < b.newItems.count; e++) {
var f = b.newItems.item(e);
this.q1(f);
}
}
var g = new ChartSelectedItemCollection();
if (b.oldItems != null) {
for (var h = 0; h < b.oldItems.count; h++) {
g.add(b.oldItems.item(h));
}
}
var i = new ChartSelectedItemCollection();
if (b.newItems != null) {
for (var j = 0; j < b.newItems.count; j++) {
i.add(b.newItems.item(j));
}
}
var k = this.selectedSeriesItems;
this.qt(this, new SeriesViewerSelectedSeriesItemsChangedEventArgs(g, i, k));
};
SeriesViewer.prototype.q1 = function (a) {
this.pi(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
b.p5(c.item);
});
};
SeriesViewer.prototype.qz = function (a) {
this.pi(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
b.p3(c.item);
});
};
SeriesViewer.prototype.pi = function (a) {
var e_2, _a;
try {
for (var _b = __values(fromEnum(this.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
a(b);
if (b.isStacked) {
b.qh(function (c) {
a(c);
if (c.ei) {
c.qf(function (d) {
a(d);
return true;
});
}
return true;
});
}
if (b.ei) {
b.qf(function (c) {
a(c);
return true;
});
}
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
};
SeriesViewer.prototype.q2 = function (a) {
this.pi(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
if (c.item == null) {
b.qb();
}
else {
b.p6(c.item);
}
});
};
SeriesViewer.prototype.q0 = function (a) {
this.pi(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
if (c.item == null) {
b.p9();
}
else {
b.p4(c.item);
}
});
};
SeriesViewer.prototype.pn = function () {
if (this.dn != null && this.dp == null) {
var a = this.dp;
a.thumbnailSizeChanged = delegateRemove(a.thumbnailSizeChanged, runOn(this, this.r4));
}
if (this.dp != null) {
var b = this.dp;
b.thumbnailSizeChanged = delegateCombine(b.thumbnailSizeChanged, runOn(this, this.r4));
}
if (this.kk != null) {
this.dp.backgroundImageUri = this.kk;
}
if (this.dp != null) {
this.dp.initializeScalingRatio(this.ij);
}
if (this.dn == null && this.dp != null) {
this.p7();
}
this.dn = this.dp;
};
SeriesViewer.prototype.r4 = function (a, b) {
var e_3, _a;
this.dp.surfaceIsDirty = true;
try {
for (var _b = __values(fromEnum(this.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var c = _c.value;
c.g6 = true;
}
}
catch (e_3_1) {
e_3 = { error: e_3_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_3)
throw e_3.error;
}
}
};
SeriesViewer.prototype.get_go = function () {
return false;
};
Object.defineProperty(SeriesViewer.prototype, "go", {
get: function () {
return this.get_go();
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.get_gn = function () {
return false;
};
Object.defineProperty(SeriesViewer.prototype, "gn", {
get: function () {
return this.get_gn();
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.po = function () {
this.dw.cr();
if (this.dp != null) {
this.dp.initializeScalingRatio(this.ij);
}
};
Object.defineProperty(SeriesViewer.prototype, "series", {
get: function () {
return this.b8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "b9", {
get: function () {
return this.b7;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.ti = function (a, b) {
var e_4, _a, e_5, _b, e_6, _c, e_7, _d;
var c = this.fd;
this.fd = this.fj();
if (b.oldItems != null) {
var d = this.j1;
try {
for (var _e = __values(fromEn(b.oldItems)), _f = _e.next(); !_f.done; _f = _e.next()) {
var e = _f.value;
if (e != null && e.eq) {
this.j1--;
if (this.j1 < 0) {
this.j1 = 0;
}
}
e.c4 = null;
e.dc = null;
this.s8(e);
this.dw.d1(e);
}
}
catch (e_4_1) {
e_4 = { error: e_4_1 };
}
finally {
try {
if (_f && !_f.done && (_a = _e.return))
_a.call(_e);
}
finally {
if (e_4)
throw e_4.error;
}
}
if (this.j1 < d) {
try {
for (var _g = __values(fromEnum(this.b9)), _h = _g.next(); !_h.done; _h = _g.next()) {
var f = _h.value;
if (f.ev) {
continue;
}
f.p8();
}
}
catch (e_5_1) {
e_5 = { error: e_5_1 };
}
finally {
try {
if (_h && !_h.done && (_b = _g.return))
_b.call(_g);
}
finally {
if (e_5)
throw e_5.error;
}
}
}
}
if (b.newItems != null) {
var g = this.j1;
try {
for (var _j = __values(fromEn(b.newItems)), _k = _j.next(); !_k.done; _k = _j.next()) {
var h = _k.value;
if (h != null && h.eq) {
this.j1++;
}
if (!this.dw.ar(h)) {
this.t1(h);
this.dw.bs(h);
h.dc = this;
h.c4 = this.actualSyncLink;
h.s7();
}
}
}
catch (e_6_1) {
e_6 = { error: e_6_1 };
}
finally {
try {
if (_k && !_k.done && (_c = _j.return))
_c.call(_j);
}
finally {
if (e_6)
throw e_6.error;
}
}
if (this.j1 > g) {
try {
for (var _l = __values(fromEnum(this.b9)), _m = _l.next(); !_m.done; _m = _l.next()) {
var i = _m.value;
if (i.ev || b.newItems.contains(i)) {
continue;
}
i.p8();
}
}
catch (e_7_1) {
e_7 = { error: e_7_1 };
}
finally {
try {
if (_m && !_m.done && (_d = _l.return))
_d.call(_l);
}
finally {
if (e_7)
throw e_7.error;
}
}
}
}
if (this.fd != c && !this.y9.isEmpty) {
this.r7(this.y9, this.y9);
}
this.p6();
this.qf();
this.qx();
this.p0();
};
Object.defineProperty(SeriesViewer.prototype, "ci", {
get: function () {
return this.ch;
},
set: function (a) {
this.ch = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "ck", {
get: function () {
return this.cj;
},
set: function (a) {
this.cj = a;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.pq = function () {
this.qf();
};
SeriesViewer.prototype.qf = function () {
};
Object.defineProperty(SeriesViewer.prototype, "skipDataCleanup", {
get: function () {
return this._skipDataCleanup;
},
set: function (a) {
this._skipDataCleanup = a;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.s8 = function (a) {
if (!this.skipDataCleanup) {
if (typeCast(Series.$, a) !== null) {
a.itemsSource = null;
}
else if (typeCast(CategoryAxisBase.$, a) !== null) {
a.itemsSource = null;
}
}
this.ta(a.name, true);
};
Object.defineProperty(SeriesViewer.prototype, "fm", {
get: function () {
return this.j1 > 0;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.tj = function (a, b) {
var e_8, _a;
this.fd = this.fj();
try {
for (var _b = __values(fromEnum(this.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var c = _c.value;
c.c4 = null;
c.dc = null;
this.s8(c);
this.dw.d1(c);
}
}
catch (e_8_1) {
e_8 = { error: e_8_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_8)
throw e_8.error;
}
}
this.j1 = 0;
this.p0();
};
SeriesViewer.prototype.pv = function (a, b, c, d) {
var e = this.y9;
var f = e.width;
var g = e.height;
var h = 1;
var i = a / b;
if (isNaN_(h)) {
return {
p0: a,
p1: b
};
}
if (isNaN_(i) || c || d || Math.abs(h - i) > 0.0001) {
if (c && d) {
if (a > b) {
b = a / h;
}
else {
a = b * h;
}
}
else if (c) {
b = a / h;
}
else {
a = b * h;
}
}
if (b > 1) {
var j = 1 / b;
b = 1;
a = a * j;
}
if (a > 1) {
var k = 1 / a;
a = 1;
b = b * k;
}
return {
p0: a,
p1: b
};
};
SeriesViewer.prototype.fj = function () {
return false;
};
Object.defineProperty(SeriesViewer.prototype, "g4", {
get: function () {
return this.ge;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "fx", {
get: function () {
return this.bp != null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "fc", {
get: function () {
return this.bp != null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "fb", {
get: function () {
return this.cx != 0 || this.cy != 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "fa", {
get: function () {
return this.fc && this.fb;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "d7", {
get: function () {
var a = this.bq.f$e;
if (a.executionContext == null) {
a.executionContext = this.dw.l();
}
if (a.ensureAnimator == null) {
a.ensureAnimator = runOn(this, this.o7);
}
a.dismissHighlightDelay = this.j9;
return a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "d8", {
get: function () {
var a = this.bq.f$f;
if (a.executionContext == null) {
a.executionContext = this.dw.l();
}
if (a.ensureAnimator == null) {
a.ensureAnimator = runOn(this, this.o8);
}
a.dismissHighlightDelay = this.kd;
return a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "d6", {
get: function () {
var a = this.bq.f$d;
if (a.executionContext == null) {
a.executionContext = this.dw.l();
}
if (a.ensureAnimator == null) {
a.ensureAnimator = runOn(this, this.o6);
}
a.dismissHighlightDelay = this.j6;
return a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "br", {
get: function () {
var a = this.bq.f$b;
if (a.executionContext == null) {
a.executionContext = this.dw.l();
}
if (a.animator == null) {
a.animator = this.dz;
a.owner = this;
}
return a;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.o7 = function () {
{
var a = this.dy;
if (!a.f() && a.r > 0) {
a.v();
}
if (a.r == 0) {
var b = this.ha(1);
while (b) {
b = this.ha(0);
b = this.ha(1);
}
}
}
};
SeriesViewer.prototype.o8 = function () {
{
var a = this.d0;
if (!a.f() && a.r > 0) {
a.v();
}
if (a.r == 0) {
var b = this.hb(1);
while (b) {
b = this.hb(0);
b = this.hb(1);
}
}
}
};
SeriesViewer.prototype.o6 = function () {
{
var a = this.dx;
if (!a.f() && a.r > 0) {
a.v();
}
if (a.r == 0) {
var b = this.g9(1);
while (b) {
b = this.g9(0);
b = this.g9(1);
}
}
}
};
SeriesViewer.prototype.pm = function (a, b) {
this.ha(this.dy.o);
};
SeriesViewer.prototype.th = function (a, b) {
this.hb(this.d0.o);
};
SeriesViewer.prototype.ph = function (a, b) {
this.g9(this.dx.o);
};
SeriesViewer.prototype.ha = function (a) {
var b = this.d7.tick(a);
if (a == 1 && b && this.dy.r > 0) {
this.dy.v();
}
var c = this.d7.dirtyContexts;
if (this.d7.allDirty) {
var d = this.b9;
for (var e = 0; e < d.count; e++) {
var f = d._inner[e];
f.rk();
}
}
else {
for (var g = 0; g < c.count; g++) {
var h = c._inner[g];
h.rk();
}
}
if (!b) {
this.dy.w();
this.qw();
}
return b;
};
SeriesViewer.prototype.hb = function (a) {
var b = this.d8.tick(a);
if (a == 1 && b && this.d0.r > 0) {
this.d0.v();
}
var c = this.d8.dirtyContexts;
if (this.d8.allDirty) {
var d = this.b9;
for (var e = 0; e < d.count; e++) {
var f = d._inner[e];