scichart 3.1.346 → 3.2.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Charting/ChartModifiers/ChartModifierBase.d.ts +15 -1
- package/Charting/ChartModifiers/ChartModifierBase.js +65 -7
- package/Charting/ChartModifiers/CursorModifier.js +13 -1
- package/Charting/ChartModifiers/LegendModifier.d.ts +1 -1
- package/Charting/ChartModifiers/LegendModifier.js +8 -6
- package/Charting/ChartModifiers/PinchZoomModifier.d.ts +38 -8
- package/Charting/ChartModifiers/PinchZoomModifier.js +103 -40
- package/Charting/ChartModifiers/RolloverModifier.js +10 -3
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +1 -1
- package/Charting/ChartModifiers/SeriesSelectionModifier.js +32 -24
- package/Charting/ChartModifiers/ZoomPanModifier.d.ts +13 -38
- package/Charting/ChartModifiers/ZoomPanModifier.js +54 -99
- package/Charting/Drawing/BaseCache.d.ts +2 -1
- package/Charting/Drawing/BaseCache.js +40 -7
- package/Charting/Drawing/RenderSurface.d.ts +1 -0
- package/Charting/Drawing/RenderSurface.js +5 -1
- package/Charting/Drawing/SolidBrushCache.d.ts +2 -1
- package/Charting/Drawing/SolidBrushCache.js +23 -3
- package/Charting/Drawing/WebGlBrush.d.ts +2 -1
- package/Charting/Drawing/WebGlBrush.js +22 -3
- package/Charting/Drawing/WebGlPen.d.ts +2 -1
- package/Charting/Drawing/WebGlPen.js +23 -4
- package/Charting/Drawing/WebGlRenderContext2D.d.ts +4 -3
- package/Charting/Drawing/WebGlRenderContext2D.js +26 -7
- package/Charting/Model/BaseDataSeries.d.ts +67 -2
- package/Charting/Model/BaseDataSeries.js +193 -42
- package/Charting/Model/BaseHeatmapDataSeries.js +1 -1
- package/Charting/Model/ChartData/SeriesInfo.d.ts +16 -0
- package/Charting/Model/ChartData/SeriesInfo.js +7 -0
- package/Charting/Model/ChartData/XyzSeriesInfo.d.ts +8 -0
- package/Charting/Model/ChartData/XyzSeriesInfo.js +36 -0
- package/Charting/Model/DoubleVectorProvider.d.ts +19 -0
- package/Charting/Model/DoubleVectorProvider.js +95 -0
- package/Charting/Model/HlcDataSeries.d.ts +3 -0
- package/Charting/Model/HlcDataSeries.js +44 -15
- package/Charting/Model/IDataSeries.d.ts +23 -0
- package/Charting/Model/NonUniformHeatmapDataSeries.js +2 -0
- package/Charting/Model/OhlcDataSeries.d.ts +3 -0
- package/Charting/Model/OhlcDataSeries.js +56 -24
- package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +4 -5
- package/Charting/Model/PointSeries/BasePointSeriesResampled.js +29 -21
- package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +2 -0
- package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -0
- package/Charting/Model/PointSeries/IPointSeries.d.ts +2 -1
- package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +1 -1
- package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +2 -1
- package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +2 -2
- package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +1 -1
- package/Charting/Model/UniformHeatmapDataSeries.d.ts +31 -11
- package/Charting/Model/UniformHeatmapDataSeries.js +72 -4
- package/Charting/Model/XyDataSeries.d.ts +0 -8
- package/Charting/Model/XyDataSeries.js +21 -5
- package/Charting/Model/XyTextDataSeries.d.ts +2 -0
- package/Charting/Model/XyTextDataSeries.js +35 -4
- package/Charting/Model/XyyDataSeries.d.ts +2 -0
- package/Charting/Model/XyyDataSeries.js +35 -10
- package/Charting/Model/XyzDataSeries.d.ts +3 -0
- package/Charting/Model/XyzDataSeries.js +36 -10
- package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +3 -5
- package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.js +5 -7
- package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +2 -1
- package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.js +29 -9
- package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +3 -5
- package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.js +5 -7
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +14 -10
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +105 -69
- package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +4 -2
- package/Charting/Numerics/Resamplers/ResamplingParams.js +12 -7
- package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.d.ts +5 -0
- package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.js +7 -0
- package/Charting/Numerics/TickProviders/NumericTickProvider.js +3 -4
- package/Charting/Numerics/TickProviders/TickProvider.d.ts +5 -0
- package/Charting/Numerics/TickProviders/TickProvider.js +7 -0
- package/Charting/Services/SciChartRenderer.js +15 -5
- package/Charting/Services/TitleRenderer.d.ts +2 -1
- package/Charting/Services/TitleRenderer.js +35 -14
- package/Charting/Visuals/Annotations/AdornerLayer.d.ts +1 -1
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -6
- package/Charting/Visuals/Annotations/AnnotationBase.js +81 -61
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +8 -0
- package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -4
- package/Charting/Visuals/Annotations/IAnnotation.js +6 -0
- package/Charting/Visuals/Annotations/LineAnnotation.js +3 -1
- package/Charting/Visuals/Annotations/RenderContextAnnotationBase.d.ts +5 -0
- package/Charting/Visuals/Annotations/RenderContextAnnotationBase.js +16 -0
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +6 -0
- package/Charting/Visuals/Annotations/constants.d.ts +1 -0
- package/Charting/Visuals/Annotations/constants.js +1 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +20 -5
- package/Charting/Visuals/Axis/AxisBase2D.js +46 -10
- package/Charting/Visuals/Axis/AxisCore.d.ts +4 -1
- package/Charting/Visuals/Axis/AxisCore.js +100 -54
- package/Charting/Visuals/Axis/AxisRenderer.d.ts +2 -1
- package/Charting/Visuals/Axis/AxisRenderer.js +40 -16
- package/Charting/Visuals/Axis/AxisTitleRenderer.d.ts +1 -0
- package/Charting/Visuals/Axis/AxisTitleRenderer.js +4 -0
- package/Charting/Visuals/Axis/CategoryAxisBase.js +4 -4
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +14 -9
- package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.d.ts +5 -0
- package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.js +7 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelCache.d.ts +2 -2
- package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +8 -1
- package/Charting/Visuals/Axis/LabelProvider/LabelProvider.d.ts +7 -1
- package/Charting/Visuals/Axis/LabelProvider/LabelProvider.js +34 -8
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +4 -2
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +8 -2
- package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +1 -0
- package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +1 -0
- package/Charting/Visuals/HeatmapLegend.d.ts +3 -2
- package/Charting/Visuals/HeatmapLegend.js +33 -12
- package/Charting/Visuals/Helpers/NativeObject.d.ts +8 -5
- package/Charting/Visuals/Helpers/NativeObject.js +42 -21
- package/Charting/Visuals/Helpers/drawLabel.js +3 -1
- package/Charting/Visuals/I2DSurfaceOptions.d.ts +0 -15
- package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +3 -1
- package/Charting/Visuals/Legend/SciChartLegendBase.js +35 -14
- package/Charting/Visuals/Legend/SciChartPieLegend.js +1 -1
- package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +13 -1
- package/Charting/Visuals/PointMarkers/BasePointMarker.js +72 -19
- package/Charting/Visuals/PointMarkers/Constants.d.ts +2 -1
- package/Charting/Visuals/PointMarkers/Constants.js +1 -0
- package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +2 -0
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +4 -1
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +8 -7
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +5 -0
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +10 -9
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +2 -1
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +101 -69
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +13 -4
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +12 -3
- package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +2 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +5 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +18 -5
- package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +0 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +8 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +35 -16
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +2 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +62 -33
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +30 -9
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +37 -16
- package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.d.ts +47 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.js +258 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +26 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +34 -15
- package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +5 -230
- package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +62 -37
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +30 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +4 -1
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +0 -2
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +0 -4
- package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +10 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +7 -0
- package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.js +9 -0
- package/Charting/Visuals/RenderableSeries/ShaderEffect.d.ts +3 -2
- package/Charting/Visuals/RenderableSeries/ShaderEffect.js +29 -9
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +7 -0
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +7 -0
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +7 -0
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +3 -0
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +0 -2
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -4
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +8 -0
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +1 -2
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +8 -3
- package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +3 -1
- package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +30 -10
- package/Charting/Visuals/SciChartDefaults.d.ts +10 -0
- package/Charting/Visuals/SciChartDefaults.js +10 -0
- package/Charting/Visuals/SciChartOverview.d.ts +2 -1
- package/Charting/Visuals/SciChartOverview.js +28 -8
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +10 -3
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +118 -60
- package/Charting/Visuals/SciChartSurface.d.ts +4 -36
- package/Charting/Visuals/SciChartSurface.js +48 -61
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +99 -13
- package/Charting/Visuals/SciChartSurfaceBase.js +155 -32
- package/Charting/Visuals/TextureManager/CanvasTexture.d.ts +2 -1
- package/Charting/Visuals/TextureManager/CanvasTexture.js +37 -17
- package/Charting/Visuals/TextureManager/TextureManager.d.ts +2 -1
- package/Charting/Visuals/TextureManager/TextureManager.js +27 -7
- package/Charting/Visuals/createMaster.d.ts +4 -2
- package/Charting/Visuals/createMaster.js +92 -28
- package/Charting/Visuals/createSingle.d.ts +0 -2
- package/Charting/Visuals/createSingle.js +44 -9
- package/Charting/Visuals/licenseManager2D.d.ts +7 -5
- package/Charting/Visuals/licenseManager2D.js +105 -53
- package/Charting/Visuals/loader.js +3 -1
- package/Charting/Visuals/sciChartInitCommon.d.ts +1 -1
- package/Charting/Visuals/sciChartInitCommon.js +5 -1
- package/Charting3D/CameraController.d.ts +1 -1
- package/Charting3D/CameraController.js +21 -7
- package/Charting3D/ChartModifiers/ChartModifierBase3D.d.ts +1 -0
- package/Charting3D/ChartModifiers/ChartModifierBase3D.js +4 -1
- package/Charting3D/ChartModifiers/OrbitModifier3D.d.ts +17 -5
- package/Charting3D/ChartModifiers/OrbitModifier3D.js +62 -26
- package/Charting3D/ChartModifiers/PinchZoomModifier3D.d.ts +81 -0
- package/Charting3D/ChartModifiers/PinchZoomModifier3D.js +164 -0
- package/Charting3D/ChartModifiers/TooltipModifier3D.d.ts +87 -0
- package/Charting3D/ChartModifiers/TooltipModifier3D.js +391 -0
- package/Charting3D/I3DSurfaceOptions.d.ts +10 -0
- package/Charting3D/I3DSurfaceOptions.js +2 -0
- package/Charting3D/Model/DataSeries/BaseDataSeries3D.d.ts +2 -1
- package/Charting3D/Model/DataSeries/BaseDataSeries3D.js +27 -6
- package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.d.ts +8 -0
- package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.js +12 -0
- package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +2 -2
- package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +1 -1
- package/Charting3D/Vector3.d.ts +5 -0
- package/Charting3D/Vector3.js +7 -0
- package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.d.ts +88 -0
- package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.js +291 -0
- package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +21 -2
- package/Charting3D/Visuals/Axis/AxisBase3D.js +48 -18
- package/Charting3D/Visuals/Axis/AxisBase3DLabelStyle.js +2 -1
- package/Charting3D/Visuals/Axis/AxisCubeEntity.d.ts +0 -4
- package/Charting3D/Visuals/Axis/AxisCubeEntity.js +3 -6
- package/Charting3D/Visuals/Axis/IAxisDescriptor.d.ts +2 -2
- package/Charting3D/Visuals/Axis/IAxisDescriptor.js +2 -2
- package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.d.ts +41 -30
- package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.js +78 -26
- package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.d.ts +47 -0
- package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.js +106 -0
- package/Charting3D/Visuals/Primitives/EntityIdProvider.d.ts +29 -0
- package/Charting3D/Visuals/Primitives/EntityIdProvider.js +28 -0
- package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.d.ts +51 -0
- package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.js +188 -0
- package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.d.ts +12 -0
- package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.js +14 -0
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +11 -0
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +18 -0
- package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.d.ts +3 -0
- package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +15 -0
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +16 -1
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +64 -12
- package/Charting3D/Visuals/RenderableSeries/Constants.d.ts +2 -0
- package/Charting3D/Visuals/RenderableSeries/Constants.js +2 -0
- package/Charting3D/Visuals/RenderableSeries/ESeriesType.d.ts +2 -1
- package/Charting3D/Visuals/RenderableSeries/ESeriesType.js +1 -0
- package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.d.ts +37 -0
- package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.js +22 -0
- package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.d.ts +64 -0
- package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.js +105 -0
- package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.d.ts +51 -0
- package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.js +32 -0
- package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.d.ts +15 -0
- package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.js +112 -0
- package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.d.ts +20 -0
- package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.js +60 -0
- package/Charting3D/Visuals/RootSceneEntity.d.ts +0 -4
- package/Charting3D/Visuals/RootSceneEntity.js +3 -8
- package/Charting3D/Visuals/SciChart3DRenderer.d.ts +2 -0
- package/Charting3D/Visuals/SciChart3DRenderer.js +49 -0
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +44 -3
- package/Charting3D/Visuals/SciChart3DSurface.js +103 -9
- package/Charting3D/Visuals/ViewportManager3DBase.d.ts +4 -0
- package/Charting3D/Visuals/ViewportManager3DBase.js +7 -1
- package/Charting3D/Visuals/createMaster3d.d.ts +1 -2
- package/Charting3D/Visuals/createMaster3d.js +76 -14
- package/Charting3D/Visuals/createSingle3d.js +34 -4
- package/Charting3D/Visuals/licenseManager3D.js +29 -25
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/DeletableEntity.d.ts +28 -0
- package/Core/DeletableEntity.js +141 -0
- package/Core/Globals.d.ts +11 -0
- package/Core/Globals.js +13 -0
- package/Core/Guard.d.ts +6 -0
- package/Core/Guard.js +10 -0
- package/Core/Mouse/MouseManager.d.ts +23 -0
- package/Core/Mouse/MouseManager.js +47 -0
- package/Core/ObservableArray.d.ts +11 -5
- package/Core/ObservableArray.js +25 -6
- package/Core/Telemetry.js +4 -6
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.data +0 -0
- package/_wasm/scichart2d.js +4 -294
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.data +0 -0
- package/_wasm/scichart3d.js +4 -294
- package/_wasm/scichart3d.wasm +0 -0
- package/index.d.ts +43 -2
- package/index.js +89 -27
- package/index.min.js +1 -1
- package/package.json +3 -4
- package/types/ChartModifierType.d.ts +2 -0
- package/types/ChartModifierType.js +2 -0
- package/types/DefaultRenderLayer.d.ts +9 -8
- package/types/DefaultRenderLayer.js +9 -8
- package/types/NumberArray.d.ts +1 -0
- package/types/NumberArray.js +12 -1
- package/types/SceneEntityType.d.ts +13 -5
- package/types/SceneEntityType.js +13 -5
- package/types/TSciChart.d.ts +37 -8
- package/types/TSciChart3D.d.ts +126 -7
- package/types/licensingClasses.d.ts +2 -1
- package/types/licensingClasses.js +1 -0
- package/utils/MemoryUsageHelper.d.ts +45 -0
- package/utils/MemoryUsageHelper.js +171 -0
- package/utils/array.d.ts +8 -0
- package/utils/array.js +58 -1
- package/utils/logger.d.ts +2 -0
- package/utils/logger.js +11 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DeletableEntity } from "../../Core/DeletableEntity";
|
|
1
2
|
import { EventHandler } from "../../Core/EventHandler";
|
|
2
3
|
import { IDeletable } from "../../Core/IDeletable";
|
|
3
4
|
import { MouseManager } from "../../Core/Mouse/MouseManager";
|
|
@@ -11,7 +12,9 @@ import { TSciChartSurfaceCanvases } from "../../types/TSciChartSurfaceCanvases";
|
|
|
11
12
|
import { IChartModifierBase } from "../ChartModifiers/ChartModifierBase";
|
|
12
13
|
import { IThemeable } from "../Themes/IThemeable";
|
|
13
14
|
import { IThemePartial, IThemeProvider } from "../Themes/IThemeProvider";
|
|
14
|
-
import {
|
|
15
|
+
import { AdornerLayer } from "./Annotations/AdornerLayer";
|
|
16
|
+
import { IAnnotation } from "./Annotations/IAnnotation";
|
|
17
|
+
import { AxisCore } from "./Axis/AxisCore";
|
|
15
18
|
import { ISciChartLoader } from "./loader";
|
|
16
19
|
import { INotifyOnDpiChanged, TDpiChangedEventArgs } from "./TextureManager/DpiHelper";
|
|
17
20
|
import { ISuspendable, IUpdateSuspender } from "./UpdateSuspender";
|
|
@@ -19,7 +22,7 @@ export declare type TSciChartDestination = {
|
|
|
19
22
|
canvasElementId: string;
|
|
20
23
|
width: number;
|
|
21
24
|
height: number;
|
|
22
|
-
sciChartSurface:
|
|
25
|
+
sciChartSurface: ISciChartSurfaceBase;
|
|
23
26
|
};
|
|
24
27
|
export declare type TSciChartConfig = {
|
|
25
28
|
wasmUrl?: string;
|
|
@@ -34,7 +37,7 @@ export interface ISurfaceOptionsBase {
|
|
|
34
37
|
*/
|
|
35
38
|
id?: string;
|
|
36
39
|
/**
|
|
37
|
-
* Optional - The theme applied to the {@link
|
|
40
|
+
* Optional - The theme applied to the {@link SciChartSurfaceBase} on startup
|
|
38
41
|
* @remarks see {@link IThemeProvider} for properties which can affect SciChart theme. Two default
|
|
39
42
|
* themes are included out of the box {@link SciChartJSLightTheme} and {@link SciChartJSDarkTheme}.
|
|
40
43
|
* Custom themes may be created by implementing {@link IThemeProvider}
|
|
@@ -50,6 +53,29 @@ export interface ISurfaceOptionsBase {
|
|
|
50
53
|
type: string;
|
|
51
54
|
options?: any;
|
|
52
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Sets a `touch-action` property to the canvas style.
|
|
58
|
+
* Useful if touch interactions in browser should be configured.
|
|
59
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action
|
|
60
|
+
*
|
|
61
|
+
* @remarks By default a chart will use `touch-action: none` to prevent the default browser behavior.
|
|
62
|
+
*/
|
|
63
|
+
touchAction?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Optional - the width aspect ratio of the {@link SciChartSurfaceBase}. By default SciChart will scale to fit the parent Div.
|
|
66
|
+
* However if height of the div is not provided it will use width/height aspect ratio to calculate the height. The default ratio is 3/2.
|
|
67
|
+
*/
|
|
68
|
+
widthAspect?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Optional - the height aspect ratio of the {@link SciChartSurfaceBase}. By default SciChart will scale to fit the parent Div.
|
|
71
|
+
* However if height of the div is not provided it will use width/height aspect ratio to calculate the height. The default ratio is 3/2.
|
|
72
|
+
*/
|
|
73
|
+
heightAspect?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Optional - the option of disabling / enabling scaling of the {@link SciChartSurfaceBase}.
|
|
76
|
+
* If false - the {@link SciChartSurfaceBase} will take the height and width of parent div without scaling.
|
|
77
|
+
*/
|
|
78
|
+
disableAspect?: boolean;
|
|
53
79
|
}
|
|
54
80
|
export declare const DebugForDpi: boolean;
|
|
55
81
|
/**
|
|
@@ -60,8 +86,13 @@ export declare const DebugForDpi: boolean;
|
|
|
60
86
|
* to use the SciChartSurface and create a 2D or 3D {@link https://www.scichart.com/javascript-chart-features | JavaScript Chart}
|
|
61
87
|
*/
|
|
62
88
|
export interface ISciChartSurfaceBase extends IDeletable, IThemeable {
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly domChartRoot: HTMLDivElement;
|
|
91
|
+
readonly domDivContainer: HTMLDivElement;
|
|
63
92
|
readonly domCanvas2D: HTMLCanvasElement;
|
|
64
93
|
readonly themeProvider: IThemeProvider;
|
|
94
|
+
readonly isDeleted: boolean;
|
|
95
|
+
readonly otherSurfaces: ISciChartSurfaceBase[];
|
|
65
96
|
/**
|
|
66
97
|
* Changes the Viewport Size of the {@link SciChartSurfaceBase}
|
|
67
98
|
* @param width
|
|
@@ -72,6 +103,8 @@ export interface ISciChartSurfaceBase extends IDeletable, IThemeable {
|
|
|
72
103
|
* Add an IDeleteable object to the surface which will have its delete method called when the surface is deleted
|
|
73
104
|
*/
|
|
74
105
|
addDeletable(deletable: IDeletable): void;
|
|
106
|
+
invalidateElement(): void;
|
|
107
|
+
delete(clearHtml?: boolean): void;
|
|
75
108
|
}
|
|
76
109
|
/**
|
|
77
110
|
* Enum constants to specify SciChartSurface type
|
|
@@ -93,7 +126,7 @@ export declare enum ESurfaceType {
|
|
|
93
126
|
* See derived types {@link SciChartSurface} (2D Charts) and {@link SciChart3DSurface} (3D Charts) for more specific instructions on how
|
|
94
127
|
* to use the SciChartSurface and create a 2D or 3D {@link https://www.scichart.com/javascript-chart-features | JavaScript Chart}
|
|
95
128
|
*/
|
|
96
|
-
export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBase, ISuspendable, INotifyOnDpiChanged {
|
|
129
|
+
export declare abstract class SciChartSurfaceBase extends DeletableEntity implements ISciChartSurfaceBase, ISuspendable, INotifyOnDpiChanged {
|
|
97
130
|
/**
|
|
98
131
|
* Gets or sets the application-wide default theme. See {@link IThemeProvider} for details
|
|
99
132
|
*/
|
|
@@ -110,11 +143,22 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
|
|
|
110
143
|
* chart parts are automatically anti-aliased
|
|
111
144
|
*/
|
|
112
145
|
static AntiAliasWebGlBackbuffer: boolean;
|
|
146
|
+
static wasmContextDisposeTimeout: number;
|
|
147
|
+
static autoDisposeWasmContext: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Deletes a {@link TSciChart | WebAssembly Context} used by the charts instantiated with wasmContext {@link SciChartSurface.create}.
|
|
150
|
+
*/
|
|
151
|
+
static disposeSharedWasmContext(): void;
|
|
113
152
|
/**
|
|
114
153
|
* Sets the runtime license key. Use for full licenses or trials only, not developer licenses.
|
|
115
154
|
* @param keyCode
|
|
116
155
|
*/
|
|
117
156
|
static setRuntimeLicenseKey(keyCode: string): void;
|
|
157
|
+
/**
|
|
158
|
+
* Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard
|
|
159
|
+
* Usage of the community license constitutes acceptace of the EULA at https://scichart.com/JSCommunityEULA
|
|
160
|
+
*/
|
|
161
|
+
static UseCommunityLicense(): void;
|
|
118
162
|
/**
|
|
119
163
|
* Sets the endpoint for validating a runtime license key with the server. Must be a relative path.
|
|
120
164
|
* @default api/license
|
|
@@ -144,36 +188,63 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
|
|
|
144
188
|
/**
|
|
145
189
|
* The {@link HTMLDivElement} which is the dom chart root
|
|
146
190
|
*/
|
|
147
|
-
|
|
191
|
+
domChartRoot: HTMLDivElement;
|
|
148
192
|
/**
|
|
149
193
|
* The {@link HTMLCanvasElement} which is the WebGL canvas that SciChart draws to
|
|
150
194
|
*/
|
|
151
|
-
|
|
195
|
+
domCanvasWebGL: HTMLCanvasElement;
|
|
152
196
|
/**
|
|
153
197
|
* The {@link HTMLCanvasElement} which is the HTML5 canvas which SciChart draws overlays (cursors, tooltips) to
|
|
154
198
|
*/
|
|
155
|
-
|
|
199
|
+
domCanvas2D: HTMLCanvasElement;
|
|
156
200
|
/**
|
|
157
201
|
* The {@link SVGSVGElement} which is the SVG canvas which SciChart adds elements (tooltips, annotations) to
|
|
158
202
|
*/
|
|
159
|
-
|
|
203
|
+
domSvgContainer: SVGSVGElement;
|
|
160
204
|
/**
|
|
161
205
|
* The {@link SVGSVGElement} which is the SVG adorner layer canvas, is used for annotation adorners
|
|
162
206
|
*/
|
|
163
|
-
|
|
207
|
+
domSvgAdornerLayer: SVGSVGElement;
|
|
164
208
|
/**
|
|
165
209
|
* The inner {@link HTMLDivElement} div element
|
|
166
210
|
*/
|
|
167
|
-
|
|
211
|
+
domDivContainer: HTMLDivElement;
|
|
168
212
|
/**
|
|
169
213
|
* The {@link MouseManager} subscribes to mouse events on the {@link domChartRoot} and routes them to components within SciChart
|
|
170
214
|
*/
|
|
171
|
-
|
|
215
|
+
mouseManager: MouseManager;
|
|
172
216
|
/**
|
|
173
217
|
* The {@link IThemeProvider} provides colors, brushes and theme information for the current {@link SciChartSurfaceBase}
|
|
174
218
|
*/
|
|
175
219
|
/** For serialization Only. The name of the onCreated function applied by the builder api */
|
|
176
220
|
onCreatedName: string;
|
|
221
|
+
/**
|
|
222
|
+
* @summary Gets the collection of {@link IAnnotation} - annotations, markers or shapes drawn over the top of a {@link SciChartSurface}
|
|
223
|
+
* @description A {@link SciChartSurface} can have zero to many {@link IAnnotation | Annotations}.
|
|
224
|
+
*
|
|
225
|
+
* The Annotations are drawn using our WebGL / WebAssembly rendering engine, but some use SVG for maximum configurability.
|
|
226
|
+
* See derived types of {@link IAnnotation} such as {@link BoxAnnotation}, {@link LineAnnotation} etc...
|
|
227
|
+
*
|
|
228
|
+
* Use this collection to add and remove Annotations to the chart.
|
|
229
|
+
* @remarks
|
|
230
|
+
* Adding an Annotation to the chart causes it to automatically redraw. Note that annotations do not pariticpate in autoranging,
|
|
231
|
+
* meaning a chart will zoom to fit data and chart series but not annotations
|
|
232
|
+
*/
|
|
233
|
+
readonly annotations: ObservableArray<IAnnotation>;
|
|
234
|
+
/**
|
|
235
|
+
* @summary Gets the collection of {@link IAnnotation} - modifier annotations, markers or shapes drawn over the top of a {@link SciChartSurface}
|
|
236
|
+
* @description A {@link SciChartSurface} can have zero to many {@link IAnnotation | Annotations}.
|
|
237
|
+
*
|
|
238
|
+
* The Annotations are drawn using our WebGL / WebAssembly rendering engine, but some use SVG for maximum configurability.
|
|
239
|
+
* See derived types of {@link IAnnotation} such as {@link BoxAnnotation}, {@link LineAnnotation} etc...
|
|
240
|
+
*
|
|
241
|
+
* Use this collection to add and remove Modifier Annotations to the chart.
|
|
242
|
+
* @remarks
|
|
243
|
+
* Adding an Modifier Annotation to the chart causes it to automatically redraw. Note that annotations do not pariticpate in autoranging,
|
|
244
|
+
* meaning a chart will zoom to fit data and chart series but not annotations
|
|
245
|
+
*/
|
|
246
|
+
readonly modifierAnnotations: ObservableArray<IAnnotation>;
|
|
247
|
+
adornerLayer: AdornerLayer;
|
|
177
248
|
protected destinations: TSciChartDestination[];
|
|
178
249
|
protected themeProviderProperty: IThemeProvider;
|
|
179
250
|
protected previousThemeProviderProperty: IThemeProvider;
|
|
@@ -181,11 +252,12 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
|
|
|
181
252
|
protected isDeletedProperty: boolean;
|
|
182
253
|
protected backgroundProperty: string;
|
|
183
254
|
protected idProperty: string;
|
|
255
|
+
protected touchActionProperty: string;
|
|
184
256
|
protected widthAspect: number;
|
|
185
257
|
protected heightAspect: number;
|
|
186
258
|
protected disableAspect: boolean;
|
|
187
259
|
protected loaderJson: any;
|
|
188
|
-
private
|
|
260
|
+
private sharedWasmContext;
|
|
189
261
|
private readonly suspendableIdProperty;
|
|
190
262
|
private seriesViewRectProperty;
|
|
191
263
|
private isAlphaEnabledProperty;
|
|
@@ -286,6 +358,16 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
|
|
|
286
358
|
* @param seriesViewRect a {@link Rect} which defines the portion of the view for drawing series
|
|
287
359
|
*/
|
|
288
360
|
setSeriesViewRect(seriesViewRect: Rect): void;
|
|
361
|
+
/**
|
|
362
|
+
* Gets the {@link AxisCore | XAxis} which matches the axisId. Returns undefined if not axis found
|
|
363
|
+
* @param axisId The AxisId to search for
|
|
364
|
+
*/
|
|
365
|
+
abstract getXAxisById(axisId: string): AxisCore;
|
|
366
|
+
/**
|
|
367
|
+
* Gets the {@link AxisCore | YAxis} which matches the axisId. Returns undefined if not axis found
|
|
368
|
+
* @param axisId The AxisId to search for
|
|
369
|
+
*/
|
|
370
|
+
abstract getYAxisById(axisId: string): AxisCore;
|
|
289
371
|
/**
|
|
290
372
|
* Changes the Viewport Size of the {@link SciChartSurfaceBase}
|
|
291
373
|
* @param width
|
|
@@ -309,7 +391,8 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
|
|
|
309
391
|
*/
|
|
310
392
|
onDpiChanged(args: TDpiChangedEventArgs): void;
|
|
311
393
|
get chartModifierGroups(): string[];
|
|
312
|
-
protected
|
|
394
|
+
protected clearRootElement(clearHtml: boolean): void;
|
|
395
|
+
protected applyOptions(options: ISurfaceOptionsBase): void;
|
|
313
396
|
/**
|
|
314
397
|
* Detaches a {@link ChartModifierBase2D} from the {@link SciChartSurfaceBase}
|
|
315
398
|
* @param chartModifier
|
|
@@ -339,6 +422,8 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
|
|
|
339
422
|
protected abstract applySciChartBackground(htmlColor: string, alphaEnabled?: boolean): void;
|
|
340
423
|
protected changeMasterCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void;
|
|
341
424
|
protected changeWebGLCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void;
|
|
425
|
+
private detachAnnotation;
|
|
426
|
+
private attachAnnotation;
|
|
342
427
|
}
|
|
343
428
|
export declare const createChartDestination: (canvas: HTMLCanvasElement) => {
|
|
344
429
|
canvas: HTMLCanvasElement;
|
|
@@ -346,6 +431,7 @@ export declare const createChartDestination: (canvas: HTMLCanvasElement) => {
|
|
|
346
431
|
GetWidth(): any;
|
|
347
432
|
GetID(): any;
|
|
348
433
|
};
|
|
434
|
+
/** @ignore */
|
|
349
435
|
export declare const getMasterCanvas: () => HTMLCanvasElement;
|
|
350
436
|
export declare type TGetDestinationFn = (destinationId: string) => TSciChartDestination;
|
|
351
437
|
export declare const copyToCanvas: (sourceCanvas: HTMLCanvasElement, getDestinationById: TGetDestinationFn) => (destinationId: string) => void;
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.getLocateFile = exports.copyToCanvas = exports.getMasterCanvas = exports.createChartDestination = exports.SciChartSurfaceBase = exports.ESurfaceType = exports.DebugForDpi = void 0;
|
|
4
19
|
var classFactory_1 = require("../../Builder/classFactory");
|
|
5
20
|
var licenseManager2D_1 = require("../../Charting/Visuals/licenseManager2D");
|
|
21
|
+
var DeletableEntity_1 = require("../../Core/DeletableEntity");
|
|
6
22
|
var Deleter_1 = require("../../Core/Deleter");
|
|
7
23
|
var EventHandler_1 = require("../../Core/EventHandler");
|
|
24
|
+
var Globals_1 = require("../../Core/Globals");
|
|
8
25
|
var Guard_1 = require("../../Core/Guard");
|
|
9
26
|
var MouseManager_1 = require("../../Core/Mouse/MouseManager");
|
|
10
27
|
var ObservableArray_1 = require("../../Core/ObservableArray");
|
|
@@ -13,6 +30,7 @@ var WebGlHelper_1 = require("../../Core/WebGlHelper");
|
|
|
13
30
|
var BaseType_1 = require("../../types/BaseType");
|
|
14
31
|
var array_1 = require("../../utils/array");
|
|
15
32
|
var guid_1 = require("../../utils/guid");
|
|
33
|
+
var MemoryUsageHelper_1 = require("../../utils/MemoryUsageHelper");
|
|
16
34
|
var ChartModifierBase_1 = require("../ChartModifiers/ChartModifierBase");
|
|
17
35
|
var SciChartJSDarkv2Theme_1 = require("../Themes/SciChartJSDarkv2Theme");
|
|
18
36
|
var DpiHelper_1 = require("./TextureManager/DpiHelper");
|
|
@@ -39,7 +57,8 @@ var ESurfaceType;
|
|
|
39
57
|
* See derived types {@link SciChartSurface} (2D Charts) and {@link SciChart3DSurface} (3D Charts) for more specific instructions on how
|
|
40
58
|
* to use the SciChartSurface and create a 2D or 3D {@link https://www.scichart.com/javascript-chart-features | JavaScript Chart}
|
|
41
59
|
*/
|
|
42
|
-
var SciChartSurfaceBase = /** @class */ (function () {
|
|
60
|
+
var SciChartSurfaceBase = /** @class */ (function (_super) {
|
|
61
|
+
__extends(SciChartSurfaceBase, _super);
|
|
43
62
|
/**
|
|
44
63
|
* Creates an instance of a SciChartSurfaceBase
|
|
45
64
|
* @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context}
|
|
@@ -48,48 +67,96 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
48
67
|
*/
|
|
49
68
|
function SciChartSurfaceBase(webAssemblyContext, canvases) {
|
|
50
69
|
if (canvases === void 0) { canvases = {}; }
|
|
51
|
-
var _this = this;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
70
|
+
var _this = _super.call(this) || this;
|
|
71
|
+
_this.themeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
|
|
72
|
+
_this.previousThemeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
|
|
73
|
+
_this.isInitializedProperty = false;
|
|
74
|
+
_this.isDeletedProperty = false;
|
|
75
|
+
_this.backgroundProperty = SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground;
|
|
76
|
+
_this.idProperty = (0, guid_1.generateGuid)();
|
|
77
|
+
_this.suspendableIdProperty = (0, guid_1.generateGuid)();
|
|
78
|
+
_this.isAlphaEnabledProperty = true;
|
|
79
|
+
_this.deletables = [];
|
|
61
80
|
Guard_1.Guard.notNull(webAssemblyContext, "webAssemblyContext");
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
_this.domChartRoot = canvases.domChartRoot;
|
|
82
|
+
_this.domCanvasWebGL = canvases.domCanvasWebGL;
|
|
83
|
+
_this.domCanvas2D = canvases.domCanvas2D;
|
|
84
|
+
_this.domSvgContainer = canvases.domSvgContainer;
|
|
85
|
+
_this.domSvgAdornerLayer = canvases.domSvgAdornerLayer;
|
|
86
|
+
_this.domDivContainer = canvases.domDivContainer;
|
|
87
|
+
_this.sharedWasmContext = webAssemblyContext;
|
|
88
|
+
_this.propertyChanged = new EventHandler_1.EventHandler();
|
|
70
89
|
// Flag which ensures Typescript side drives emscripten rendering (one render per draw request)
|
|
71
90
|
webAssemblyContext.TSRSetDrawRequestsEnabled(true);
|
|
72
91
|
// Setup chart modifiers
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
92
|
+
_this.detachChartModifier = _this.detachChartModifier.bind(_this);
|
|
93
|
+
_this.attachChartModifier = _this.attachChartModifier.bind(_this);
|
|
94
|
+
_this.chartModifiers = new ObservableArray_1.ObservableArray();
|
|
95
|
+
_this.chartModifiers.collectionChanged.subscribe(function (arg) {
|
|
77
96
|
var _a, _b;
|
|
78
97
|
(_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (cm) { return _this.detachChartModifier(cm); });
|
|
79
98
|
(_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (cm) { return _this.attachChartModifier(cm); });
|
|
80
99
|
});
|
|
100
|
+
// Setup annotations
|
|
101
|
+
_this.detachAnnotation = _this.detachAnnotation.bind(_this);
|
|
102
|
+
_this.attachAnnotation = _this.attachAnnotation.bind(_this);
|
|
103
|
+
_this.annotations = new ObservableArray_1.ObservableArray();
|
|
104
|
+
_this.modifierAnnotations = new ObservableArray_1.ObservableArray();
|
|
105
|
+
_this.annotations.collectionChanged.subscribe(function (arg) {
|
|
106
|
+
var _a, _b;
|
|
107
|
+
(_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (a) { return _this.detachAnnotation(a); });
|
|
108
|
+
(_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (a) { return _this.attachAnnotation(a); });
|
|
109
|
+
});
|
|
110
|
+
_this.modifierAnnotations.collectionChanged.subscribe(function (arg) {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
(_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (a) { return _this.detachAnnotation(a); });
|
|
113
|
+
(_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (a) { return _this.attachAnnotation(a); });
|
|
114
|
+
});
|
|
81
115
|
// Setup mouse manager
|
|
82
|
-
|
|
116
|
+
_this.mouseManager = new MouseManager_1.MouseManager(_this);
|
|
83
117
|
if (canvases.domCanvasWebGL) {
|
|
84
|
-
|
|
118
|
+
_this.mouseManager.subscribe(canvases.domCanvasWebGL);
|
|
85
119
|
}
|
|
86
120
|
else if (canvases.domCanvas2D) {
|
|
87
|
-
|
|
121
|
+
_this.mouseManager.subscribe(canvases.domCanvas2D);
|
|
88
122
|
}
|
|
89
123
|
// Setup Dpi change listeners
|
|
90
|
-
|
|
91
|
-
DpiHelper_1.DpiHelper.dpiChanged.subscribe(
|
|
124
|
+
_this.onDpiChanged = _this.onDpiChanged.bind(_this);
|
|
125
|
+
DpiHelper_1.DpiHelper.dpiChanged.subscribe(_this.onDpiChanged);
|
|
126
|
+
if (process.env.NODE_ENV !== "production") {
|
|
127
|
+
if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
|
|
128
|
+
var rootContainer = document.body;
|
|
129
|
+
var observer_1 = new MutationObserver(function () {
|
|
130
|
+
var isInDom = _this.domChartRoot.isConnected;
|
|
131
|
+
if (!isInDom && !_this.isDeleted) {
|
|
132
|
+
console.warn("The chart root element \"".concat(_this.domChartRoot.id, "\" was detached before the surface ").concat(_this.id, " was properly disposed! Make sure to call \"delete\" method on the surface when it is not longer needed."));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
observer_1.observe(rootContainer, { childList: true, subtree: true });
|
|
136
|
+
_this.addDeletable({
|
|
137
|
+
delete: function () { return observer_1.disconnect(); }
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return _this;
|
|
92
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Deletes a {@link TSciChart | WebAssembly Context} used by the charts instantiated with wasmContext {@link SciChartSurface.create}.
|
|
145
|
+
*/
|
|
146
|
+
SciChartSurfaceBase.disposeSharedWasmContext = function () {
|
|
147
|
+
if (Globals_1.sciChart3DDestinations.length === 0 && Globals_1.sciChartDestinations.length === 0) {
|
|
148
|
+
document.body.removeChild(SciChartSurfaceBase.domMasterCanvas);
|
|
149
|
+
SciChartSurfaceBase.domMasterCanvas = undefined;
|
|
150
|
+
}
|
|
151
|
+
if (process.env.NODE_ENV !== "production") {
|
|
152
|
+
if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
|
|
153
|
+
// @ts-ignore
|
|
154
|
+
window.gc && window.gc();
|
|
155
|
+
// TODO add warning if there are undeleted or uncollected entities instead
|
|
156
|
+
// MemoryUsageHelper.objectRegistry.log();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
93
160
|
/**
|
|
94
161
|
* Sets the runtime license key. Use for full licenses or trials only, not developer licenses.
|
|
95
162
|
* @param keyCode
|
|
@@ -97,6 +164,13 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
97
164
|
SciChartSurfaceBase.setRuntimeLicenseKey = function (keyCode) {
|
|
98
165
|
licenseManager2D_1.licenseManager.setRuntimeLicenseKey(keyCode);
|
|
99
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard
|
|
169
|
+
* Usage of the community license constitutes acceptace of the EULA at https://scichart.com/JSCommunityEULA
|
|
170
|
+
*/
|
|
171
|
+
SciChartSurfaceBase.UseCommunityLicense = function () {
|
|
172
|
+
licenseManager2D_1.licenseManager.setRuntimeLicenseKey("community");
|
|
173
|
+
};
|
|
100
174
|
/**
|
|
101
175
|
* Sets the endpoint for validating a runtime license key with the server. Must be a relative path.
|
|
102
176
|
* @default api/license
|
|
@@ -309,16 +383,29 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
309
383
|
var _a;
|
|
310
384
|
if (clearHtml === void 0) { clearHtml = true; }
|
|
311
385
|
this.isDeletedProperty = true;
|
|
312
|
-
|
|
386
|
+
// TODO probably this should be moved outside for Proxy === this comparison issue exists
|
|
387
|
+
var currentSurfaceIndex = (_a = this.destinations) === null || _a === void 0 ? void 0 : _a.findIndex(function (dest) { return dest.sciChartSurface.id === _this.id; });
|
|
313
388
|
if (currentSurfaceIndex >= 0) {
|
|
314
389
|
this.destinations.splice(currentSurfaceIndex, 1);
|
|
315
390
|
}
|
|
316
391
|
DpiHelper_1.DpiHelper.dpiChanged.unsubscribe(this.onDpiChanged);
|
|
317
392
|
this.mouseManager.unsubscribe();
|
|
393
|
+
this.mouseManager = undefined;
|
|
394
|
+
this.chartModifiers.asArray().forEach(function (chm) { return chm.delete(); });
|
|
395
|
+
this.modifierAnnotations.asArray().forEach(function (annotation) { return annotation.delete(); });
|
|
396
|
+
this.annotations.asArray().forEach(function (annotation) { return annotation.delete(); });
|
|
397
|
+
this.adornerLayer = undefined;
|
|
318
398
|
for (var _i = 0, _b = this.deletables; _i < _b.length; _i++) {
|
|
319
399
|
var deletable = _b[_i];
|
|
320
400
|
(0, Deleter_1.deleteSafe)(deletable);
|
|
321
401
|
}
|
|
402
|
+
this.domChartRoot = undefined;
|
|
403
|
+
this.domCanvasWebGL = undefined;
|
|
404
|
+
this.domCanvas2D = undefined;
|
|
405
|
+
this.domSvgContainer = undefined;
|
|
406
|
+
this.domSvgAdornerLayer = undefined;
|
|
407
|
+
this.domDivContainer = undefined;
|
|
408
|
+
this.sharedWasmContext = undefined;
|
|
322
409
|
this.deletables = [];
|
|
323
410
|
};
|
|
324
411
|
SciChartSurfaceBase.prototype.addDeletable = function (deletable) {
|
|
@@ -350,6 +437,8 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
350
437
|
* @inheritDoc
|
|
351
438
|
*/
|
|
352
439
|
SciChartSurfaceBase.prototype.onDpiChanged = function (args) {
|
|
440
|
+
this.annotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
|
|
441
|
+
this.modifierAnnotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
|
|
353
442
|
this.invalidateElement();
|
|
354
443
|
};
|
|
355
444
|
Object.defineProperty(SciChartSurfaceBase.prototype, "chartModifierGroups", {
|
|
@@ -363,6 +452,22 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
363
452
|
enumerable: false,
|
|
364
453
|
configurable: true
|
|
365
454
|
});
|
|
455
|
+
SciChartSurfaceBase.prototype.clearRootElement = function (clearHtml) {
|
|
456
|
+
if (clearHtml && this.domChartRoot) {
|
|
457
|
+
var style = this.domChartRoot.style;
|
|
458
|
+
if (style) {
|
|
459
|
+
style.background = "";
|
|
460
|
+
style.position = "";
|
|
461
|
+
}
|
|
462
|
+
if (this.domChartRoot.hasOwnProperty("replaceChildren")) {
|
|
463
|
+
// @ts-ignore
|
|
464
|
+
this.domChartRoot.replaceChildren();
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
this.domChartRoot.innerHTML = "";
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
};
|
|
366
471
|
SciChartSurfaceBase.prototype.applyOptions = function (options) {
|
|
367
472
|
var _a;
|
|
368
473
|
this.idProperty = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : this.idProperty;
|
|
@@ -429,7 +534,7 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
429
534
|
DpiHelper_1.DpiHelper.setSize(SciChartSurfaceBase.domMasterCanvas, newWidth, newHeight);
|
|
430
535
|
var masterCanvasBackBufferWidth = SciChartSurfaceBase.domMasterCanvas.width;
|
|
431
536
|
var masterCanvasBackBufferHeight = SciChartSurfaceBase.domMasterCanvas.height;
|
|
432
|
-
wasmContext.
|
|
537
|
+
wasmContext.SCRTSetMainWindowSize(masterCanvasBackBufferWidth, masterCanvasBackBufferHeight);
|
|
433
538
|
};
|
|
434
539
|
SciChartSurfaceBase.prototype.changeWebGLCanvasViewportSize = function (wasmContext, pixelWidth, pixelHeight) {
|
|
435
540
|
if (!this.domCanvasWebGL)
|
|
@@ -437,7 +542,22 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
437
542
|
var backBufferWidth = pixelWidth * DpiHelper_1.DpiHelper.PIXEL_RATIO;
|
|
438
543
|
var backBufferHeight = pixelHeight * DpiHelper_1.DpiHelper.PIXEL_RATIO;
|
|
439
544
|
DpiHelper_1.DpiHelper.setSize(this.domCanvasWebGL, pixelWidth, pixelHeight);
|
|
440
|
-
wasmContext.
|
|
545
|
+
wasmContext.SCRTSetMainWindowSize(backBufferWidth, backBufferHeight);
|
|
546
|
+
};
|
|
547
|
+
SciChartSurfaceBase.prototype.detachAnnotation = function (annotation) {
|
|
548
|
+
annotation.onDetach();
|
|
549
|
+
annotation.invalidateParentCallback = undefined;
|
|
550
|
+
annotation.parentSurface = undefined;
|
|
551
|
+
this.invalidateElement();
|
|
552
|
+
};
|
|
553
|
+
SciChartSurfaceBase.prototype.attachAnnotation = function (annotation) {
|
|
554
|
+
if (annotation.invalidateParentCallback) {
|
|
555
|
+
throw new Error("Invalid operation in sciChartSurface.attachAnnotation, this annotation has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");
|
|
556
|
+
}
|
|
557
|
+
annotation.parentSurface = this;
|
|
558
|
+
annotation.invalidateParentCallback = this.invalidateElement;
|
|
559
|
+
annotation.onAttach(this);
|
|
560
|
+
this.invalidateElement();
|
|
441
561
|
};
|
|
442
562
|
/**
|
|
443
563
|
* Gets or sets the application-wide default theme. See {@link IThemeProvider} for details
|
|
@@ -450,8 +570,10 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
450
570
|
* chart parts are automatically anti-aliased
|
|
451
571
|
*/
|
|
452
572
|
SciChartSurfaceBase.AntiAliasWebGlBackbuffer = false;
|
|
573
|
+
SciChartSurfaceBase.wasmContextDisposeTimeout = 0;
|
|
574
|
+
SciChartSurfaceBase.autoDisposeWasmContext = false;
|
|
453
575
|
return SciChartSurfaceBase;
|
|
454
|
-
}());
|
|
576
|
+
}(DeletableEntity_1.DeletableEntity));
|
|
455
577
|
exports.SciChartSurfaceBase = SciChartSurfaceBase;
|
|
456
578
|
var createChartDestination = function (canvas) {
|
|
457
579
|
if (!canvas)
|
|
@@ -470,6 +592,7 @@ var createChartDestination = function (canvas) {
|
|
|
470
592
|
};
|
|
471
593
|
};
|
|
472
594
|
exports.createChartDestination = createChartDestination;
|
|
595
|
+
/** @ignore */
|
|
473
596
|
var getMasterCanvas = function () {
|
|
474
597
|
/** @ignore */
|
|
475
598
|
var SCICHART_MASTER_CANVAS_ID = "SciChartMasterCanvas";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IDeletable } from "../../../Core/IDeletable";
|
|
2
2
|
import { TSciChart, TSRTexture } from "../../../types/TSciChart";
|
|
3
3
|
import { TSciChart3D } from "../../../types/TSciChart3D";
|
|
4
|
+
import { DeletableEntity } from "../../../Core/DeletableEntity";
|
|
4
5
|
/**
|
|
5
6
|
* @summary The {@link CanvasTexture} is used internally to map an {@link HTMLCanvasElement} to a WebGL Texture.
|
|
6
7
|
* Use this when you want to create a WebGL texture and draw on it.
|
|
@@ -24,7 +25,7 @@ import { TSciChart3D } from "../../../types/TSciChart3D";
|
|
|
24
25
|
* canvasTexture.delete();
|
|
25
26
|
* ```
|
|
26
27
|
*/
|
|
27
|
-
export declare class CanvasTexture implements IDeletable {
|
|
28
|
+
export declare class CanvasTexture extends DeletableEntity implements IDeletable {
|
|
28
29
|
readonly width: number;
|
|
29
30
|
readonly height: number;
|
|
30
31
|
canvas: HTMLCanvasElement;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.CanvasTexture = void 0;
|
|
4
19
|
var app_1 = require("../../../constants/app");
|
|
@@ -6,6 +21,7 @@ var Deleter_1 = require("../../../Core/Deleter");
|
|
|
6
21
|
var colorUtil_1 = require("../../../utils/colorUtil");
|
|
7
22
|
var TextureCache_1 = require("../../Drawing/TextureCache");
|
|
8
23
|
var Guard_1 = require("../../../Core/Guard");
|
|
24
|
+
var DeletableEntity_1 = require("../../../Core/DeletableEntity");
|
|
9
25
|
/**
|
|
10
26
|
* @summary The {@link CanvasTexture} is used internally to map an {@link HTMLCanvasElement} to a WebGL Texture.
|
|
11
27
|
* Use this when you want to create a WebGL texture and draw on it.
|
|
@@ -29,7 +45,8 @@ var Guard_1 = require("../../../Core/Guard");
|
|
|
29
45
|
* canvasTexture.delete();
|
|
30
46
|
* ```
|
|
31
47
|
*/
|
|
32
|
-
var CanvasTexture = /** @class */ (function () {
|
|
48
|
+
var CanvasTexture = /** @class */ (function (_super) {
|
|
49
|
+
__extends(CanvasTexture, _super);
|
|
33
50
|
/**
|
|
34
51
|
* Creates an instance of a {@link CanvasTexture}
|
|
35
52
|
* @remarks
|
|
@@ -41,28 +58,30 @@ var CanvasTexture = /** @class */ (function () {
|
|
|
41
58
|
* @param useInterpolation The flat determines whether to useInterpolation when creating texture
|
|
42
59
|
*/
|
|
43
60
|
function CanvasTexture(webAssemblyContext, textureWidth, textureHeight) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Guard_1.Guard.isTrue(
|
|
61
|
+
var _this = _super.call(this) || this;
|
|
62
|
+
_this.width = Math.floor(textureWidth);
|
|
63
|
+
_this.height = Math.floor(textureHeight);
|
|
64
|
+
Guard_1.Guard.isTrue(_this.width > 0, "CanvasTexture.width must be greater than zero");
|
|
65
|
+
Guard_1.Guard.isTrue(_this.height > 0, "CanvasTexture.height must be greater than zero");
|
|
48
66
|
if (!app_1.IS_TEST_ENV) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
67
|
+
_this.canvas = document.createElement("canvas");
|
|
68
|
+
_this.canvas.width = _this.width;
|
|
69
|
+
_this.canvas.height = _this.height;
|
|
52
70
|
// Uncomment to see the texture on the screen
|
|
53
71
|
// document.body.appendChild(this.canvas);
|
|
54
72
|
}
|
|
55
|
-
|
|
73
|
+
_this.wasmContext = webAssemblyContext;
|
|
56
74
|
// Create UIntVector with size once
|
|
57
|
-
|
|
58
|
-
|
|
75
|
+
_this.intermediateVector = new _this.wasmContext.UIntVector();
|
|
76
|
+
_this.intermediateVector.resize(_this.height * _this.width, 0);
|
|
59
77
|
// Create UIntVector that will store initial color values
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var textureFormat =
|
|
78
|
+
_this.originalIntermediateVector = new _this.wasmContext.UIntVector();
|
|
79
|
+
_this.originalIntermediateVector.resize(_this.height * _this.width, 0);
|
|
80
|
+
var textureFormat = _this.wasmContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8;
|
|
63
81
|
// Create TSRTexture with size once
|
|
64
|
-
|
|
65
|
-
|
|
82
|
+
_this.tsrTextureCache = new TextureCache_1.TextureCache(webAssemblyContext);
|
|
83
|
+
_this.tsrTextureCache.create(_this.width, _this.height, textureFormat);
|
|
84
|
+
return _this;
|
|
66
85
|
}
|
|
67
86
|
/**
|
|
68
87
|
* Get an HTML5 {@link CanvasRenderingContext2D} to draw on.
|
|
@@ -93,6 +112,7 @@ var CanvasTexture = /** @class */ (function () {
|
|
|
93
112
|
this.intermediateVector = (0, Deleter_1.deleteSafe)(this.intermediateVector);
|
|
94
113
|
this.originalIntermediateVector = (0, Deleter_1.deleteSafe)(this.originalIntermediateVector);
|
|
95
114
|
this.tsrTextureCache = (0, Deleter_1.deleteSafe)(this.tsrTextureCache);
|
|
115
|
+
this.wasmContext = undefined;
|
|
96
116
|
};
|
|
97
117
|
/**
|
|
98
118
|
* After you have finished drawing, copy the canvas to the destination {@link TSRTexture}
|
|
@@ -139,5 +159,5 @@ var CanvasTexture = /** @class */ (function () {
|
|
|
139
159
|
this.wasmContext.SCRTFillTextureAbgr(tsrTexture, this.width, this.height, this.intermediateVector);
|
|
140
160
|
};
|
|
141
161
|
return CanvasTexture;
|
|
142
|
-
}());
|
|
162
|
+
}(DeletableEntity_1.DeletableEntity));
|
|
143
163
|
exports.CanvasTexture = CanvasTexture;
|