igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,427 lines • 880 kB
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, __values } from "tslib";
import { Control } from "igniteui-react-core";
import { INotifyPropertyChanged_$type, Base, Type, 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, Array_$type, Date_$type, getInstanceType } 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 { ICommandStateChangedListener_$type } from "igniteui-react-core";
import { List$1 } 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 { 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 { defaultDVDateParse, dateNow } from "igniteui-react-core";
import { stringIsNullOrEmpty, stringEmpty, stringEndsWith, stringStartsWith, stringIsNullOrWhiteSpace } 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 { DefaultPaletteInfo } from "./DefaultPaletteInfo";
import { CssGradientUtil } from "igniteui-react-core";
import { AxisDefaults } from "./AxisDefaults";
import { BrushUtilCore } 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 { AxisComponentsFromView } from "./AxisComponentsFromView";
import { FastReflectionHelper } 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 { CategoryMode_$type } from "./CategoryMode";
import { GridMode_$type } from "./GridMode";
import { Panel } from "igniteui-react-core";
import { UIElement } from "igniteui-react-core";
import { RectUtil } from "igniteui-react-core";
import { TickmarkValues } from "./TickmarkValues";
import { TransformGroup } from "igniteui-react-core";
import { RotateTransform } from "igniteui-react-core";
import { TranslateTransform } from "igniteui-react-core";
import { AngleSimplifier } from "igniteui-react-core";
import { TransformMatrixHelpler } from "igniteui-react-core";
import { ICategoryScaler_$type } from "./ICategoryScaler";
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 { AutomaticSeriesPurpose_$type } from "./AutomaticSeriesPurpose";
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 { Marker } from "./Marker";
import { ContentControl } from "igniteui-react-core";
import { AutoMarginsAndAngleUpdateMode_$type } from "./AutoMarginsAndAngleUpdateMode";
import { ComputedPlotAreaMarginMode_$type } from "./ComputedPlotAreaMarginMode";
import { PolygonUtil } from "igniteui-react-core";
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 { PenLineCap_$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.c9 = null;
_this.ds = null;
_this.an = null;
_this.gp = new List$1(ICommandStateChangedListener_$type, 0);
_this._commandCompleted = null;
_this._invalidateActions = null;
_this.gm = null;
_this.a8 = null;
_this.ba = null;
_this.eb = false;
_this.ea = false;
_this.c1 = null;
_this.br = new SeriesCollection();
_this.i0 = 0;
_this.bz = 0;
_this.b1 = 0;
_this._skipDataCleanup = false;
_this.db = null;
_this.dd = null;
_this.da = null;
_this.dc = null;
_this.ar = null;
_this.v7 = null;
_this.plotAreaMouseLeftButtonDown = null;
_this.plotAreaMouseLeftButtonUp = null;
_this.plotAreaClicked = null;
_this.plotAreaMouseEnter = null;
_this.plotAreaMouseLeave = null;
_this.plotAreaMouseOver = null;
_this.cf = 0;
_this.cg = 0;
_this.bu = 1;
_this.b7 = 1;
_this.b3 = 3;
_this.propertyChanged = null;
_this.propertyUpdated = null;
_this.jf = null;
_this.d6 = false;
_this.seriesCursorMouseMove = null;
_this.seriesMouseLeftButtonDown = null;
_this.seriesMouseLeftButtonUp = null;
_this.seriesClick = null;
_this.seriesMouseMove = null;
_this.seriesMouseEnter = null;
_this.seriesMouseLeave = null;
_this.d0 = false;
_this.dz = false;
_this.wg = Rect.empty;
_this.we = Rect.empty;
_this.dx = true;
_this.wd = null;
_this.eg = false;
_this.iz = 30;
_this.fq = false;
_this.ei = false;
_this.cc = new SeriesViewerComponentsForView();
_this.d4 = false;
_this.at = 0;
_this.as = 1;
_this.seriesAnimating = null;
_this.du = new VersionQueueHelper();
_this.d3 = false;
_this.d1 = false;
_this.cv = 0;
_this.d8 = false;
_this.eq = false;
_this.dy = false;
_this.mm = null;
_this.viewerManipulationStarting = null;
_this.viewerManipulationEnding = null;
_this.ee = false;
_this.d9 = false;
_this.windowRectChanged = null;
_this.sizeChanged = null;
_this.e1 = false;
_this.actualWindowRectChanged = null;
_this.gridAreaRectChanged = null;
_this.es = false;
_this.g2 = 0.0001;
_this.g1 = 0.0001;
_this._syncChannel = null;
_this.cm = null;
_this.gb = false;
_this.ed = false;
_this.e0 = false;
_this.gh = false;
_this.cq = 1;
_this.w1 = null;
_this.i2 = 0;
_this.bq = null;
_this.ec = false;
_this.gc = false;
_this.wf = Rect.empty;
_this._selectedSeriesItems = null;
_this._focusedSeriesItems = null;
_this.selectedSeriesItemsChanged = null;
_this.focusedSeriesItemsChanged = null;
_this.gw = new Date();
_this.gk = false;
_this.refreshCompleted = null;
_this.jk = null;
_this.jj = null;
_this.vi = null;
_this.vh = null;
_this.hh = NaN;
_this.hf = NaN;
_this.hg = NaN;
_this.he = NaN;
_this.hd = NaN;
_this.hb = NaN;
_this.hc = NaN;
_this.ha = NaN;
_this.jh = null;
_this.al = null;
_this.am = null;
_this.ak = null;
_this.d7 = false;
_this.dw = false;
_this._syncSettings = null;
_this.destroyed = false;
_this.je = null;
_this.gl = new Dictionary$2(String_$type, Base.$, 0);
_this.fo = false;
_this.hi = NaN;
_this.g7 = NaN;
_this.g9 = NaN;
_this.g5 = NaN;
_this.g4 = 30;
_this.g3 = NaN;
_this.d2 = true;
_this.g8 = NaN;
_this.g6 = NaN;
_this.ji = null;
_this.gy = 1;
_this.gx = NaN;
_this.wc = null;
_this.ez = false;
_this.gz = 0;
_this.g0 = 0;
_this.sk = null;
_this.az = null;
_this.e4 = false;
_this.e5 = false;
_this.e2 = false;
_this.d5 = false;
_this.i1 = 0;
_this.eo = false;
_this.e8 = false;
_this.seriesDataUpdated = null;
_this.gq = new List$1(IDataLegend_$type, 0);
_this.dv = null;
_this.seriesDataChanged = null;
_this.gt = null;
_this.imageCaptured = null;
DVContainer.instance.registerIfLoaded("AnnotationFactoryManager");
DVContainer.instance.registerIfLoaded("InteractivityFactoryManager");
DVContainer.instance.registerIfLoaded("DataChartToolbarFactoryManager");
DVContainer.instance.registerIfLoaded("VisualDataFactoryManager");
_this.wc = Rect.empty;
_this.v7 = { $type: Point_$type, x: NaN, y: NaN };
_this.gw = dateNow();
_this.e4 = false;
_this.e5 = false;
_this.al = new CanvasRenderScheduler();
_this.al.a = runOn(_this, _this.nn);
_this.am = new CanvasRenderScheduler();
_this.ak = new CanvasRenderScheduler();
SeriesViewer.wu = new Rect(0, 0, 0, 1, 1);
_this.syncSettings = ((function () {
var $ret = new SyncSettings();
$ret.synchronizeHorizontally = true;
$ret.synchronizeVertically = true;
return $ret;
})());
_this.c9 = _this.c8();
_this.qe(_this.c9);
_this.c9.c4();
_this.rv();
_this.n8();
_this.actualSyncLink = new SyncLink();
_this.r2(null, _this.actualSyncLink);
_this.ar = new ChartContentManager(_this);
_this.propertyUpdated = delegateCombine(_this.propertyUpdated, function (a, b) { return _this.qq(a, b.propertyName, b.oldValue, b.newValue); });
_this.selectedSeriesItems = new ChartSelectedItemCollection();
var a = _this.selectedSeriesItems;
a.collectionChanged = delegateCombine(a.collectionChanged, runOn(_this, _this.p1));
var b = _this.selectedSeriesItems;
b.collectionResetting = delegateCombine(b.collectionResetting, runOn(_this, _this.ri));
_this.focusedSeriesItems = new ChartSelectedItemCollection();
var c = _this.focusedSeriesItems;
c.collectionChanged = delegateCombine(c.collectionChanged, runOn(_this, _this.pe));
var d = _this.focusedSeriesItems;
d.collectionResetting = delegateCombine(d.collectionResetting, runOn(_this, _this.n1));
var e = _this.series;
e.collectionChanged = delegateCombine(e.collectionChanged, runOn(_this, _this.rk));
var f = _this.series;
f.collectionResetting = delegateCombine(f.collectionResetting, runOn(_this, _this.rl));
_this.dc = new DoubleAnimator(0, 1, _this.ja);
_this.db = new DoubleAnimator(0, 1, _this.i9);
var g = _this.db;
g.propertyChanged = delegateCombine(g.propertyChanged, runOn(_this, _this.n7));
_this.dd = new DoubleAnimator(0, 1, _this.jc);
_this.da = new DoubleAnimator(0, 1, _this.i6);
var h = _this.dd;
h.propertyChanged = delegateCombine(h.propertyChanged, runOn(_this, _this.rj));
var i = _this.da;
i.propertyChanged = delegateCombine(i.propertyChanged, runOn(_this, _this.n2));
_this.c9.bx();
_this.oa();
_this.n9();
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.wu = new Rect(0, 0, 0, 1, 1);
};
Object.defineProperty(SeriesViewer.prototype, "dt", {
get: function () {
if (this.ds == null) {
this.ds = new SRProvider(this.c9.j.ae);
}
return this.ds;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.ao = function (a) {
if (this.an == null) {
this.an = new AutomaticSeriesManager(this);
}
return this.an;
};
SeriesViewer.prototype.getDesiredToolbarActions = function () {
if (!this.fi) {
return null;
}
return this.a9.getDesiredToolbarActions(this);
};
SeriesViewer.prototype.onToolCommandExecuting = function (a) {
if (!this.fi) {
return 1;
}
return this.a9.onToolCommandExecuting(this, a);
};
SeriesViewer.prototype.addCommandAvailabilityListener = function (a) {
};
SeriesViewer.prototype.removeCommandAvailabilityListener = function (a) {
};
SeriesViewer.prototype.addCommandStateChangedListener = function (a) {
if (!this.gp.contains(a)) {
this.gp.add(a);
}
};
SeriesViewer.prototype.removeCommandStateChangedListener = function (a) {
if (this.gp.contains(a)) {
this.gp.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, "gn", {
get: function () {
return this.gm;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.provideContextAccessor = function (a) {
if (this.gm == null) {
this.gm = new HashSet$1(IToolbarContextAccessor_$type, 0);
}
this.gm.add_1(a);
};
SeriesViewer.prototype.dismissContextAccessor = function (a) {
if (this.gm == null) {
return;
}
this.gm.remove(a);
};
SeriesViewer.prototype.od = function () {
if (this.invalidateActions != null) {
this.invalidateActions();
}
};
Object.defineProperty(SeriesViewer.prototype, "a9", {
get: function () {
var _this = this;
if (this.a8 == null) {
this.a8 = DVContainer.instance.createInstance(IDataChartToolbarProvider_$type, function () { return _this.dt.n; });
this.a8.container = this.c9.bi;
}
return this.a8;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "fi", {
get: function () {
return DVContainer.instance.checkLoaded("DataChartToolbarFactoryManager");
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "bb", {
get: function () {
var _this = this;
if (this.ba == null) {
this.ba = DVContainer.instance.createInstance(ISeriesViewerInteractionManager_$type, function () { return _this.dt.n; });
}
return this.ba;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "fa", {
get: function () {
return DVContainer.instance.checkLoaded("InteractivityFactoryManager");
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.ri = function (a, b) {
for (var c = 0; c < this.selectedSeriesItems.count; c++) {
this.pk(this.selectedSeriesItems._inner[c]);
}
};
SeriesViewer.prototype.n1 = function (a, b) {
for (var c = 0; c < this.focusedSeriesItems.count; c++) {
this.pj(this.focusedSeriesItems._inner[c]);
}
};
SeriesViewer.prototype.p1 = function (a, b) {
if (b.action == 4 && b.newItems == null && b.oldItems == null) {
return;
}
if (this.eb) {
return;
}
if (b.oldItems != null) {
for (var c = 0; c < b.oldItems.count; c++) {
var d = b.oldItems.item(c);
this.pk(d);
}
}
if (b.newItems != null) {
for (var e = 0; e < b.newItems.count; e++) {
var f = b.newItems.item(e);
f.g(this);
}
for (var g = 0; g < b.newItems.count; g++) {
var h = b.newItems.item(g);
this.pm(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.p0(this, new SeriesViewerSelectedSeriesItemsChangedEventArgs(i, k, m));
};
SeriesViewer.prototype.pe = function (a, b) {
if (b.action == 4 && b.newItems == null && b.oldItems == null) {
return;
}
if (this.ea) {
return;
}
if (b.oldItems != null) {
for (var c = 0; c < b.oldItems.count; c++) {
var d = b.oldItems.item(c);
this.pj(d);
}
}
if (b.newItems != null) {
for (var e = 0; e < b.newItems.count; e++) {
var f = b.newItems.item(e);
this.pl(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.pd(this, new SeriesViewerSelectedSeriesItemsChangedEventArgs(g, i, k));
};
SeriesViewer.prototype.pl = function (a) {
this.n3(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
b.pt(c.item);
});
};
SeriesViewer.prototype.pj = function (a) {
this.n3(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
b.pr(c.item);
});
};
SeriesViewer.prototype.n3 = function (a) {
var e_1, _a;
try {
for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
a(b);
if (b.isStacked) {
b.p5(function (c) {
a(c);
if (c.ei) {
c.p3(function (d) {
a(d);
return true;
});
}
return true;
});
}
if (b.ei) {
b.p3(function (c) {
a(c);
return true;
});
}
}
}
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;
}
}
};
SeriesViewer.prototype.pm = function (a) {
this.n3(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
if (c.item == null) {
b.pz();
}
else {
b.pu(c.item);
}
});
};
SeriesViewer.prototype.pk = function (a) {
this.n3(function (b) {
var c = a;
if (c.series != null && c.series != b) {
return;
}
if (c.item == null) {
b.px();
}
else {
b.ps(c.item);
}
});
};
SeriesViewer.prototype.n8 = function () {
if (this.c1 != null && this.c2 == null) {
var a = this.c2;
a.thumbnailSizeChanged = delegateRemove(a.thumbnailSizeChanged, runOn(this, this.qm));
}
if (this.c2 != null) {
var b = this.c2;
b.thumbnailSizeChanged = delegateCombine(b.thumbnailSizeChanged, runOn(this, this.qm));
}
if (this.ji != null) {
this.c2.backgroundImageUri = this.ji;
}
if (this.c2 != null) {
this.c2.initializeScalingRatio(this.hk);
}
if (this.c1 == null && this.c2 != null) {
this.or();
}
this.c1 = this.c2;
};
SeriesViewer.prototype.qm = function (a, b) {
var e_2, _a;
this.c2.surfaceIsDirty = true;
try {
for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
var c = _c.value;
c.g1 = 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.get_ft = function () {
return false;
};
Object.defineProperty(SeriesViewer.prototype, "ft", {
get: function () {
return this.get_ft();
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.get_fs = function () {
return false;
};
Object.defineProperty(SeriesViewer.prototype, "fs", {
get: function () {
return this.get_fs();
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.n9 = function () {
this.c9.co();
if (this.c2 != null) {
this.c2.initializeScalingRatio(this.hk);
}
};
Object.defineProperty(SeriesViewer.prototype, "series", {
get: function () {
return this.br;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.rk = function (a, b) {
var e_3, _a, e_4, _b, e_5, _c, e_6, _d;
var c = this.eo;
this.eo = this.eu();
if (b.oldItems != null) {
var d = this.i0;
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.i0--;
if (this.i0 < 0) {
this.i0 = 0;
}
}
e.c4 = null;
e.dc = null;
this.rc(e);
this.c9.dy(e);
}
}
catch (e_3_1) {
e_3 = { error: e_3_1 };
}
finally {
try {
if (_f && !_f.done && (_a = _e.return))
_a.call(_e);
}
finally {
if (e_3)
throw e_3.error;
}
}
if (this.i0 < d) {
try {
for (var _g = __values(fromEnum(this.series)), _h = _g.next(); !_h.done; _h = _g.next()) {
var f = _h.value;
if (f.eu) {
continue;
}
f.pw();
}
}
catch (e_4_1) {
e_4 = { error: e_4_1 };
}
finally {
try {
if (_h && !_h.done && (_b = _g.return))
_b.call(_g);
}
finally {
if (e_4)
throw e_4.error;
}
}
}
}
if (b.newItems != null) {
var g = this.i0;
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.i0++;
}
if (!this.c9.aq(h)) {
this.rw(h);
this.c9.bp(h);
h.dc = this;
h.c4 = this.actualSyncLink;
h.st();
}
}
}
catch (e_5_1) {
e_5 = { error: e_5_1 };
}
finally {
try {
if (_k && !_k.done && (_c = _j.return))
_c.call(_j);
}
finally {
if (e_5)
throw e_5.error;
}
}
if (this.i0 > g) {
try {
for (var _l = __values(fromEnum(this.series)), _m = _l.next(); !_m.done; _m = _l.next()) {
var i = _m.value;
if (i.eu || b.newItems.contains(i)) {
continue;
}
i.pw();
}
}
catch (e_6_1) {
e_6 = { error: e_6_1 };
}
finally {
try {
if (_m && !_m.done && (_d = _l.return))
_d.call(_l);
}
finally {
if (e_6)
throw e_6.error;
}
}
}
}
if (this.eo != c && !this.wz.isEmpty) {
this.qp(this.wz, this.wz);
}
this.oq();
this.oz();
this.ph();
this.ok();
};
Object.defineProperty(SeriesViewer.prototype, "b0", {
get: function () {
return this.bz;
},
set: function (a) {
this.bz = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "b2", {
get: function () {
return this.b1;
},
set: function (a) {
this.b1 = a;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.ob = function () {
this.oz();
};
SeriesViewer.prototype.oz = function () {
};
Object.defineProperty(SeriesViewer.prototype, "skipDataCleanup", {
get: function () {
return this._skipDataCleanup;
},
set: function (a) {
this._skipDataCleanup = a;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.rc = function (a) {
if (!this.skipDataCleanup) {
if (typeCast(Series.$, a) !== null) {
a.itemsSource = null;
}
else if (typeCast(CategoryAxisBase.$, a) !== null) {
a.itemsSource = null;
}
}
this.re(a.name, true);
};
Object.defineProperty(SeriesViewer.prototype, "ew", {
get: function () {
return this.i0 > 0;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.rl = function (a, b) {
var e_7, _a;
this.eo = this.eu();
try {
for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
var c = _c.value;
c.c4 = null;
c.dc = null;
this.rc(c);
this.c9.dy(c);
}
}
catch (e_7_1) {
e_7 = { error: e_7_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_7)
throw e_7.error;
}
}
this.i0 = 0;
this.ok();
};
SeriesViewer.prototype.of = function (a, b, c, d) {
var e = this.wz;
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.eu = function () {
return false;
};
Object.defineProperty(SeriesViewer.prototype, "f8", {
get: function () {
return this.fj;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "e6", {
get: function () {
return this.ba != null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "en", {
get: function () {
return this.ba != null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "em", {
get: function () {
return this.cf != 0 || this.cg != 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "el", {
get: function () {
return this.en && this.em;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "dk", {
get: function () {
var a = this.bb.f$e;
if (a.executionContext == null) {
a.executionContext = this.c9.l();
}
if (a.ensureAnimator == null) {
a.ensureAnimator = runOn(this, this.nx);
}
a.dismissHighlightDelay = this.i8;
return a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "dl", {
get: function () {
var a = this.bb.f$f;
if (a.executionContext == null) {
a.executionContext = this.c9.l();
}
if (a.ensureAnimator == null) {
a.ensureAnimator = runOn(this, this.ny);
}
return a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "dj", {
get: function () {
var a = this.bb.f$d;
if (a.executionContext == null) {
a.executionContext = this.c9.l();
}
if (a.ensureAnimator == null) {
a.ensureAnimator = runOn(this, this.nw);
}
return a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "bc", {
get: function () {
var a = this.bb.f$b;
if (a.executionContext == null) {
a.executionContext = this.c9.l();
}
if (a.animator == null) {
a.animator = this.dc;
a.owner = this;
}
return a;
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.nx = function () {
{
var a = this.db;
if (!a.f() && a.r > 0) {
a.v();
}
if (a.r == 0) {
var b = this.ge(1);
while (b) {
b = this.ge(0);
b = this.ge(1);
}
}
}
};
SeriesViewer.prototype.ny = function () {
{
var a = this.dd;
if (!a.f() && a.r > 0) {
a.v();
}
if (a.r == 0) {
var b = this.gf(1);
while (b) {
b = this.gf(0);
b = this.gf(1);
}
}
}
};
SeriesViewer.prototype.nw = function () {
{
var a = this.da;
if (!a.f() && a.r > 0) {
a.v();
}
if (a.r == 0) {
var b = this.gd(1);
while (b) {
b = this.gd(0);
b = this.gd(1);
}
}
}
};
SeriesViewer.prototype.n7 = function (a, b) {
this.ge(this.db.o);
};
SeriesViewer.prototype.rj = function (a, b) {
this.gf(this.dd.o);
};
SeriesViewer.prototype.n2 = function (a, b) {
this.gd(this.da.o);
};
SeriesViewer.prototype.ge = function (a) {
var b = this.dk.tick(a);
if (a == 1 && b && this.db.r > 0) {
this.db.v();
}
var c = this.dk.dirtyContexts;
if (this.dk.allDirty) {
var d = this.series;
for (var e = 0; e < d.count; e++) {
var f = d._inner[e];
f.q6();
}
}
else {
for (var g = 0; g < c.count; g++) {
var h = c._inner[g];
h.q6();
}
}
if (!b) {
this.db.w();
this.pg();
}
return b;
};
SeriesViewer.prototype.gf = function (a) {
var b = this.dl.tick(a);
if (a == 1 && b && this.dd.r > 0) {
this.dd.v();
}
var c = this.dl.dirtyContexts;
if (this.dl.allDirty) {
var d = this.series;
for (var e = 0; e < d.count; e++) {
var f = d._inner[e];
f.q6();
}
}
else {
for (var g = 0; g < c.count; g++) {
var h = c._inner[g];
h.q6();
}
}
if (!b) {
this.dd.w();
}
return b;
};
SeriesViewer.prototype.gd = function (a) {
var b = this.dj.tick(a);
if (a == 1 && b && this.da.r > 0) {
this.da.v();
}
var c = this.dj.dirtyContexts;
if (this.dj.allDirty) {
var d = this.series;
for (var e = 0; e < d.count; e++) {
var f = d._inner[e];
f.q6();
}
}
else {
for (var g = 0; g < c.count; g++) {
var h = c._inner[g];
h.q6();
}
}
if (!b) {
this.da.w();
}
return b;
};
SeriesViewer.prototype.n6 = function () {
this.c9.ck();
this.n5();
for (var a = 0; a < this.series.count; a++) {
if (this.series._inner[a].eu) {
this.series._inner[a].p9();
}
}
};
SeriesViewer.prototype.vn = function (a) {
return this.vm(this.ag, a);
};
SeriesViewer.prototype.vt = function (a) {
return this.vm(this.aj, a);
};
SeriesViewer.prototype.vr = function (a) {
return this.vm(this.ah, a);
};
SeriesViewer.prototype.vs = function (a) {
return this.vm(this.ai, a);
};
SeriesViewer.prototype.vm = function (a, b) {
if (a == null || a.count == 0) {
return null;
}
else {
return a.item(b % a.count);
}
};
Object.defineProperty(SeriesViewer.prototype, "v8", {
get: function () {
return this.v7;
},
set: function (a) {
if (PointUtil.notEquals(this.v7, a)) {
var b = this.v7;
this.v7 = a;
this.qv("CrosshairPoint", b, this.v7);
}
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.q8 = function () {
};
Object.defineProperty(SeriesViewer.prototype, "e9", {
get: function () {
return this.c0 == 1 || this.c0 == 2 || this.c0 == 3;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "legend", {
get: function () {
return this.c(SeriesViewer.tp);
},
set: function (a) {
this.h(SeriesViewer.tp, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "ej", {
get: function () {
return this.c(SeriesViewer.sm);
},
set: function (a) {
this.h(SeriesViewer.sm, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "f2", {
get: function () {
return this.c(SeriesViewer.ud);
},
set: function (a) {
this.h(SeriesViewer.ud, a);
},
enumerable: false,
configurable: true
});
SeriesViewer.prototype.pw = function (a, b) {
this.d6 = false;
var c = false;
c = false;
if (this.c9.k.al) {
return;
}
if (this.plotAreaMouseLeftButtonDown != null) {
var d = this.bh(a, b, c);
this.plotAreaMouseLeftButtonDown(this, d);
}
};
SeriesViewer.prototype.bh = function (a, b, c) {
var d = { $type: Point_$type, x: a.x, y: a.y };
var e = { $type: Point_$type, x: a.x, y: a.y };
if (!this.wz.isEmpty) {
if (c) {
e.x -= this.wz.left;
e.y -= this.wz.top;
}
else {
d.x += this.wz.left;
d.y += this.wz.top;
}
}
var f = new PlotAreaMouseButtonEventArgs(this, d, e);
f.manipulationOccurred = this.d6;
return f;
};
SeriesViewer.prototype.bl = function (a, b, c) {
var d = { $type: Point_$type, x: a.x, y: a.y };
var e = { $type: Point_$type, x: a.x, y: a.y };
if (!this.wz.isEmpty) {
if (c) {
e.x -= this.wz.left;
e.y -= this.wz.top;
}
else {
d.x += this.wz.left;
d.y += this.wz.top;
}
}
var f = new PlotAreaMouseEventArgs(this, d, e);
return f;
};
SeriesViewer.prototype.px = function (a, b, c) {
var d = false;
d = false;
if (this.c9.k.al) {
return;
}
if (this.plotAreaMouseLeftButtonUp != null) {
var e = this.bh(a, b, d);
this.plotAreaMouseLeftButtonUp(this, e);
}
if (!this.d6 && !c) {
if (this.plotAreaClicked != null) {
var f = this.bh(a, b, d);
this.plotAreaClicked(this, f);
}
}
this.d6 = false;
};
Object.defineProperty(SeriesViewer.prototype, "fj", {
get: function () {
return this.c(SeriesViewer.tl);
},
set: function (a) {
this.h(SeriesViewer.tl, a);
},
enumerable: false,
configurable: true
});
Object.defineProperty(SeriesViewer.prototype, "f7", {
get: function () {
return this.c(SeriesViewer.ug);
},
set: function (a) {
this.h(SeriesViewer.ug, a);
},