scichart 2.2.2417 → 3.0.0-beta.230
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/Builder/buildDataSeries.d.ts +16 -1
- package/Builder/buildDataSeries.js +24 -1
- package/Builder/buildSeries.d.ts +60 -3
- package/Builder/buildSeries.js +28 -1
- package/Builder/buildSurface.d.ts +28 -2
- package/Builder/buildSurface.js +53 -31
- package/Builder/chartBuilder.d.ts +20 -7
- package/Builder/chartBuilder.js +37 -3
- package/Charting/ChartModifiers/ChartModifierBase.d.ts +21 -0
- package/Charting/ChartModifiers/ChartModifierBase.js +12 -0
- package/Charting/ChartModifiers/ChartModifierBase2D.js +2 -1
- package/Charting/ChartModifiers/CursorModifier.d.ts +92 -19
- package/Charting/ChartModifiers/CursorModifier.js +147 -58
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +2 -1
- package/Charting/ChartModifiers/LegendModifier.js +2 -1
- package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +6 -1
- package/Charting/ChartModifiers/ModifierMouseArgs.js +13 -3
- package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +2 -2
- package/Charting/ChartModifiers/MouseWheelZoomModifier.js +16 -4
- package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +2 -1
- package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +8 -4
- package/Charting/ChartModifiers/PinchZoomModifier.js +2 -1
- package/Charting/ChartModifiers/RolloverModifier.d.ts +43 -21
- package/Charting/ChartModifiers/RolloverModifier.js +48 -29
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +9 -6
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +10 -8
- package/Charting/ChartModifiers/SeriesSelectionModifier.js +2 -1
- package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/XAxisDragModifier.js +2 -1
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/YAxisDragModifier.js +2 -1
- package/Charting/ChartModifiers/ZoomExtentsModifier.js +2 -1
- package/Charting/ChartModifiers/ZoomPanModifier.js +2 -1
- package/Charting/ChartModifiers/constants.d.ts +3 -1
- package/Charting/ChartModifiers/constants.js +2 -0
- package/Charting/Drawing/BatchRenderContext.d.ts +6 -0
- package/Charting/Drawing/BatchRenderContext.js +40 -0
- package/Charting/Drawing/RenderSurface.d.ts +2 -1
- package/Charting/Drawing/RenderSurface.js +3 -2
- package/Charting/Drawing/WebGlRenderContext2D.d.ts +19 -4
- package/Charting/Drawing/WebGlRenderContext2D.js +70 -41
- package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.js +2 -1
- package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/CentralAxesLayoutManager.js +2 -1
- package/Charting/LayoutManager/LayoutManager.d.ts +2 -1
- package/Charting/LayoutManager/LayoutManager.js +6 -5
- package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/Model/BaseDataSeries.d.ts +10 -1
- package/Charting/Model/BaseDataSeries.js +9 -8
- package/Charting/Model/BaseHeatmapDataSeries.d.ts +18 -5
- package/Charting/Model/BaseHeatmapDataSeries.js +21 -13
- package/Charting/Model/ChartData/SeriesInfo.d.ts +6 -0
- package/Charting/Model/ChartData/SeriesInfo.js +5 -0
- package/Charting/Model/ChartData/XyySeriesInfo.d.ts +2 -0
- package/Charting/Model/ChartData/XyySeriesInfo.js +2 -0
- package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +4 -3
- package/Charting/Model/Filters/HlcCustomFilter.js +12 -9
- package/Charting/Model/Filters/HlcFilterBase.js +2 -1
- package/Charting/Model/Filters/HlcScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/OhlcCustomFilter.js +12 -9
- package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/XyCustomFilter.js +12 -9
- package/Charting/Model/Filters/XyFilterBase.d.ts +14 -5
- package/Charting/Model/Filters/XyFilterBase.js +47 -15
- package/Charting/Model/Filters/XyMovingAverageFilter.js +2 -1
- package/Charting/Model/Filters/XyRatioFilter.js +2 -1
- package/Charting/Model/Filters/XyScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/XyyCustomFilter.js +12 -9
- package/Charting/Model/Filters/XyyFilterBase.js +2 -1
- package/Charting/Model/Filters/XyyScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/XyzCustomFilter.js +12 -9
- package/Charting/Model/Filters/XyzFilterBase.js +2 -1
- package/Charting/Model/Filters/XyzScaleOffsetFilter.js +2 -1
- package/Charting/Model/IDataSeries.d.ts +9 -1
- package/Charting/Model/IDataSeries.js +8 -0
- package/Charting/Model/NonUniformHeatmapDataSeries.d.ts +112 -0
- package/Charting/Model/NonUniformHeatmapDataSeries.js +261 -0
- package/Charting/Model/PaletteFactory.d.ts +40 -4
- package/Charting/Model/PaletteFactory.js +37 -11
- package/Charting/Model/XyTextDataSeries.d.ts +121 -0
- package/Charting/Model/XyTextDataSeries.js +274 -0
- package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +1 -1
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +1 -1
- package/Charting/Services/RenderPassData.d.ts +15 -5
- package/Charting/Services/RenderPassData.js +27 -5
- package/Charting/Services/SciChartRenderer.d.ts +2 -1
- package/Charting/Services/SciChartRenderer.js +91 -29
- package/Charting/Themes/IThemeProvider.d.ts +61 -0
- package/Charting/Themes/IThemeProvider.js +67 -1
- package/Charting/Themes/SciChartJSDarkTheme.d.ts +4 -0
- package/Charting/Themes/SciChartJSDarkTheme.js +6 -2
- package/Charting/Themes/SciChartJSDarkv2Theme.js +3 -0
- package/Charting/Themes/SciChartJSLightTheme.d.ts +8 -0
- package/Charting/Themes/SciChartJSLightTheme.js +8 -0
- package/Charting/Themes/SciChartJsNavyTheme.d.ts +10 -0
- package/Charting/Themes/SciChartJsNavyTheme.js +49 -0
- package/Charting/Visuals/Annotations/AdornerLayer.js +4 -8
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +80 -7
- package/Charting/Visuals/Annotations/AnnotationBase.js +238 -28
- package/Charting/Visuals/Annotations/AnnotationClickEventArgs.d.ts +11 -0
- package/Charting/Visuals/Annotations/AnnotationClickEventArgs.js +12 -0
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -0
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +18 -19
- package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -0
- package/Charting/Visuals/Annotations/BoxAnnotation.js +69 -67
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +20 -20
- package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/CustomAnnotation.js +3 -2
- package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +6 -3
- package/Charting/Visuals/Annotations/IAdornerProvider.d.ts +12 -0
- package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -0
- package/Charting/Visuals/Annotations/IAnnotation.js +9 -0
- package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -0
- package/Charting/Visuals/Annotations/LineAnnotation.js +29 -35
- package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +193 -0
- package/Charting/Visuals/Annotations/NativeTextAnnotation.js +536 -0
- package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.d.ts +4 -2
- package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +19 -14
- package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +9 -8
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +6 -6
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +20 -21
- package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +13 -2
- package/Charting/Visuals/Annotations/SvgAnnotationBase.js +34 -42
- package/Charting/Visuals/Annotations/TextAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/TextAnnotation.js +41 -22
- package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +6 -3
- package/Charting/Visuals/Annotations/annotationHelpers.d.ts +6 -6
- package/Charting/Visuals/Annotations/annotationHelpers.js +7 -6
- package/Charting/Visuals/Annotations/constants.d.ts +13 -1
- package/Charting/Visuals/Annotations/constants.js +12 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +24 -4
- package/Charting/Visuals/Axis/AxisBase2D.js +115 -38
- package/Charting/Visuals/Axis/AxisCore.d.ts +10 -5
- package/Charting/Visuals/Axis/AxisCore.js +11 -10
- package/Charting/Visuals/Axis/AxisRenderer.js +114 -20
- package/Charting/Visuals/Axis/CategoryAxis.js +2 -1
- package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +15 -15
- package/Charting/Visuals/Axis/CategoryAxisBase.js +14 -12
- package/Charting/Visuals/Axis/DateTimeNumericAxis.js +2 -1
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/DateLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +14 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +140 -33
- package/Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/NumericLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +31 -1
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +64 -42
- package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +2 -2
- package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.js +16 -19
- package/Charting/Visuals/Axis/LogarithmicAxis.js +9 -6
- package/Charting/Visuals/Axis/NumericAxis.js +3 -3
- package/Charting/Visuals/Axis/constants.d.ts +1 -0
- package/Charting/Visuals/Axis/constants.js +1 -0
- package/Charting/Visuals/HeatmapLegend.d.ts +95 -0
- package/Charting/Visuals/HeatmapLegend.js +192 -0
- package/Charting/Visuals/Helpers/NativeObject.d.ts +15 -2
- package/Charting/Visuals/Helpers/NativeObject.js +72 -6
- package/Charting/Visuals/I2DSurfaceOptions.d.ts +46 -0
- package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +5 -0
- package/Charting/Visuals/PointMarkers/BasePointMarker.js +28 -0
- package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +8 -0
- package/Charting/Visuals/RenderableSeries/Animations/BandAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/BandAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/BubbleAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/CustomPointMarkerStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/LineAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/MountainAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/MountainAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/PointMarkerStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ScatterAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +8 -2
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +3 -3
- package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +42 -10
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +128 -0
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +201 -0
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +26 -0
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +39 -3
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +17 -2
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +2 -0
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +15 -2
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +10 -0
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +93 -17
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +8 -1
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +21 -1
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +4 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +43 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.js +142 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +92 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +129 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.d.ts +17 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.js +62 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +47 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.js +125 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +71 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.js +221 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.js +2 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +208 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +410 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +40 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +141 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +63 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.js +198 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +35 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.js +92 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.d.ts +12 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +134 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.d.ts +56 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +167 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +0 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +47 -40
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +18 -5
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +0 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +14 -27
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +17 -4
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +34 -11
- package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.d.ts +36 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +493 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +5 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +8 -5
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +4 -4
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +15 -4
- package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +21 -0
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +40 -4
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +2 -0
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +18 -3
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +36 -2
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +77 -8
- package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +16 -4
- package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastMountainRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +17 -0
- package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +45 -0
- package/Charting/Visuals/RenderableSeries/HeatmapColorMap.js +3 -2
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +35 -5
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +17 -1
- package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +8 -0
- package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +7 -1
- package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.d.ts +20 -0
- package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.js +86 -0
- package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.d.ts +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.js +56 -0
- package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +7 -1
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +34 -2
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +6 -1
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +12 -0
- package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.d.ts +74 -0
- package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.js +99 -0
- package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.d.ts +7 -2
- package/Charting/Visuals/RenderableSeries/ShaderEffect.js +2 -2
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +2 -3
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +2 -1
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +13 -2
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -1
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +33 -9
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +7 -1
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +2 -75
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +8 -130
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +7 -1
- package/Charting/Visuals/RenderableSeries/constants.d.ts +5 -1
- package/Charting/Visuals/RenderableSeries/constants.js +4 -0
- package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +3 -3
- package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
- package/Charting/Visuals/SciChartDefaults.js +4 -0
- package/Charting/Visuals/SciChartOverview.js +5 -3
- package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -0
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -0
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +22 -4
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +2 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +1 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +5 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +17 -19
- package/Charting/Visuals/SciChartSurface.d.ts +238 -7
- package/Charting/Visuals/SciChartSurface.js +800 -28
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +16 -1
- package/Charting/Visuals/SciChartSurfaceBase.js +34 -2
- package/Charting/Visuals/TextureManager/CanvasTexture.js +1 -1
- package/Charting/Visuals/TextureManager/DpiHelper.js +3 -7
- package/Charting/Visuals/TextureManager/TextureManager.d.ts +11 -0
- package/Charting/Visuals/TextureManager/TextureManager.js +37 -1
- package/Charting/Visuals/createMaster.js +7 -10
- package/Charting/Visuals/createSingle.js +2 -0
- package/Charting/Visuals/licenseManager2D.js +9 -9
- package/Charting/Visuals/sciChartInitCommon.js +16 -12
- package/Charting3D/CameraController.d.ts +5 -0
- package/Charting3D/CameraController.js +6 -0
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +2 -1
- package/Charting3D/Visuals/Axis/AxisBase3D.js +7 -5
- package/Charting3D/Visuals/Axis/NumericAxis3D.js +2 -1
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +4 -0
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +7 -0
- package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +6 -4
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +7 -2
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +3 -2
- package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.d.ts +0 -5
- package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.js +12 -11
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
- package/Charting3D/Visuals/SciChart3DSurface.js +18 -11
- package/Charting3D/Visuals/createMaster3d.js +10 -18
- package/Charting3D/Visuals/createSingle3d.js +12 -10
- package/Core/Animations/GenericAnimation.d.ts +2 -0
- package/Core/Animations/GenericAnimation.js +3 -0
- package/Core/Animations/NumberRangeAnimator.js +7 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/Mouse/MouseManager.d.ts +20 -0
- package/Core/Mouse/MouseManager.js +201 -30
- package/Core/Telemetry.js +1 -1
- package/README.md +91 -403
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.data +0 -0
- package/_wasm/scichart2d.js +280 -267
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.data +0 -0
- package/_wasm/scichart3d.js +280 -268
- package/_wasm/scichart3d.wasm +0 -0
- package/constants/performanceWarnings.d.ts +2 -0
- package/constants/performanceWarnings.js +3 -1
- package/package.json +2 -2
- package/types/AutoColorMode.d.ts +9 -0
- package/types/AutoColorMode.js +13 -0
- package/types/BaseType.d.ts +3 -1
- package/types/BaseType.js +2 -0
- package/types/DataLabelProviderType.d.ts +15 -0
- package/types/DataLabelProviderType.js +19 -0
- package/types/DataLabelSkipMode.d.ts +21 -0
- package/types/DataLabelSkipMode.js +25 -0
- package/types/DefaultRenderLayer.d.ts +10 -0
- package/types/DefaultRenderLayer.js +14 -0
- package/types/MousePosition.d.ts +1 -1
- package/types/MousePosition.js +1 -1
- package/types/SeriesType.d.ts +7 -1
- package/types/SeriesType.js +6 -0
- package/types/SvgClippingMode.d.ts +17 -0
- package/types/SvgClippingMode.js +21 -0
- package/types/TDataLabelStyle.d.ts +16 -0
- package/types/TDataLabelStyle.js +2 -0
- package/types/TSciChart.d.ts +214 -118
- package/types/TSciChart3D.d.ts +104 -70
- package/types/TextPosition.d.ts +17 -0
- package/types/TextPosition.js +39 -0
- package/types/ThemeProviderType.d.ts +3 -1
- package/types/ThemeProviderType.js +2 -0
- package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +10 -1
- package/utils/ccall/appendDoubleVectorFromJsArray.js +24 -1
- package/utils/memoize.d.ts +1 -0
- package/utils/memoize.js +26 -0
- package/utils/number.d.ts +1 -0
- package/utils/number.js +5 -1
- package/utils/parseColor.d.ts +2 -0
- package/utils/parseColor.js +3 -3
- package/utils/text.d.ts +5 -0
- package/utils/text.js +48 -0
- package/utils/translate.d.ts +12 -2
- package/utils/translate.js +67 -11
- package/utils/zeroArray2D.d.ts +5 -0
- package/utils/zeroArray2D.js +5 -0
|
@@ -0,0 +1,274 @@
|
|
|
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
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.XyTextDataSeries = void 0;
|
|
19
|
+
var Guard_1 = require("../../Core/Guard");
|
|
20
|
+
var NumberArray_1 = require("../../types/NumberArray");
|
|
21
|
+
var appendDoubleVectorFromJsArray_1 = require("../../utils/ccall/appendDoubleVectorFromJsArray");
|
|
22
|
+
var BaseDataSeries_1 = require("./BaseDataSeries");
|
|
23
|
+
var IDataSeries_1 = require("./IDataSeries");
|
|
24
|
+
var XyTextDataSeries = /** @class */ (function (_super) {
|
|
25
|
+
__extends(XyTextDataSeries, _super);
|
|
26
|
+
/**
|
|
27
|
+
* Creates an instance of {@link XyDataSeries}
|
|
28
|
+
* @param webAssemblyContext the {@link TSciChart | SciChart WebAssembly Context} containing native methods
|
|
29
|
+
* and access to our underlying WebGL2 WebAssembly rendering engine
|
|
30
|
+
* @param options the {@link IXyDataSeriesOptions} which can be passed to configure the DataSeries at construct time
|
|
31
|
+
*/
|
|
32
|
+
function XyTextDataSeries(webAssemblyContext, options) {
|
|
33
|
+
var _this = _super.call(this, webAssemblyContext, options) || this;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
_this.type = IDataSeries_1.EDataSeriesType.XyText;
|
|
38
|
+
_this.textValuesProperty = [];
|
|
39
|
+
if (options === null || options === void 0 ? void 0 : options.xValues) {
|
|
40
|
+
Guard_1.Guard.notNull(options.yValues, "options.yValues");
|
|
41
|
+
_this.appendRange(options.xValues, options.yValues, options.textValues, options.metadata);
|
|
42
|
+
}
|
|
43
|
+
return _this;
|
|
44
|
+
}
|
|
45
|
+
Object.defineProperty(XyTextDataSeries.prototype, "textValues", {
|
|
46
|
+
/** The text values for this series. Manipulate using append, insert, update etc on the XyTextDataSeries */
|
|
47
|
+
get: function () {
|
|
48
|
+
return this.textValuesProperty;
|
|
49
|
+
},
|
|
50
|
+
enumerable: false,
|
|
51
|
+
configurable: true
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Appends a single X, Y, Text point to the DataSeries
|
|
55
|
+
* @remarks
|
|
56
|
+
* For best performance on drawing large datasets, use the {@link appendRange} method
|
|
57
|
+
*
|
|
58
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
59
|
+
* @param x The X-value
|
|
60
|
+
* @param y The Y-value
|
|
61
|
+
* @param text The text-value
|
|
62
|
+
* @param metadata The point metadata
|
|
63
|
+
*/
|
|
64
|
+
XyTextDataSeries.prototype.append = function (x, y, text, metadata) {
|
|
65
|
+
if (!this.getIsDeleted()) {
|
|
66
|
+
var nativeX = this.getNativeXValues();
|
|
67
|
+
this.dataDistributionCalculator.onAppend(this.isSorted, this.containsNaN, nativeX, [x], [y]);
|
|
68
|
+
// Push metadata should be done before push x values
|
|
69
|
+
this.appendMetadata(metadata);
|
|
70
|
+
nativeX.push_back(x);
|
|
71
|
+
this.getNativeYValues().push_back(y);
|
|
72
|
+
this.textValuesProperty.push(text);
|
|
73
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Append, null, 1);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Appends a range of X, Y, Text points to the DataSeries
|
|
78
|
+
* @remarks
|
|
79
|
+
* This method is considerably higher performance than {@link append} which appends a single point
|
|
80
|
+
*
|
|
81
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
82
|
+
* @param xValues The X-values
|
|
83
|
+
* @param yValues The Y-values
|
|
84
|
+
* @param textValues The text values
|
|
85
|
+
* @param metadata The array of point metadata
|
|
86
|
+
*/
|
|
87
|
+
XyTextDataSeries.prototype.appendRange = function (xValues, yValues, textValues, metadata) {
|
|
88
|
+
var _a;
|
|
89
|
+
if (!this.getIsDeleted()) {
|
|
90
|
+
Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
|
|
91
|
+
Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
|
|
92
|
+
Guard_1.Guard.arraysSameLength(xValues, "xValues", yValues, "yValues");
|
|
93
|
+
if (metadata) {
|
|
94
|
+
Guard_1.Guard.isTrue(Array.isArray(metadata), "metadata must be an array of IPointMetadata");
|
|
95
|
+
Guard_1.Guard.arraysSameLength(xValues, "xValues", metadata, "metadata");
|
|
96
|
+
}
|
|
97
|
+
var nativeX = this.getNativeXValues();
|
|
98
|
+
var nativeY = this.getNativeYValues();
|
|
99
|
+
this.dataDistributionCalculator.onAppend(this.isSorted, this.containsNaN, nativeX, xValues, yValues);
|
|
100
|
+
// Push metadata should be done before push x values
|
|
101
|
+
this.appendMetadataRange(metadata, xValues.length);
|
|
102
|
+
// New implementation passing array from JS
|
|
103
|
+
// TODO: create indexValues from c++
|
|
104
|
+
(0, appendDoubleVectorFromJsArray_1.appendDoubleVectorFromJsArray)(this.webAssemblyContext, nativeX, xValues);
|
|
105
|
+
(0, appendDoubleVectorFromJsArray_1.appendDoubleVectorFromJsArray)(this.webAssemblyContext, nativeY, yValues);
|
|
106
|
+
(_a = this.textValuesProperty).push.apply(_a, textValues);
|
|
107
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Append, null, xValues.length);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Updates a single Y-value by X-index
|
|
112
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
113
|
+
* @param index the index to update
|
|
114
|
+
* @param y The new Y value
|
|
115
|
+
* @param text The new text value
|
|
116
|
+
* @param metadata The point metadata
|
|
117
|
+
*/
|
|
118
|
+
XyTextDataSeries.prototype.update = function (index, y, text, metadata) {
|
|
119
|
+
if (!this.getIsDeleted()) {
|
|
120
|
+
this.validateIndex(index);
|
|
121
|
+
this.dataDistributionCalculator.onUpdate(this.isSorted, this.containsNaN, undefined, undefined, [y], index);
|
|
122
|
+
this.getNativeYValues().set(index, y);
|
|
123
|
+
this.textValuesProperty[index] = text;
|
|
124
|
+
this.setMetadataAt(index, metadata);
|
|
125
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Update, index, 1);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Updates a single X, Y, Text value, by X-index. Might also need to set isSorted = false
|
|
130
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
131
|
+
* @param index The index to update
|
|
132
|
+
* @param x The new X value
|
|
133
|
+
* @param y The new Y value
|
|
134
|
+
* @param text The new text value
|
|
135
|
+
* @param metadata The point metadata
|
|
136
|
+
*/
|
|
137
|
+
XyTextDataSeries.prototype.updateXyText = function (index, x, y, text, metadata) {
|
|
138
|
+
if (!this.getIsDeleted()) {
|
|
139
|
+
this.validateIndex(index);
|
|
140
|
+
var nativeX = this.getNativeXValues();
|
|
141
|
+
this.dataDistributionCalculator.onUpdate(this.isSorted, this.containsNaN, nativeX, [x], [y], index);
|
|
142
|
+
nativeX.set(index, x);
|
|
143
|
+
this.getNativeYValues().set(index, y);
|
|
144
|
+
this.textValuesProperty[index] = text;
|
|
145
|
+
this.setMetadataAt(index, metadata);
|
|
146
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Update, index, 1);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* @summary Inserts a single X,Y,Text value at the start index
|
|
151
|
+
* @remarks
|
|
152
|
+
* For best performance on drawing large datasets, use the {@link insertRange} method
|
|
153
|
+
*
|
|
154
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
155
|
+
* @param startIndex the index to insert at
|
|
156
|
+
* @param x the X value
|
|
157
|
+
* @param y the Y value
|
|
158
|
+
* @param text The new text value
|
|
159
|
+
* @param metadata The point metadata
|
|
160
|
+
*/
|
|
161
|
+
XyTextDataSeries.prototype.insert = function (startIndex, x, y, text, metadata) {
|
|
162
|
+
if (!this.getIsDeleted()) {
|
|
163
|
+
this.validateIndex(startIndex, "Start index is out of range");
|
|
164
|
+
var nativeX = this.getNativeXValues();
|
|
165
|
+
var nativeY = this.getNativeYValues();
|
|
166
|
+
this.dataDistributionCalculator.onInsert(this.isSorted, this.containsNaN, nativeX, [x], [y], startIndex);
|
|
167
|
+
nativeX.insertAt(startIndex, x);
|
|
168
|
+
nativeY.insertAt(startIndex, y);
|
|
169
|
+
this.textValuesProperty.unshift(text);
|
|
170
|
+
this.insertMetadata(startIndex, metadata);
|
|
171
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Insert, startIndex, 1);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* @summary Inserts a range of X,Y values at the startIndex
|
|
176
|
+
* @remarks
|
|
177
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
178
|
+
* @param startIndex the index to insert at
|
|
179
|
+
* @param xValues the XValues
|
|
180
|
+
* @param yValues the YValues
|
|
181
|
+
* @param textValues The text values
|
|
182
|
+
* @param metadata The array of point metadata
|
|
183
|
+
*/
|
|
184
|
+
XyTextDataSeries.prototype.insertRange = function (startIndex, xValues, yValues, textValues, metadata) {
|
|
185
|
+
var _a;
|
|
186
|
+
if (!this.getIsDeleted()) {
|
|
187
|
+
Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
|
|
188
|
+
Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
|
|
189
|
+
this.validateIndex(startIndex, "Start index is out of range");
|
|
190
|
+
Guard_1.Guard.arraysSameLength(xValues, "xValues", yValues, "yValues");
|
|
191
|
+
if (metadata) {
|
|
192
|
+
Guard_1.Guard.isTrue(Array.isArray(metadata), "metadata must be an array of IPointMetadata");
|
|
193
|
+
Guard_1.Guard.arraysSameLength(xValues, "xValues", metadata, "metadata");
|
|
194
|
+
}
|
|
195
|
+
var nativeX = this.getNativeXValues();
|
|
196
|
+
this.dataDistributionCalculator.onInsert(this.isSorted, this.containsNaN, nativeX, xValues, yValues, startIndex);
|
|
197
|
+
(0, appendDoubleVectorFromJsArray_1.insertDoubleVectorFromJsArray)(this.webAssemblyContext, xValues, this.getNativeXValues(), startIndex);
|
|
198
|
+
(0, appendDoubleVectorFromJsArray_1.insertDoubleVectorFromJsArray)(this.webAssemblyContext, yValues, this.getNativeYValues(), startIndex);
|
|
199
|
+
(_a = this.textValuesProperty).unshift.apply(_a, textValues);
|
|
200
|
+
this.insertMetadataRange(startIndex, metadata);
|
|
201
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Insert, startIndex, xValues.length);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Removes an X,Y value at the specified index
|
|
206
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
207
|
+
* @param index the index to remove at
|
|
208
|
+
*/
|
|
209
|
+
XyTextDataSeries.prototype.removeAt = function (index) {
|
|
210
|
+
if (!this.getIsDeleted()) {
|
|
211
|
+
this.validateIndex(index);
|
|
212
|
+
this.getNativeXValues().removeAt(index);
|
|
213
|
+
this.getNativeYValues().removeAt(index);
|
|
214
|
+
this.textValuesProperty.splice(index, 1);
|
|
215
|
+
this.removeMetadataAt(index);
|
|
216
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Remove, index, 1);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* @summary Removes a range of X,Y values at the specified index
|
|
221
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
222
|
+
* @param startIndex the start index to remove at
|
|
223
|
+
* @param count the number of points to remove
|
|
224
|
+
*/
|
|
225
|
+
XyTextDataSeries.prototype.removeRange = function (startIndex, count) {
|
|
226
|
+
if (!this.getIsDeleted()) {
|
|
227
|
+
this.validateIndex(startIndex, "Start index is out of range");
|
|
228
|
+
this.getNativeXValues().removeRange(startIndex, count);
|
|
229
|
+
this.getNativeYValues().removeRange(startIndex, count);
|
|
230
|
+
this.textValuesProperty.splice(startIndex, count);
|
|
231
|
+
this.removeMetadataRange(startIndex, count);
|
|
232
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Remove, startIndex, count);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Clears the entire DataSeries.
|
|
237
|
+
* @remarks
|
|
238
|
+
* Note this does not free memory, WebAssembly/Native memory is released by calling {@link delete}, after which the
|
|
239
|
+
* DataSeries is no longer usable.
|
|
240
|
+
*
|
|
241
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
242
|
+
*/
|
|
243
|
+
XyTextDataSeries.prototype.clear = function () {
|
|
244
|
+
if (!this.getIsDeleted()) {
|
|
245
|
+
_super.prototype.clear.call(this);
|
|
246
|
+
this.getNativeXValues().clear();
|
|
247
|
+
this.getNativeYValues().clear();
|
|
248
|
+
this.textValuesProperty = [];
|
|
249
|
+
this.setMetadata(undefined);
|
|
250
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Clear, null, null);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
XyTextDataSeries.prototype.toJSON = function (excludeData) {
|
|
254
|
+
if (excludeData === void 0) { excludeData = false; }
|
|
255
|
+
var json = _super.prototype.toJSON.call(this);
|
|
256
|
+
if (!excludeData) {
|
|
257
|
+
var xValues = [];
|
|
258
|
+
var yValues = [];
|
|
259
|
+
for (var i = 0; i < this.count(); i++) {
|
|
260
|
+
xValues.push(this.xValues.get(i));
|
|
261
|
+
yValues.push(this.yValues.get(i));
|
|
262
|
+
}
|
|
263
|
+
var options = {
|
|
264
|
+
xValues: xValues,
|
|
265
|
+
yValues: yValues,
|
|
266
|
+
textValues: this.textValuesProperty
|
|
267
|
+
};
|
|
268
|
+
Object.assign(json, options);
|
|
269
|
+
}
|
|
270
|
+
return json;
|
|
271
|
+
};
|
|
272
|
+
return XyTextDataSeries;
|
|
273
|
+
}(BaseDataSeries_1.BaseDataSeries));
|
|
274
|
+
exports.XyTextDataSeries = XyTextDataSeries;
|
|
@@ -38,7 +38,7 @@ export declare abstract class CoordinateCalculatorBase implements IDeletable {
|
|
|
38
38
|
/**
|
|
39
39
|
* Gets or sets a constant offset in pixels for all generated coordinates
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
offset: number;
|
|
42
42
|
/**
|
|
43
43
|
* When true, this coordinate calculator has flipped coordinates
|
|
44
44
|
*/
|
|
@@ -73,7 +73,7 @@ var ExtremeResamplerHelper = /** @class */ (function () {
|
|
|
73
73
|
if (fillBasicNativeArgs === true) {
|
|
74
74
|
this.needsResampling(rp, xOriginalValues, false, true);
|
|
75
75
|
}
|
|
76
|
-
//
|
|
76
|
+
//this.debugParameters(rp, this.nativeArgs);
|
|
77
77
|
// What does this method do???
|
|
78
78
|
var requestedSize = this.nativeResampler.UpdateIndices(indexesOut, this.xInput, yOriginalValues, this.nativeArgs.Resampling, this.nativeArgs);
|
|
79
79
|
// SC-5145 Adds +1 to be sure that reserved Capacity is not less than the actual resampled count,
|
|
@@ -6,21 +6,31 @@ import { CoordinateCalculatorBase } from "../Numerics/CoordinateCalculators/Coor
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class RenderPassData {
|
|
8
8
|
readonly indexRange: NumberRange;
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
9
|
+
readonly getxCoordinateCalculator: () => CoordinateCalculatorBase;
|
|
10
|
+
readonly getyCoordinateCalculator: () => CoordinateCalculatorBase;
|
|
11
11
|
readonly isVerticalChart: boolean;
|
|
12
12
|
readonly pointSeries?: IPointSeries;
|
|
13
13
|
readonly resamplingHash?: number;
|
|
14
14
|
/**
|
|
15
15
|
* Creates an instance of RenderPassData
|
|
16
16
|
* @param indexRange The min and max index to data-range currently visible on the {@link SciChartSurface}
|
|
17
|
-
* @param
|
|
17
|
+
* @param getxCoordinateCalculator A function to get the XAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
18
18
|
* used to transform between pixel and data-coordinates
|
|
19
|
-
* @param
|
|
19
|
+
* @param getyCoordinateCalculator A function to get the YAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
20
20
|
* used to transform between pixel and data-coordinates
|
|
21
21
|
* @param isVerticalChart A flag indicating if the chart is currently vertically arranged (XAxis on the left, YAxis on the top/bottom)
|
|
22
22
|
* @param pointSeries The point series
|
|
23
23
|
* @param resamplingHash The resampling hash value, used for caching
|
|
24
24
|
*/
|
|
25
|
-
constructor(indexRange: NumberRange,
|
|
25
|
+
constructor(indexRange: NumberRange, getxCoordinateCalculator: () => CoordinateCalculatorBase, getyCoordinateCalculator: () => CoordinateCalculatorBase, isVerticalChart: boolean, pointSeries?: IPointSeries, resamplingHash?: number);
|
|
26
|
+
/**
|
|
27
|
+
* Get the XAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
28
|
+
* used to transform between pixel and data-coordinates
|
|
29
|
+
*/
|
|
30
|
+
get xCoordinateCalculator(): CoordinateCalculatorBase;
|
|
31
|
+
/**
|
|
32
|
+
* Get the YAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
33
|
+
* used to transform between pixel and data-coordinates
|
|
34
|
+
*/
|
|
35
|
+
get yCoordinateCalculator(): CoordinateCalculatorBase;
|
|
26
36
|
}
|
|
@@ -8,22 +8,44 @@ var RenderPassData = /** @class */ (function () {
|
|
|
8
8
|
/**
|
|
9
9
|
* Creates an instance of RenderPassData
|
|
10
10
|
* @param indexRange The min and max index to data-range currently visible on the {@link SciChartSurface}
|
|
11
|
-
* @param
|
|
11
|
+
* @param getxCoordinateCalculator A function to get the XAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
12
12
|
* used to transform between pixel and data-coordinates
|
|
13
|
-
* @param
|
|
13
|
+
* @param getyCoordinateCalculator A function to get the YAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
14
14
|
* used to transform between pixel and data-coordinates
|
|
15
15
|
* @param isVerticalChart A flag indicating if the chart is currently vertically arranged (XAxis on the left, YAxis on the top/bottom)
|
|
16
16
|
* @param pointSeries The point series
|
|
17
17
|
* @param resamplingHash The resampling hash value, used for caching
|
|
18
18
|
*/
|
|
19
|
-
function RenderPassData(indexRange,
|
|
19
|
+
function RenderPassData(indexRange, getxCoordinateCalculator, getyCoordinateCalculator, isVerticalChart, pointSeries, resamplingHash) {
|
|
20
20
|
this.indexRange = indexRange;
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
21
|
+
this.getxCoordinateCalculator = getxCoordinateCalculator;
|
|
22
|
+
this.getyCoordinateCalculator = getyCoordinateCalculator;
|
|
23
23
|
this.isVerticalChart = isVerticalChart;
|
|
24
24
|
this.pointSeries = pointSeries;
|
|
25
25
|
this.resamplingHash = resamplingHash;
|
|
26
26
|
}
|
|
27
|
+
Object.defineProperty(RenderPassData.prototype, "xCoordinateCalculator", {
|
|
28
|
+
/**
|
|
29
|
+
* Get the XAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
30
|
+
* used to transform between pixel and data-coordinates
|
|
31
|
+
*/
|
|
32
|
+
get: function () {
|
|
33
|
+
return this.getxCoordinateCalculator();
|
|
34
|
+
},
|
|
35
|
+
enumerable: false,
|
|
36
|
+
configurable: true
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(RenderPassData.prototype, "yCoordinateCalculator", {
|
|
39
|
+
/**
|
|
40
|
+
* Get the YAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
41
|
+
* used to transform between pixel and data-coordinates
|
|
42
|
+
*/
|
|
43
|
+
get: function () {
|
|
44
|
+
return this.getyCoordinateCalculator();
|
|
45
|
+
},
|
|
46
|
+
enumerable: false,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
27
49
|
return RenderPassData;
|
|
28
50
|
}());
|
|
29
51
|
exports.RenderPassData = RenderPassData;
|
|
@@ -18,6 +18,7 @@ export declare class SciChartRenderer {
|
|
|
18
18
|
private static calculateResamplingHash;
|
|
19
19
|
private sciChartSurface;
|
|
20
20
|
private previousTime;
|
|
21
|
+
private prevRect;
|
|
21
22
|
/**
|
|
22
23
|
* Creates an instance of the SciChartRenderer
|
|
23
24
|
* @param sciChartSurface The {@link SciChartSurface} that we are rendering
|
|
@@ -31,7 +32,6 @@ export declare class SciChartRenderer {
|
|
|
31
32
|
private drawRenderContextAnnotations;
|
|
32
33
|
private drawSvgAnnotations;
|
|
33
34
|
private validate;
|
|
34
|
-
private prevRect;
|
|
35
35
|
private updateSvgCanvasSize;
|
|
36
36
|
private prepareAxesRenderData;
|
|
37
37
|
private prepareSeriesRenderData;
|
|
@@ -41,4 +41,5 @@ export declare class SciChartRenderer {
|
|
|
41
41
|
private tryPerformAutoRangeOn;
|
|
42
42
|
private onParentSurfaceRendered;
|
|
43
43
|
private updateWatermark;
|
|
44
|
+
private getViewportRect;
|
|
44
45
|
}
|
|
@@ -10,18 +10,21 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SciChartRenderer = void 0;
|
|
13
|
+
var app_1 = require("../../constants/app");
|
|
13
14
|
var Dictionary_1 = require("../../Core/Dictionary");
|
|
14
15
|
var Rect_1 = require("../../Core/Rect");
|
|
15
16
|
var AutoRange_1 = require("../../types/AutoRange");
|
|
16
17
|
var AxisAlignment_1 = require("../../types/AxisAlignment");
|
|
17
|
-
var
|
|
18
|
+
var DefaultRenderLayer_1 = require("../../types/DefaultRenderLayer");
|
|
18
19
|
var hash_1 = require("../../utils/hash");
|
|
20
|
+
var WebGlRenderContext2D_1 = require("../Drawing/WebGlRenderContext2D");
|
|
19
21
|
var ResamplingParams_1 = require("../Numerics/Resamplers/ResamplingParams");
|
|
20
22
|
var IAnnotation_1 = require("../Visuals/Annotations/IAnnotation");
|
|
21
23
|
var SciChartSurfaceBase_1 = require("../Visuals/SciChartSurfaceBase");
|
|
22
24
|
var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
|
|
23
25
|
var RenderPassData_1 = require("./RenderPassData");
|
|
24
26
|
var RenderPassInfo_1 = require("./RenderPassInfo");
|
|
27
|
+
var SvgClippingMode_1 = require("../../types/SvgClippingMode");
|
|
25
28
|
/**
|
|
26
29
|
* A class used internally in SciChart to perform layout, arrangement, data-preparation and rendering on the Cartesian 2D {@link SciChartSurface}
|
|
27
30
|
*/
|
|
@@ -102,31 +105,39 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
102
105
|
if (this.sciChartSurface.isDeleted) {
|
|
103
106
|
return;
|
|
104
107
|
}
|
|
105
|
-
// console.log("render");
|
|
108
|
+
// console.log("render start");
|
|
106
109
|
var nativeContext = renderContext.getNativeContext();
|
|
107
110
|
var wasmContext = this.sciChartSurface.webAssemblyContext2D;
|
|
108
|
-
var oldBlendMode
|
|
109
|
-
|
|
111
|
+
var oldBlendMode;
|
|
112
|
+
if (!app_1.IS_TEST_ENV) {
|
|
113
|
+
oldBlendMode = nativeContext.GetBlendMode();
|
|
114
|
+
nativeContext.SetBlendMode(wasmContext.eSCRTBlendMode.BlendAdditiveOneAlpha);
|
|
115
|
+
}
|
|
110
116
|
// Step 1 validate the chart and show errors
|
|
111
117
|
this.validate();
|
|
112
118
|
// Animation Step
|
|
113
119
|
var timeElapsed = this.previousTime ? Date.now() - this.previousTime : undefined;
|
|
114
120
|
this.previousTime = Date.now();
|
|
115
121
|
this.sciChartSurface.onAnimate(timeElapsed);
|
|
116
|
-
|
|
122
|
+
renderContext.enqueueLayeredDraw(function () {
|
|
123
|
+
_this.sciChartSurface.updateBackground();
|
|
124
|
+
}, (0, WebGlRenderContext2D_1.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset, this.sciChartSurface.stepBetweenLayers, DefaultRenderLayer_1.EDefaultRenderLayer.AxisBandsLayer));
|
|
117
125
|
// Step 2 autorange
|
|
118
126
|
this.sciChartSurface.updateStackedCollectionAccumulatedVectors();
|
|
119
127
|
this.sciChartSurface.xAxes.asArray().forEach(function (axis) { return _this.tryPerformAutoRangeOn(axis, _this.sciChartSurface); });
|
|
120
128
|
this.sciChartSurface.yAxes.asArray().forEach(function (axis) { return _this.tryPerformAutoRangeOn(axis, _this.sciChartSurface); });
|
|
121
129
|
// Step 3 layout
|
|
122
|
-
// console.log("viewportSize", renderContext.viewportSize);
|
|
123
130
|
var seriesViewRect = this.sciChartSurface.layoutManager.layoutChart(renderContext.viewportSize);
|
|
124
|
-
this.
|
|
131
|
+
var viewportSvgRect = this.getViewportRect(renderContext.viewportSize, seriesViewRect);
|
|
132
|
+
this.sciChartSurface.setCoordSvgTranslation(seriesViewRect.x - viewportSvgRect.x, seriesViewRect.y - viewportSvgRect.y);
|
|
133
|
+
this.updateSvgCanvasSize(viewportSvgRect);
|
|
125
134
|
// Step 4 prepare render data
|
|
126
135
|
var _a = this.prepareAxesRenderData(), xAxesById = _a.xAxesById, yAxesById = _a.yAxesById;
|
|
127
136
|
var renderPassInfo = this.prepareSeriesRenderData(seriesViewRect, xAxesById);
|
|
128
137
|
// Draw seriesViewRect border
|
|
129
|
-
|
|
138
|
+
renderContext.enqueueLayeredDraw(function () {
|
|
139
|
+
_this.sciChartSurface.drawBorder(renderContext);
|
|
140
|
+
}, (0, WebGlRenderContext2D_1.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset, this.sciChartSurface.stepBetweenLayers, DefaultRenderLayer_1.EDefaultRenderLayer.AxisBandsLayer));
|
|
130
141
|
// Step 5 Draw X, Y axis and gridlines
|
|
131
142
|
if (this.sciChartSurface.debugRendering) {
|
|
132
143
|
this.drawDebugAxes(this.sciChartSurface, renderContext);
|
|
@@ -137,33 +148,43 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
137
148
|
var modifierAnnotations = this.sciChartSurface.modifierAnnotations.asArray();
|
|
138
149
|
var annotations = __spreadArray(__spreadArray([], userAnnotations, true), modifierAnnotations, true);
|
|
139
150
|
var renderContextAnnotations = annotations.filter(function (el) {
|
|
151
|
+
// TODO This is bad as it makes it hard to add custom renderContext annotations
|
|
140
152
|
return (el.type === IAnnotation_1.EAnnotationType.RenderContextBoxAnnotation ||
|
|
141
153
|
el.type === IAnnotation_1.EAnnotationType.RenderContextLineAnnotation ||
|
|
142
154
|
el.type === IAnnotation_1.EAnnotationType.RenderContextHorizontalLineAnnotation ||
|
|
143
155
|
el.type === IAnnotation_1.EAnnotationType.RenderContextVerticalLineAnnotation ||
|
|
144
|
-
el.type === IAnnotation_1.EAnnotationType.RenderContextAxisMarkerAnnotation
|
|
156
|
+
el.type === IAnnotation_1.EAnnotationType.RenderContextAxisMarkerAnnotation ||
|
|
157
|
+
el.type === IAnnotation_1.EAnnotationType.RenderContextNativeTextAnnotation);
|
|
145
158
|
});
|
|
159
|
+
var annotationsBelowLayer = (0, WebGlRenderContext2D_1.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset, this.sciChartSurface.stepBetweenLayers, DefaultRenderLayer_1.EDefaultRenderLayer.AnnotationsBelowSeriesLayer);
|
|
146
160
|
renderContext.enqueueLayeredDraw(function () {
|
|
147
161
|
_this.drawRenderContextAnnotations(renderContextAnnotations, xAxesById, yAxesById, IAnnotation_1.EAnnotationLayer.BelowChart, renderContext, seriesViewRect);
|
|
148
|
-
},
|
|
162
|
+
}, annotationsBelowLayer);
|
|
163
|
+
var seriesLayer = (0, WebGlRenderContext2D_1.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset, this.sciChartSurface.stepBetweenLayers, DefaultRenderLayer_1.EDefaultRenderLayer.SeriesLayer);
|
|
149
164
|
// Step 7 Draw series. Queue series rendering after grid lines and bands, but before the axes
|
|
150
|
-
renderContext.enqueueLayeredDraw(function () { return _this.drawSeries(_this.sciChartSurface, renderPassInfo, renderContext); },
|
|
165
|
+
renderContext.enqueueLayeredDraw(function () { return _this.drawSeries(_this.sciChartSurface, renderPassInfo, renderContext); }, seriesLayer);
|
|
166
|
+
var annotationsAboveLayer = (0, WebGlRenderContext2D_1.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset, this.sciChartSurface.stepBetweenLayers, DefaultRenderLayer_1.EDefaultRenderLayer.AnnotationsAboveSeriesLayer);
|
|
167
|
+
// Step 8 Draw annotations above the series
|
|
168
|
+
renderContext.enqueueLayeredDraw(function () {
|
|
169
|
+
_this.drawRenderContextAnnotations(renderContextAnnotations, xAxesById, yAxesById, IAnnotation_1.EAnnotationLayer.AboveChart, renderContext, seriesViewRect);
|
|
170
|
+
}, annotationsAboveLayer);
|
|
151
171
|
// Execute rendering of queued elements
|
|
152
172
|
renderContext.drawLayers();
|
|
153
|
-
|
|
154
|
-
this.drawRenderContextAnnotations(renderContextAnnotations, xAxesById, yAxesById, IAnnotation_1.EAnnotationLayer.AboveChart, renderContext, seriesViewRect);
|
|
173
|
+
renderContext.endFonts();
|
|
155
174
|
// Step 9 Draw SVG or Html Overlays
|
|
156
175
|
var svgAnnotations = annotations.filter(function (el) {
|
|
157
176
|
return el.type === IAnnotation_1.EAnnotationType.SVG ||
|
|
158
177
|
el.type === IAnnotation_1.EAnnotationType.SVGTextAnnotation ||
|
|
159
178
|
el.type === IAnnotation_1.EAnnotationType.SVGCustomAnnotation;
|
|
160
179
|
});
|
|
161
|
-
this.drawSvgAnnotations(svgAnnotations, xAxesById, yAxesById);
|
|
180
|
+
this.drawSvgAnnotations(svgAnnotations, xAxesById, yAxesById, this.sciChartSurface.getCoordSvgTranslation());
|
|
162
181
|
// Update watermark
|
|
163
182
|
this.updateWatermark(renderContext, seriesViewRect);
|
|
164
183
|
// Step 10 Call OnParentSurfaceRendered
|
|
165
184
|
this.onParentSurfaceRendered();
|
|
166
|
-
|
|
185
|
+
if (!app_1.IS_TEST_ENV) {
|
|
186
|
+
nativeContext.SetBlendMode(oldBlendMode);
|
|
187
|
+
}
|
|
167
188
|
// Invalidate for the animations
|
|
168
189
|
if (this.sciChartSurface.isRunningAnimation) {
|
|
169
190
|
setTimeout(this.sciChartSurface.invalidateElement, 0);
|
|
@@ -194,7 +215,7 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
194
215
|
}
|
|
195
216
|
});
|
|
196
217
|
};
|
|
197
|
-
SciChartRenderer.prototype.drawSvgAnnotations = function (annotations, xAxisById, yAxisById) {
|
|
218
|
+
SciChartRenderer.prototype.drawSvgAnnotations = function (annotations, xAxisById, yAxisById, coordSvgTranslation) {
|
|
198
219
|
annotations.forEach(function (a) {
|
|
199
220
|
var xAxis = xAxisById.item(a.xAxisId) || xAxisById.values[0];
|
|
200
221
|
var yAxis = yAxisById.item(a.yAxisId) || yAxisById.values[0];
|
|
@@ -207,7 +228,7 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
207
228
|
}
|
|
208
229
|
a.showWarning = false;
|
|
209
230
|
}
|
|
210
|
-
a.update(xAxis.getCurrentCoordinateCalculator(), yAxis.getCurrentCoordinateCalculator());
|
|
231
|
+
a.update(xAxis.getCurrentCoordinateCalculator(), yAxis.getCurrentCoordinateCalculator(), coordSvgTranslation.x / DpiHelper_1.DpiHelper.PIXEL_RATIO, coordSvgTranslation.y / DpiHelper_1.DpiHelper.PIXEL_RATIO);
|
|
211
232
|
});
|
|
212
233
|
};
|
|
213
234
|
SciChartRenderer.prototype.validate = function () {
|
|
@@ -267,6 +288,11 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
267
288
|
// don't try and draw series with no data
|
|
268
289
|
if (!series.isStacked && !series.dataSeries)
|
|
269
290
|
continue;
|
|
291
|
+
// don't try and draw deleted dataseries
|
|
292
|
+
if (!series.isStacked && series.dataSeries.getIsDeleted()) {
|
|
293
|
+
throw new Error("SciChartSurface.renderableSeries[index=".concat(i, "] dataSeries has been deleted. ") +
|
|
294
|
+
"This is an invalid state for SciChart. Have you shared this DataSeries between chart surfaces?");
|
|
295
|
+
}
|
|
270
296
|
// TODO: Do resampling, store result for use in drawing
|
|
271
297
|
var xAxis = xAxesById.item(series.xAxisId);
|
|
272
298
|
var seriesRenderPassInfo = SciChartRenderer.resampleSeries(xAxis, series, seriesViewRect);
|
|
@@ -304,10 +330,8 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
304
330
|
throw Error("Both x and y axes can't have vertical alignment");
|
|
305
331
|
if ((0, AxisAlignment_1.getIsHorizontal)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsHorizontal)(yAxis.axisAlignment))
|
|
306
332
|
throw Error("Both x and y axes can't have horizontal alignment");
|
|
307
|
-
var xCalc = xAxis.getCurrentCoordinateCalculator();
|
|
308
|
-
var yCalc = yAxis.getCurrentCoordinateCalculator();
|
|
309
333
|
try {
|
|
310
|
-
var renderPassData = new RenderPassData_1.RenderPassData(indexRange,
|
|
334
|
+
var renderPassData = new RenderPassData_1.RenderPassData(indexRange, xAxis.getCurrentCoordinateCalculator, yAxis.getCurrentCoordinateCalculator, xAxis.isVerticalChart, pointSeries, resamplingHash);
|
|
311
335
|
renderableSeries.draw(renderContext, renderPassData);
|
|
312
336
|
}
|
|
313
337
|
finally {
|
|
@@ -332,15 +356,27 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
332
356
|
if (rs.isVisible && rs.isSelected)
|
|
333
357
|
drawSeriesImpl(index);
|
|
334
358
|
});
|
|
359
|
+
// Perform global text layout
|
|
360
|
+
if (this.sciChartSurface.dataLabelLayoutManager) {
|
|
361
|
+
this.sciChartSurface.dataLabelLayoutManager.performTextLayout(this.sciChartSurface, renderPassInfo);
|
|
362
|
+
}
|
|
363
|
+
// Draw series text
|
|
364
|
+
renderableSeriesArray.forEach(function (rs, index) {
|
|
365
|
+
if (rs.isVisible && rs.dataLabelProvider) {
|
|
366
|
+
rs.dataLabelProvider.draw(renderContext);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
335
369
|
nativeContext.PopMatrix();
|
|
336
370
|
nativeContext.PopState();
|
|
337
371
|
};
|
|
338
372
|
SciChartRenderer.prototype.drawDebugAxes = function (scs, renderContext) {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
373
|
+
renderContext.enqueueLayeredDraw(function () {
|
|
374
|
+
scs.xAxes.asArray().forEach(function (xAxis) {
|
|
375
|
+
xAxis.drawDebug(renderContext);
|
|
376
|
+
});
|
|
377
|
+
scs.yAxes.asArray().forEach(function (yAxis) {
|
|
378
|
+
yAxis.drawDebug(renderContext);
|
|
379
|
+
});
|
|
344
380
|
});
|
|
345
381
|
};
|
|
346
382
|
SciChartRenderer.prototype.tryPerformAutoRangeOn = function (axis, sciChartSurface) {
|
|
@@ -362,19 +398,45 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
362
398
|
}
|
|
363
399
|
};
|
|
364
400
|
SciChartRenderer.prototype.onParentSurfaceRendered = function () {
|
|
365
|
-
|
|
366
|
-
|
|
401
|
+
var _a;
|
|
402
|
+
if (!this.sciChartSurface.isSubSurface) {
|
|
403
|
+
this.sciChartSurface.chartModifiers.asArray().forEach(function (cm) {
|
|
404
|
+
cm.onParentSurfaceRendered();
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
// For subCharts, run this once from the parent surface, after draw has happened
|
|
408
|
+
(_a = this.sciChartSurface.subCharts) === null || _a === void 0 ? void 0 : _a.forEach(function (sc) {
|
|
409
|
+
sc.chartModifiers.asArray().forEach(function (cm) {
|
|
410
|
+
cm.onParentSurfaceRendered();
|
|
411
|
+
});
|
|
367
412
|
});
|
|
368
413
|
this.sciChartSurface.rendered.raiseEvent();
|
|
369
414
|
};
|
|
370
415
|
SciChartRenderer.prototype.updateWatermark = function (renderContext, seriesViewRect) {
|
|
371
|
-
var left = seriesViewRect.x;
|
|
416
|
+
var left = seriesViewRect.x + 5;
|
|
372
417
|
var chartHeight = this.sciChartSurface.isCopyCanvasSurface
|
|
373
418
|
? SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.height
|
|
374
419
|
: renderContext.viewportSize.height;
|
|
375
|
-
var bottom = chartHeight - (seriesViewRect.top + seriesViewRect.height);
|
|
420
|
+
var bottom = chartHeight - (seriesViewRect.top + seriesViewRect.height) + 5;
|
|
376
421
|
this.sciChartSurface.updateWatermark(left, bottom);
|
|
377
422
|
};
|
|
423
|
+
SciChartRenderer.prototype.getViewportRect = function (viewportSize, seriesViewRect) {
|
|
424
|
+
switch (this.sciChartSurface.svgClippingMode) {
|
|
425
|
+
case SvgClippingMode_1.ESvgClippingMode.SeriesViewRect:
|
|
426
|
+
return seriesViewRect;
|
|
427
|
+
case SvgClippingMode_1.ESvgClippingMode.Chart:
|
|
428
|
+
return new Rect_1.Rect(0, 0, viewportSize.width, viewportSize.height);
|
|
429
|
+
case SvgClippingMode_1.ESvgClippingMode.SubChart:
|
|
430
|
+
var viewportRect = new Rect_1.Rect(0, 0, viewportSize.width, viewportSize.height);
|
|
431
|
+
if (this.sciChartSurface.isSubSurface) {
|
|
432
|
+
var sub = this.sciChartSurface;
|
|
433
|
+
viewportRect = sub.getSubChartRect();
|
|
434
|
+
}
|
|
435
|
+
return viewportRect;
|
|
436
|
+
default:
|
|
437
|
+
return seriesViewRect;
|
|
438
|
+
}
|
|
439
|
+
};
|
|
378
440
|
return SciChartRenderer;
|
|
379
441
|
}());
|
|
380
442
|
exports.SciChartRenderer = SciChartRenderer;
|