scichart 3.1.348 → 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/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 { IDeletable } from "../../../Core/IDeletable";
|
|
2
3
|
import { EAxisAlignment } from "../../../types/AxisAlignment";
|
|
3
4
|
import { TSciChart, TSRTexture } from "../../../types/TSciChart";
|
|
@@ -8,7 +9,7 @@ export declare type TTextureObject = {
|
|
|
8
9
|
textureWidth: number;
|
|
9
10
|
textureHeight: number;
|
|
10
11
|
};
|
|
11
|
-
export declare class TextureManager implements IDeletable {
|
|
12
|
+
export declare class TextureManager extends DeletableEntity implements IDeletable {
|
|
12
13
|
private webAssemblyContext;
|
|
13
14
|
private canvas;
|
|
14
15
|
private ctx;
|
|
@@ -1,7 +1,23 @@
|
|
|
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.measureTextWidth = exports.measureTextHeight = exports.TextureManager = void 0;
|
|
4
19
|
var app_1 = require("../../../constants/app");
|
|
20
|
+
var DeletableEntity_1 = require("../../../Core/DeletableEntity");
|
|
5
21
|
var AxisAlignment_1 = require("../../../types/AxisAlignment");
|
|
6
22
|
var LabelAlignment_1 = require("../../../types/LabelAlignment");
|
|
7
23
|
var font_1 = require("../../../utils/font");
|
|
@@ -16,15 +32,18 @@ var DEFAULT_WIDTH = 1920;
|
|
|
16
32
|
var PT_TO_PX = 96 / 72;
|
|
17
33
|
/** @ignore */
|
|
18
34
|
var PX_TO_PT = 72 / 96;
|
|
19
|
-
var TextureManager = /** @class */ (function () {
|
|
35
|
+
var TextureManager = /** @class */ (function (_super) {
|
|
36
|
+
__extends(TextureManager, _super);
|
|
20
37
|
function TextureManager(webAssemblyContext) {
|
|
21
|
-
|
|
38
|
+
var _this = _super.call(this) || this;
|
|
39
|
+
_this.webAssemblyContext = webAssemblyContext;
|
|
22
40
|
if (!app_1.IS_TEST_ENV) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
41
|
+
_this.canvas = document.createElement("canvas");
|
|
42
|
+
_this.canvas.width = DEFAULT_WIDTH;
|
|
43
|
+
_this.canvas.height = DEFAULT_HEIGHT;
|
|
44
|
+
_this.ctx = _this.canvas.getContext("2d", { willReadFrequently: true });
|
|
27
45
|
}
|
|
46
|
+
return _this;
|
|
28
47
|
}
|
|
29
48
|
TextureManager.prototype.createSimpleTextTexture = function (text, textStyle, backgroundColor, displayVertically, displayMirrored, opacity) {
|
|
30
49
|
var rotation = 0;
|
|
@@ -268,6 +287,7 @@ var TextureManager = /** @class */ (function () {
|
|
|
268
287
|
TextureManager.prototype.delete = function () {
|
|
269
288
|
this.canvas = undefined;
|
|
270
289
|
this.ctx = undefined;
|
|
290
|
+
this.webAssemblyContext = undefined;
|
|
271
291
|
};
|
|
272
292
|
TextureManager.prototype.createTextureFromCtx = function (textureWidth, textureHeight) {
|
|
273
293
|
// TODO: Michael cache the canvas, UIntVector, bitmapTexture unless size changed
|
|
@@ -307,7 +327,7 @@ var TextureManager = /** @class */ (function () {
|
|
|
307
327
|
};
|
|
308
328
|
};
|
|
309
329
|
return TextureManager;
|
|
310
|
-
}());
|
|
330
|
+
}(DeletableEntity_1.DeletableEntity));
|
|
311
331
|
exports.TextureManager = TextureManager;
|
|
312
332
|
var measureTextHeight = function (fontSizePx) { return fontSizePx; };
|
|
313
333
|
exports.measureTextHeight = measureTextHeight;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { TSciChart } from "../../types/TSciChart";
|
|
1
2
|
import { I2DSurfaceOptions } from "./I2DSurfaceOptions";
|
|
2
3
|
import { TWebAssemblyChart } from "./SciChartSurface";
|
|
3
|
-
import { TSciChartDestination } from "./SciChartSurfaceBase";
|
|
4
4
|
/** @ignore */
|
|
5
5
|
export declare const createMultichart: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
|
|
6
6
|
/** @ignore */
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const disposeMultiChart: () => void;
|
|
8
|
+
/** @ignore */
|
|
9
|
+
export declare const monitorWebGL: (wasmContext: TSciChart) => void;
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.monitorWebGL = exports.disposeMultiChart = exports.createMultichart = void 0;
|
|
40
40
|
// @ts-ignore
|
|
41
41
|
var WasmModule2D = require("../../_wasm/scichart2d");
|
|
42
42
|
var BuildStamp_1 = require("../../Core/BuildStamp");
|
|
@@ -44,9 +44,15 @@ var Guard_1 = require("../../Core/Guard");
|
|
|
44
44
|
var WebGlRenderContext2D_1 = require("../Drawing/WebGlRenderContext2D");
|
|
45
45
|
var licenseManager2D_1 = require("./licenseManager2D");
|
|
46
46
|
var loader_1 = require("./loader");
|
|
47
|
+
var SciChartDefaults_1 = require("./SciChartDefaults");
|
|
47
48
|
var sciChartInitCommon_1 = require("./sciChartInitCommon");
|
|
48
49
|
var SciChartSurface_1 = require("./SciChartSurface");
|
|
49
50
|
var SciChartSurfaceBase_1 = require("./SciChartSurfaceBase");
|
|
51
|
+
var Globals_1 = require("../../Core/Globals");
|
|
52
|
+
var DeletableEntity_1 = require("../../Core/DeletableEntity");
|
|
53
|
+
var NativeObject_1 = require("./Helpers/NativeObject");
|
|
54
|
+
var LabelCache_1 = require("./Axis/LabelProvider/LabelCache");
|
|
55
|
+
var MemoryUsageHelper_1 = require("../../utils/MemoryUsageHelper");
|
|
50
56
|
// Global variables
|
|
51
57
|
/** @ignore */
|
|
52
58
|
var sciChartMaster = {
|
|
@@ -64,7 +70,7 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
|
|
|
64
70
|
switch (_d.label) {
|
|
65
71
|
case 0:
|
|
66
72
|
sciChartInitCommon_1.default.checkChartDivExists(divElement);
|
|
67
|
-
canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0, sciChartInitCommon_1.default.ECanvasType.canvas2D, options === null || options === void 0 ? void 0 : options.disableAspect);
|
|
73
|
+
canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0, sciChartInitCommon_1.default.ECanvasType.canvas2D, options === null || options === void 0 ? void 0 : options.disableAspect, options === null || options === void 0 ? void 0 : options.touchAction);
|
|
68
74
|
loader = (_c = options === null || options === void 0 ? void 0 : options.loader) !== null && _c !== void 0 ? _c : new loader_1.DefaultSciChartLoader();
|
|
69
75
|
loaderDiv = loader.addChartLoader(canvases.domDivContainer, options === null || options === void 0 ? void 0 : options.theme);
|
|
70
76
|
_d.label = 1;
|
|
@@ -81,7 +87,7 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
|
|
|
81
87
|
(0, BuildStamp_1.checkBuildStamp)(master.wasmContext);
|
|
82
88
|
sciChartMaster.createChildSurface = master.createChildSurface;
|
|
83
89
|
sciChartMaster.getChildSurfaces = master.getChildSurfaces;
|
|
84
|
-
monitorWebGL(
|
|
90
|
+
(0, exports.monitorWebGL)(master.wasmContext);
|
|
85
91
|
_d.label = 3;
|
|
86
92
|
case 3:
|
|
87
93
|
createChildSurface = sciChartMaster.createChildSurface, wasmContext_1 = sciChartMaster.wasmContext;
|
|
@@ -90,6 +96,7 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
|
|
|
90
96
|
return [2 /*return*/, new Promise(function (resolve) {
|
|
91
97
|
setTimeout(function () {
|
|
92
98
|
loader.removeChartLoader(canvases.domDivContainer, loaderDiv);
|
|
99
|
+
loaderDiv = undefined;
|
|
93
100
|
resolve({ wasmContext: wasmContext_1, sciChartSurface: sciChartSurface_1 });
|
|
94
101
|
}, 0);
|
|
95
102
|
})];
|
|
@@ -98,24 +105,33 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
|
|
|
98
105
|
console.error(err_1);
|
|
99
106
|
// replace with div with error message
|
|
100
107
|
loader.removeChartLoader(canvases.domDivContainer, loaderDiv);
|
|
108
|
+
loaderDiv = undefined;
|
|
101
109
|
return [2 /*return*/, Promise.reject(err_1)];
|
|
102
110
|
case 5: return [2 /*return*/];
|
|
103
111
|
}
|
|
104
112
|
});
|
|
105
113
|
}); };
|
|
106
114
|
exports.createMultichart = createMultichart;
|
|
115
|
+
var cleanupWasmContext;
|
|
107
116
|
/** @ignore */
|
|
108
|
-
var
|
|
109
|
-
|
|
117
|
+
var disposeMultiChart = function () {
|
|
118
|
+
if (cleanupWasmContext) {
|
|
119
|
+
cleanupWasmContext();
|
|
120
|
+
}
|
|
121
|
+
sciChartMaster.createChildSurface = undefined;
|
|
122
|
+
sciChartMaster.getChildSurfaces = undefined;
|
|
123
|
+
sciChartMaster.wasmContext = undefined;
|
|
124
|
+
sciChartMasterPromise = undefined;
|
|
125
|
+
// TODO make sure it works properly in combination with createSingle & 3D
|
|
126
|
+
licenseManager2D_1.licenseManager.clear();
|
|
127
|
+
};
|
|
128
|
+
exports.disposeMultiChart = disposeMultiChart;
|
|
129
|
+
/** @ignore */
|
|
130
|
+
var monitorWebGL = function (wasmContext) {
|
|
110
131
|
var restoreContext = function () {
|
|
111
132
|
// restart the engine
|
|
112
133
|
wasmContext.SCRTInitEngine2D();
|
|
113
134
|
wasmContext.TSRSetDrawRequestsEnabled(true);
|
|
114
|
-
// request redraw
|
|
115
|
-
// I'd like to do this, but it results in the surface getting captured by the global context in a way that can't easily be deleted.
|
|
116
|
-
// for (const surface of getChildSurfaces()) {
|
|
117
|
-
// surface.invalidateElement();
|
|
118
|
-
// }
|
|
119
135
|
};
|
|
120
136
|
var webGLLostContextEventHandler = function (event) {
|
|
121
137
|
console.warn("WebGL context lost: ", event.statusMessage);
|
|
@@ -124,6 +140,10 @@ var monitorWebGL = function (master) {
|
|
|
124
140
|
WebGlRenderContext2D_1.WebGlRenderContext2D.webGlResourcesRefs.forEach(function (penCache) {
|
|
125
141
|
penCache.invalidateCache();
|
|
126
142
|
});
|
|
143
|
+
// invalidate Labels Cache
|
|
144
|
+
LabelCache_1.labelCache.resetCache();
|
|
145
|
+
// invalidate native object cache
|
|
146
|
+
(0, NativeObject_1.deleteCache)(wasmContext);
|
|
127
147
|
// stop the engine
|
|
128
148
|
wasmContext.SCRTShutdownEngine2D();
|
|
129
149
|
};
|
|
@@ -134,8 +154,7 @@ var monitorWebGL = function (master) {
|
|
|
134
154
|
wasmContext.canvas.addEventListener("webglcontextlost", webGLLostContextEventHandler, false);
|
|
135
155
|
wasmContext.canvas.addEventListener("webglcontextrestored", webGLRestoredContextHandler, false);
|
|
136
156
|
};
|
|
137
|
-
|
|
138
|
-
exports.sciChartDestinations = [];
|
|
157
|
+
exports.monitorWebGL = monitorWebGL;
|
|
139
158
|
/** @ignore */
|
|
140
159
|
var createMaster = function () {
|
|
141
160
|
var createChildSurfaceInner = function (wasmContext, divElementId, canvases, theme) {
|
|
@@ -144,7 +163,7 @@ var createMaster = function () {
|
|
|
144
163
|
sciChartSurface.applyTheme(theme);
|
|
145
164
|
var unsub = sciChartInitCommon_1.default.subscribeToResize(canvases.domChartRoot, canvases.aspect, sciChartSurface, canvases.disableAspect);
|
|
146
165
|
sciChartSurface.addDeletable(unsub);
|
|
147
|
-
sciChartSurface.setDestinations(
|
|
166
|
+
sciChartSurface.setDestinations(Globals_1.sciChartDestinations);
|
|
148
167
|
return sciChartSurface;
|
|
149
168
|
};
|
|
150
169
|
var addDestination = function (wasmContext, canvasElementId, sciChartSurface, width, height, chartInitObj) {
|
|
@@ -156,7 +175,7 @@ var createMaster = function () {
|
|
|
156
175
|
var dest = wasmContext.SCRTSurfaceDestination.implement(newDestination);
|
|
157
176
|
chartInitObj.AddDestination(dest);
|
|
158
177
|
chartInitObj.SetFPSCounterEnabled(false);
|
|
159
|
-
|
|
178
|
+
Globals_1.sciChartDestinations.push({ canvasElementId: canvasElementId, sciChartSurface: sciChartSurface, width: width, height: height });
|
|
160
179
|
};
|
|
161
180
|
return new Promise(function (resolve, reject) {
|
|
162
181
|
// make sure canvas has event listener for context creation error
|
|
@@ -164,23 +183,70 @@ var createMaster = function () {
|
|
|
164
183
|
var locateFile = (0, SciChartSurfaceBase_1.getLocateFile)(SciChartSurface_1.sciChartConfig);
|
|
165
184
|
// @ts-ignore
|
|
166
185
|
new WasmModule2D({ locateFile: locateFile, noInitialRun: true })
|
|
167
|
-
.then(function (
|
|
168
|
-
var
|
|
186
|
+
.then(function (originalWasmContext, anythingElse) {
|
|
187
|
+
var revocable = (0, DeletableEntity_1.createWasmContextRevocableProxy)(originalWasmContext);
|
|
188
|
+
var wasmContext = revocable.proxy;
|
|
189
|
+
cleanupWasmContext = function () {
|
|
190
|
+
LabelCache_1.labelCache.resetCache();
|
|
191
|
+
// Halt the engine
|
|
192
|
+
wasmContext.TSRRequestExit();
|
|
193
|
+
frameRenderer2D.delete();
|
|
194
|
+
// wasmContext.SCRTGetGlobalSampleChartInterface().GetFrameRenderer().delete();
|
|
195
|
+
wasmContext.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null);
|
|
196
|
+
wasmContext.SCRTGetGlobalSampleChartInterface().delete();
|
|
197
|
+
wasmContext.SCRTSetGlobalSampleChartInterface(null);
|
|
198
|
+
(0, NativeObject_1.deleteCache)(wasmContext);
|
|
199
|
+
canvasCopyObj.delete();
|
|
200
|
+
wasmContext.SCRTSetGlobalCopyToDestinationInterface(null);
|
|
201
|
+
revocable.revoke();
|
|
202
|
+
revocable = undefined;
|
|
203
|
+
cleanupWasmContext = undefined;
|
|
204
|
+
};
|
|
205
|
+
var frameRenderer2D = new wasmContext.SCRTFrameRenderer2D();
|
|
206
|
+
/// create an object that native side can trigger the copy to from...
|
|
207
|
+
var canvasCopyObj = wasmContext.SCRTCopyToDestinationInterface.implement({
|
|
208
|
+
CopyToDestination: (0, SciChartSurfaceBase_1.copyToCanvas)(SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas, getDestinationById)
|
|
209
|
+
});
|
|
210
|
+
var getChildSurfaces = function () { return Globals_1.sciChartDestinations.map(function (el) { return el.sciChartSurface; }); };
|
|
169
211
|
// Create of replace child surface
|
|
170
212
|
var createChildSurface = function (divElementId, canvases, theme) {
|
|
171
213
|
Guard_1.Guard.notNull(theme, "theme");
|
|
172
214
|
var canvas2dId = sciChartInitCommon_1.default.getCanvas2dId(divElementId);
|
|
173
|
-
var sameIdDestinations =
|
|
215
|
+
var sameIdDestinations = Globals_1.sciChartDestinations.filter(function (el) { return el.canvasElementId === canvas2dId; });
|
|
174
216
|
sameIdDestinations.forEach(function (el) { return el.sciChartSurface.delete(false); });
|
|
175
|
-
var otherDestinations =
|
|
217
|
+
var otherDestinations = Globals_1.sciChartDestinations.filter(function (el) { return el.canvasElementId !== canvas2dId; });
|
|
176
218
|
chartInitObj.ClearDestinations();
|
|
177
|
-
while (
|
|
178
|
-
|
|
219
|
+
while (Globals_1.sciChartDestinations.length > 0) {
|
|
220
|
+
Globals_1.sciChartDestinations.pop();
|
|
179
221
|
}
|
|
180
222
|
otherDestinations.forEach(function (el) {
|
|
181
223
|
return addDestination(wasmContext, el.canvasElementId, el.sciChartSurface, el.width, el.height, chartInitObj);
|
|
182
224
|
});
|
|
183
225
|
var sciChartSurface = createChildSurfaceInner(wasmContext, divElementId, canvases, theme);
|
|
226
|
+
sciChartSurface.addDeletable({
|
|
227
|
+
delete: function () {
|
|
228
|
+
if (SciChartSurface_1.SciChartSurface.autoDisposeWasmContext && sciChartSurface.otherSurfaces.length === 0) {
|
|
229
|
+
if (SciChartSurface_1.SciChartSurface.wasmContextDisposeTimeout) {
|
|
230
|
+
setTimeout(function () {
|
|
231
|
+
if (Globals_1.sciChartDestinations.length === 0) {
|
|
232
|
+
SciChartSurface_1.SciChartSurface.disposeSharedWasmContext();
|
|
233
|
+
}
|
|
234
|
+
}, SciChartSurface_1.SciChartSurface.wasmContextDisposeTimeout);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
SciChartSurface_1.SciChartSurface.disposeSharedWasmContext();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
if (process.env.NODE_ENV !== "production") {
|
|
242
|
+
if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled &&
|
|
243
|
+
sciChartSurface.otherSurfaces.length === 0) {
|
|
244
|
+
console.warn("SciChartSurface.autoDisposeWasmContext is disabled, thus wasmContext should be disposed explicitly using \"SciChartSurface.disposeSharedWasmContext()\".");
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
});
|
|
184
250
|
addDestination(wasmContext, canvas2dId, sciChartSurface, canvases.domCanvas2D.width, canvases.domCanvas2D.height, chartInitObj);
|
|
185
251
|
licenseManager2D_1.licenseManager.applyLicense2D(wasmContext, sciChartSurface, false);
|
|
186
252
|
return sciChartSurface;
|
|
@@ -191,7 +257,7 @@ var createMaster = function () {
|
|
|
191
257
|
resolve({ getChildSurfaces: getChildSurfaces, createChildSurface: createChildSurface, wasmContext: wasmContext });
|
|
192
258
|
},
|
|
193
259
|
Draw: function (canvasId) {
|
|
194
|
-
var dest =
|
|
260
|
+
var dest = Globals_1.sciChartDestinations.find(function (d) { return d.canvasElementId === canvasId; });
|
|
195
261
|
if (dest) {
|
|
196
262
|
dest.sciChartSurface.renderSurface.onRenderTimeElapsed();
|
|
197
263
|
}
|
|
@@ -204,19 +270,17 @@ var createMaster = function () {
|
|
|
204
270
|
}
|
|
205
271
|
};
|
|
206
272
|
var chartInitObj = wasmContext.SCRTSampleChartInterface.implement(chartInitializer);
|
|
207
|
-
var frameRenderer2D = new wasmContext.SCRTFrameRenderer2D();
|
|
208
273
|
chartInitObj.SetFrameRenderer(frameRenderer2D);
|
|
274
|
+
// Note: in case of createMaster this property must be set before the first chart created.
|
|
275
|
+
// It will be shared buffer size across all charts
|
|
276
|
+
chartInitObj.SetWasmBufferSizesKb(SciChartDefaults_1.SciChartDefaults.wasmBufferSizesKb);
|
|
209
277
|
wasmContext.SCRTSetGlobalSampleChartInterface(chartInitObj);
|
|
210
|
-
/// create an object that native side can trigger the copy to from...
|
|
211
|
-
var canvasCopyObj = wasmContext.SCRTCopyToDestinationInterface.implement({
|
|
212
|
-
CopyToDestination: (0, SciChartSurfaceBase_1.copyToCanvas)(SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas, getDestinationById)
|
|
213
|
-
});
|
|
214
278
|
wasmContext.SCRTSetGlobalCopyToDestinationInterface(canvasCopyObj);
|
|
215
279
|
wasmContext.TSRSetDrawRequestsEnabled(true);
|
|
216
280
|
// SCJS-1321 fixes cutting 3d chart issue. 3D wasm and vice versa doesn't know about domMasterCanvas width/height
|
|
217
281
|
// when creating one 3d chart and one 2d chart on the same screen. So we tell the other wasm about existing master canvas size
|
|
218
282
|
if (SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas) {
|
|
219
|
-
wasmContext.
|
|
283
|
+
wasmContext.SCRTSetMainWindowSize(SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.width, SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.height);
|
|
220
284
|
}
|
|
221
285
|
// @ts-ignore
|
|
222
286
|
wasmContext.callMain();
|
|
@@ -229,5 +293,5 @@ var createMaster = function () {
|
|
|
229
293
|
};
|
|
230
294
|
/** @ignore */
|
|
231
295
|
var getDestinationById = function (destinationId) {
|
|
232
|
-
return
|
|
296
|
+
return Globals_1.sciChartDestinations.find(function (dest) { return dest.canvasElementId === destinationId; });
|
|
233
297
|
};
|
|
@@ -3,8 +3,6 @@ import { TSciChartSurfaceCanvases } from "../../types/TSciChartSurfaceCanvases";
|
|
|
3
3
|
import { IThemeProvider } from "../Themes/IThemeProvider";
|
|
4
4
|
import { I2DSurfaceOptions } from "./I2DSurfaceOptions";
|
|
5
5
|
import { TWebAssemblyChart } from "./SciChartSurface";
|
|
6
|
-
import { TSciChartDestination } from "./SciChartSurfaceBase";
|
|
7
|
-
export declare const sciChartSingleDestinations: TSciChartDestination[];
|
|
8
6
|
/** @ignore */
|
|
9
7
|
export declare const createSingleInternal: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
|
|
10
8
|
/** @ignore */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initDrawEngineSingleChart = exports.createSingleInternal =
|
|
3
|
+
exports.initDrawEngineSingleChart = exports.createSingleInternal = void 0;
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
var WasmModule2D = require("../../_wasm/scichart2d");
|
|
6
6
|
var BuildStamp_1 = require("../../Core/BuildStamp");
|
|
@@ -9,17 +9,21 @@ var WebGlHelper_1 = require("../../Core/WebGlHelper");
|
|
|
9
9
|
var logger_1 = require("../../utils/logger");
|
|
10
10
|
var licenseManager2D_1 = require("./licenseManager2D");
|
|
11
11
|
var loader_1 = require("./loader");
|
|
12
|
+
var SciChartDefaults_1 = require("./SciChartDefaults");
|
|
12
13
|
var sciChartInitCommon_1 = require("./sciChartInitCommon");
|
|
13
14
|
var SciChartSurface_1 = require("./SciChartSurface");
|
|
14
15
|
var SciChartSurfaceBase_1 = require("./SciChartSurfaceBase");
|
|
15
16
|
var NativeObject_1 = require("./Helpers/NativeObject");
|
|
17
|
+
var DeletableEntity_1 = require("../../Core/DeletableEntity");
|
|
18
|
+
var Globals_1 = require("../../Core/Globals");
|
|
19
|
+
var LabelCache_1 = require("./Axis/LabelProvider/LabelCache");
|
|
20
|
+
var createMaster_1 = require("./createMaster");
|
|
16
21
|
// Global variables
|
|
17
|
-
exports.sciChartSingleDestinations = [];
|
|
18
22
|
/** @ignore */
|
|
19
23
|
var createSingleInternal = function (divElement, options) {
|
|
20
24
|
return new Promise(function (resolve, reject) {
|
|
21
25
|
var _a;
|
|
22
|
-
var canvases = sciChartInitCommon_1.default.initCanvas(divElement, options === null || options === void 0 ? void 0 : options.widthAspect, options === null || options === void 0 ? void 0 : options.heightAspect, undefined, options === null || options === void 0 ? void 0 : options.disableAspect);
|
|
26
|
+
var canvases = sciChartInitCommon_1.default.initCanvas(divElement, options === null || options === void 0 ? void 0 : options.widthAspect, options === null || options === void 0 ? void 0 : options.heightAspect, undefined, options === null || options === void 0 ? void 0 : options.disableAspect, options === null || options === void 0 ? void 0 : options.touchAction);
|
|
23
27
|
var loader = (_a = options === null || options === void 0 ? void 0 : options.loader) !== null && _a !== void 0 ? _a : new loader_1.DefaultSciChartLoader();
|
|
24
28
|
var loaderDiv = loader.addChartLoader(canvases.domDivContainer, options === null || options === void 0 ? void 0 : options.theme);
|
|
25
29
|
var webGLSupport = WebGlHelper_1.WebGlHelper.getWebGlSupport();
|
|
@@ -32,10 +36,28 @@ var createSingleInternal = function (divElement, options) {
|
|
|
32
36
|
loader.removeChartLoader(canvases.domDivContainer, loaderDiv);
|
|
33
37
|
// @ts-ignore
|
|
34
38
|
wasmContext.doNotCaptureKeyboard = true;
|
|
35
|
-
|
|
39
|
+
// TODO replace workaround with proper wasmContext references cleanup
|
|
40
|
+
// TODO use revocable only for memory debug
|
|
41
|
+
// if (process.env.NODE_ENV !== "production") {
|
|
42
|
+
var revocable = (0, DeletableEntity_1.createWasmContextRevocableProxy)(wasmContext);
|
|
43
|
+
var customResolve = function (res) {
|
|
44
|
+
res.sciChartSurface.addDeletable({
|
|
45
|
+
delete: function () {
|
|
46
|
+
revocable.revoke();
|
|
47
|
+
revocable = undefined;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
resolve(res);
|
|
51
|
+
};
|
|
52
|
+
(0, exports.initDrawEngineSingleChart)(revocable.proxy, canvases, customResolve, options === null || options === void 0 ? void 0 : options.theme);
|
|
53
|
+
// return;
|
|
54
|
+
// }
|
|
55
|
+
// initDrawEngineSingleChart(wasmContext, canvases, resolve, options?.theme as IThemeProvider);
|
|
36
56
|
(0, BuildStamp_1.checkBuildStamp)(wasmContext);
|
|
57
|
+
(0, createMaster_1.monitorWebGL)(wasmContext);
|
|
37
58
|
})
|
|
38
|
-
.catch(function () {
|
|
59
|
+
.catch(function (err) {
|
|
60
|
+
logger_1.Logger.debug(err);
|
|
39
61
|
loader.removeChartLoader(canvases.domDivContainer, loaderDiv);
|
|
40
62
|
reject("Could not load SciChart WebAssembly module.\n Check your build process and ensure that your scichart2d.wasm, scichart2d.data and scichart2d.js files are from the same version");
|
|
41
63
|
});
|
|
@@ -55,17 +77,30 @@ var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme)
|
|
|
55
77
|
wasmContext.preRun.push(function () { return (ENV.SDL_EMSCRIPTEN_KEYBOARD_ELEMENT = "#chart_WebGL"); });
|
|
56
78
|
var scs;
|
|
57
79
|
wasmContext.canvas = canvases.domCanvasWebGL;
|
|
80
|
+
var frameRenderer2D = new wasmContext.SCRTFrameRenderer2D();
|
|
81
|
+
var webGlCanvasId = canvases.domCanvasWebGL.id;
|
|
58
82
|
var chartInitializer = {
|
|
59
83
|
InitializeChart: function () {
|
|
60
84
|
scs = new SciChartSurface_1.SciChartSurface(wasmContext, { canvases: canvases });
|
|
61
85
|
scs.applyTheme(theme);
|
|
62
|
-
|
|
63
|
-
canvasElementId:
|
|
86
|
+
Globals_1.sciChartSingleDestinations.push({
|
|
87
|
+
canvasElementId: webGlCanvasId,
|
|
64
88
|
sciChartSurface: scs,
|
|
65
89
|
width: width,
|
|
66
90
|
height: height
|
|
67
91
|
});
|
|
68
|
-
scs.setDestinations(
|
|
92
|
+
scs.setDestinations(Globals_1.sciChartSingleDestinations);
|
|
93
|
+
scs.addDeletable({
|
|
94
|
+
delete: function () {
|
|
95
|
+
// Halt the engine
|
|
96
|
+
wasmContext.TSRRequestExit();
|
|
97
|
+
frameRenderer2D.delete();
|
|
98
|
+
wasmContext.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null);
|
|
99
|
+
wasmContext.SCRTGetGlobalSampleChartInterface().delete();
|
|
100
|
+
wasmContext.SCRTSetGlobalSampleChartInterface(null);
|
|
101
|
+
LabelCache_1.labelCache.resetCache();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
69
104
|
setTimeout(function () {
|
|
70
105
|
scs.invalidateElement();
|
|
71
106
|
licenseManager2D_1.licenseManager.applyLicense2D(wasmContext, scs, true);
|
|
@@ -86,9 +121,9 @@ var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme)
|
|
|
86
121
|
}
|
|
87
122
|
};
|
|
88
123
|
var chartInitObj = wasmContext.SCRTSampleChartInterface.implement(chartInitializer);
|
|
89
|
-
var frameRenderer2D = new wasmContext.SCRTFrameRenderer2D();
|
|
90
124
|
chartInitObj.SetFrameRenderer(frameRenderer2D);
|
|
91
125
|
chartInitObj.SetFPSCounterEnabled(false);
|
|
126
|
+
chartInitObj.SetWasmBufferSizesKb(SciChartDefaults_1.SciChartDefaults.wasmBufferSizesKb);
|
|
92
127
|
wasmContext.SCRTSetGlobalSampleChartInterface(chartInitObj);
|
|
93
128
|
// @ts-ignore
|
|
94
129
|
wasmContext.callMain();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ILicenseInfo } from "../../types/licensingClasses";
|
|
2
2
|
import { SCRTLicenseType } from "../../types/TSciChart";
|
|
3
|
-
import {
|
|
3
|
+
import { ISciChartSurfaceBase } from "./SciChartSurfaceBase";
|
|
4
4
|
export declare type TLicenseDependencies = {
|
|
5
5
|
fetchFromWizard: (url: string) => Promise<Response>;
|
|
6
6
|
setCookie: (name: string, val: string, validDays: number) => void;
|
|
7
7
|
getCookie: (name: string) => string;
|
|
8
8
|
fetchForChallenge: (url: string) => Promise<Response>;
|
|
9
|
-
updateLicenseDisplay: (licenseInfo: ILicenseInfo, sciChartSurface:
|
|
9
|
+
updateLicenseDisplay: (licenseInfo: ILicenseInfo, sciChartSurface: ISciChartSurfaceBase, is2D: boolean, applyToOther: boolean) => void;
|
|
10
10
|
debug: (message: string) => void;
|
|
11
11
|
};
|
|
12
12
|
export declare const setDependencies: (dependencies: TLicenseDependencies) => TLicenseDependencies;
|
|
@@ -34,7 +34,7 @@ interface ILicenseCookie {
|
|
|
34
34
|
lastValidated: Date;
|
|
35
35
|
}
|
|
36
36
|
export declare const getLicenseCookie: () => ILicenseCookie;
|
|
37
|
-
export declare const applyLicense: (licenseContext: TLicenseContext, sciChartSurface:
|
|
37
|
+
export declare const applyLicense: (licenseContext: TLicenseContext, sciChartSurface: ISciChartSurfaceBase) => void;
|
|
38
38
|
export declare type TLicenseContext = {
|
|
39
39
|
SCRTCredentials: {
|
|
40
40
|
GetLicenseType: () => SCRTLicenseType;
|
|
@@ -56,6 +56,7 @@ export declare type TLicenseContext = {
|
|
|
56
56
|
SCRTLicenseType: {
|
|
57
57
|
LICENSE_TYPE_NO_LICENSE: SCRTLicenseType;
|
|
58
58
|
LICENSE_TYPE_TRIAL: SCRTLicenseType;
|
|
59
|
+
LICENSE_TYPE_COMMUNITY: SCRTLicenseType;
|
|
59
60
|
LICENSE_TYPE_FULL: SCRTLicenseType;
|
|
60
61
|
LICENSE_TYPE_FULL_EXPIRED: SCRTLicenseType;
|
|
61
62
|
LICENSE_TYPE_TRIAL_EXPIRED: SCRTLicenseType;
|
|
@@ -66,12 +67,13 @@ export declare type TLicenseContext = {
|
|
|
66
67
|
};
|
|
67
68
|
};
|
|
68
69
|
export declare const getLicenseInfo: (licenseContext: TLicenseContext) => ILicenseInfo;
|
|
69
|
-
export declare const updateLicenseDisplay: (licenseInfo: ILicenseInfo, sciChartSurface:
|
|
70
|
+
export declare const updateLicenseDisplay: (licenseInfo: ILicenseInfo, sciChartSurface: ISciChartSurfaceBase, is2D: boolean, applyToOther: boolean) => void;
|
|
70
71
|
export declare const licenseManager: {
|
|
72
|
+
clear: () => void;
|
|
71
73
|
setRuntimeLicenseKey: (value: string) => void;
|
|
72
74
|
setIsDebugLicensing: (value: boolean) => void;
|
|
73
75
|
setLicenseCallback: (callback: (queryString: string) => Promise<Response>) => void;
|
|
74
76
|
setServerLicenseEndpoint: (value: string) => void;
|
|
75
|
-
applyLicense2D: (licenseContext: TLicenseContext, sciChartSurface:
|
|
77
|
+
applyLicense2D: (licenseContext: TLicenseContext, sciChartSurface: ISciChartSurfaceBase, isSingle: boolean) => void;
|
|
76
78
|
};
|
|
77
79
|
export {};
|