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,410 @@
|
|
|
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.DataLabelProvider = void 0;
|
|
19
|
+
var Guard_1 = require("../../../../Core/Guard");
|
|
20
|
+
var Point_1 = require("../../../../Core/Point");
|
|
21
|
+
var Rect_1 = require("../../../../Core/Rect");
|
|
22
|
+
var TextPosition_1 = require("../../../../types/TextPosition");
|
|
23
|
+
var DataLabelProviderType_1 = require("../../../../types/DataLabelProviderType");
|
|
24
|
+
var DataLabelSkipMode_1 = require("../../../../types/DataLabelSkipMode");
|
|
25
|
+
var NumericFormat_1 = require("../../../../types/NumericFormat");
|
|
26
|
+
var number_1 = require("../../../../utils/number");
|
|
27
|
+
var NativeObject_1 = require("../../Helpers/NativeObject");
|
|
28
|
+
var BaseDataLabelProvider_1 = require("./BaseDataLabelProvider");
|
|
29
|
+
var DataLabelState_1 = require("./DataLabelState");
|
|
30
|
+
var performanceWarnings_1 = require("../../../../constants/performanceWarnings");
|
|
31
|
+
/**
|
|
32
|
+
* This is the standard DataLabelProvider which provides a number of options for configuring data labels.
|
|
33
|
+
* It defines a much richer api than BaseDataLabelProvider and is intended to be used as a base for doing small changes to data label behaviour
|
|
34
|
+
* generateDataLabels calls the following functions which you can override parts of the behaviour
|
|
35
|
+
* {@link ySelector} to pick the desired yValues from the pointSeries.
|
|
36
|
+
* {@link shouldGenerate} to determine if any labels should be generated so you can enable labels depending on zoom or data level.
|
|
37
|
+
* Then for each data point:
|
|
38
|
+
* {@link getText} Build in behaviour can get text from metadata using {@link metaDataSelector} or format the y values using {@link numericFormat} and {@link precision}
|
|
39
|
+
* {@link getPosition} By default return the x and y coordinate of the data point. Series-specific DataLabelProviders eg {@link LineSeriesDataLabelProvider} have logic to adjust text position based on the series
|
|
40
|
+
* {@link getColor} Returns the color from the text style. Use {@link parseColorToUIntArgb} to turn color string to the required numeric value if overriding.
|
|
41
|
+
* {@link shouldSkipLabel} Decides whether to keep or ship the generated label based on the {@link }
|
|
42
|
+
*/
|
|
43
|
+
var DataLabelProvider = /** @class */ (function (_super) {
|
|
44
|
+
__extends(DataLabelProvider, _super);
|
|
45
|
+
/**
|
|
46
|
+
* Creates an instance of the {@link DataLabelProvider}
|
|
47
|
+
*/
|
|
48
|
+
function DataLabelProvider(options) {
|
|
49
|
+
var _this = this;
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
51
|
+
_this = _super.call(this, options) || this;
|
|
52
|
+
_this.type = DataLabelProviderType_1.EDataLabelProviderType.Default;
|
|
53
|
+
/**
|
|
54
|
+
* The text to draw, along with the sizes and positions. Usually generated, but can be set or updated before final drawing
|
|
55
|
+
*/
|
|
56
|
+
_this.dataLabels = [];
|
|
57
|
+
/**
|
|
58
|
+
* Whether the label text should update when the label position is animating. Default false.
|
|
59
|
+
*/
|
|
60
|
+
_this.updateTextInAnimation = false;
|
|
61
|
+
_this.pointGapThresholdProperty = 0;
|
|
62
|
+
_this.pointCountThresholdProperty = Infinity;
|
|
63
|
+
_this.numericFormatProperty = NumericFormat_1.ENumericFormat.Decimal;
|
|
64
|
+
_this.precisionProperty = 1;
|
|
65
|
+
_this.skipModeProperty = DataLabelSkipMode_1.EDataLabelSkipMode.SkipIfOverlapPrevious;
|
|
66
|
+
_this.skipNumberProperty = 0;
|
|
67
|
+
_this.horizontalTextPositionProperty = TextPosition_1.EHorizontalTextPosition.Right;
|
|
68
|
+
_this.verticalTextPositionProperty = TextPosition_1.EVerticalTextPosition.Top;
|
|
69
|
+
_this.pointGapThresholdProperty = (_a = options === null || options === void 0 ? void 0 : options.pointGapThreshold) !== null && _a !== void 0 ? _a : _this.pointGapThresholdProperty;
|
|
70
|
+
_this.pointCountThresholdProperty = (_b = options === null || options === void 0 ? void 0 : options.pointCountThreshold) !== null && _b !== void 0 ? _b : _this.pointCountThresholdProperty;
|
|
71
|
+
_this.numericFormatProperty = (_c = options === null || options === void 0 ? void 0 : options.numericFormat) !== null && _c !== void 0 ? _c : _this.numericFormatProperty;
|
|
72
|
+
_this.precision = (_d = options === null || options === void 0 ? void 0 : options.precision) !== null && _d !== void 0 ? _d : _this.precisionProperty;
|
|
73
|
+
_this.skipNumberProperty = (_e = options === null || options === void 0 ? void 0 : options.skipNumber) !== null && _e !== void 0 ? _e : _this.skipNumberProperty;
|
|
74
|
+
_this.skipModeProperty = (_f = options === null || options === void 0 ? void 0 : options.skipMode) !== null && _f !== void 0 ? _f : _this.skipModeProperty;
|
|
75
|
+
_this.metaDataSelector = options === null || options === void 0 ? void 0 : options.metaDataSelector;
|
|
76
|
+
_this.ySelector = (_g = options === null || options === void 0 ? void 0 : options.ySelector) !== null && _g !== void 0 ? _g : (function (ps) { return ps.yValues; });
|
|
77
|
+
_this.updateTextInAnimation = (_h = options === null || options === void 0 ? void 0 : options.updateTextInAnimation) !== null && _h !== void 0 ? _h : _this.updateTextInAnimation;
|
|
78
|
+
_this.horizontalTextPositionProperty = (_j = options === null || options === void 0 ? void 0 : options.horizontalTextPosition) !== null && _j !== void 0 ? _j : _this.horizontalTextPosition;
|
|
79
|
+
_this.verticalTextPositionProperty = (_k = options === null || options === void 0 ? void 0 : options.verticalTextPosition) !== null && _k !== void 0 ? _k : _this.verticalTextPosition;
|
|
80
|
+
return _this;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @inheritDoc
|
|
84
|
+
*/
|
|
85
|
+
DataLabelProvider.prototype.onAttach = function (webAssemblyContext, parentSeries) {
|
|
86
|
+
Guard_1.Guard.notNull(webAssemblyContext, "webAssemblyContext");
|
|
87
|
+
Guard_1.Guard.notNull(parentSeries, "parentSeries");
|
|
88
|
+
this.webAssemblyContext = webAssemblyContext;
|
|
89
|
+
this.parentSeries = parentSeries;
|
|
90
|
+
};
|
|
91
|
+
Object.defineProperty(DataLabelProvider.prototype, "pointGapThreshold", {
|
|
92
|
+
/**
|
|
93
|
+
* Gets or sets the zoom threshold above which label drawing will start. Default 0.
|
|
94
|
+
* This is expressed as the gap between the first points divided by the size of the first text
|
|
95
|
+
* If data is unevenly spaced, consider {@link pointCountThreshold} or override shouldDrawText
|
|
96
|
+
*/
|
|
97
|
+
get: function () {
|
|
98
|
+
return this.pointGapThresholdProperty;
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* Gets or sets the zoom threshold above which label drawing will start. Default 0.
|
|
102
|
+
* This is expressed as the gap between the first points divided by the size of the first text
|
|
103
|
+
* If data is unevenly spaced, consider {@link pointCountThreshold} or override shouldDrawText
|
|
104
|
+
*/
|
|
105
|
+
set: function (value) {
|
|
106
|
+
this.pointGapThresholdProperty = value;
|
|
107
|
+
this.invalidateParent();
|
|
108
|
+
},
|
|
109
|
+
enumerable: false,
|
|
110
|
+
configurable: true
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(DataLabelProvider.prototype, "pointCountThreshold", {
|
|
113
|
+
/**
|
|
114
|
+
* Gets or sets the number of points below which drawing will start. Default Infinity
|
|
115
|
+
* This can be used instead of {@link pointGapThreshold} when data is unevenly spaced or has large y variation
|
|
116
|
+
*/
|
|
117
|
+
get: function () {
|
|
118
|
+
return this.pointCountThresholdProperty;
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* Gets or sets the number of points below which drawing will start. Default Infinity
|
|
122
|
+
* This can be used instead of {@link pointGapThreshold} when data is unevenly spaced or has large y variation
|
|
123
|
+
*/
|
|
124
|
+
set: function (value) {
|
|
125
|
+
this.pointCountThresholdProperty = value;
|
|
126
|
+
this.invalidateParent();
|
|
127
|
+
},
|
|
128
|
+
enumerable: false,
|
|
129
|
+
configurable: true
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(DataLabelProvider.prototype, "skipMode", {
|
|
132
|
+
/**
|
|
133
|
+
* How do decide whether to keep or skip a label once generated.
|
|
134
|
+
* Override {@link shouldSkipLabel} for more control
|
|
135
|
+
*/
|
|
136
|
+
get: function () {
|
|
137
|
+
return this.skipModeProperty;
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* How do decide whether to keep or skip a label once generated.
|
|
141
|
+
* Override {@link shouldSkipLabel} for more control
|
|
142
|
+
*/
|
|
143
|
+
set: function (value) {
|
|
144
|
+
this.skipModeProperty = value;
|
|
145
|
+
this.invalidateParent();
|
|
146
|
+
},
|
|
147
|
+
enumerable: false,
|
|
148
|
+
configurable: true
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(DataLabelProvider.prototype, "skipNumber", {
|
|
151
|
+
/**
|
|
152
|
+
* The number of points to skip while generating labels. Default 0 = no skip. 1 = skip every other.
|
|
153
|
+
* When creating text with many data points, it will help performance to skip points rather than creating and checking overlap for every data point.
|
|
154
|
+
*/
|
|
155
|
+
get: function () {
|
|
156
|
+
return this.skipNumberProperty;
|
|
157
|
+
},
|
|
158
|
+
/**
|
|
159
|
+
* The number of points to skip while generating labels. Default 0 = no skip. 1 = skip every other.
|
|
160
|
+
* When creating text with many data points, it will help performance to skip points rather than creating and checking overlap for every data point.
|
|
161
|
+
*/
|
|
162
|
+
set: function (value) {
|
|
163
|
+
this.skipNumberProperty = value;
|
|
164
|
+
this.invalidateParent();
|
|
165
|
+
},
|
|
166
|
+
enumerable: false,
|
|
167
|
+
configurable: true
|
|
168
|
+
});
|
|
169
|
+
Object.defineProperty(DataLabelProvider.prototype, "numericFormat", {
|
|
170
|
+
/**
|
|
171
|
+
* Gets or sets numeric format to use when formatting values to text. For a list of values, see {@link ENumericFormat}
|
|
172
|
+
* For more control, override getText
|
|
173
|
+
*/
|
|
174
|
+
get: function () {
|
|
175
|
+
return this.numericFormatProperty;
|
|
176
|
+
},
|
|
177
|
+
set: function (value) {
|
|
178
|
+
this.numericFormatProperty = value;
|
|
179
|
+
this.invalidateParent();
|
|
180
|
+
},
|
|
181
|
+
enumerable: false,
|
|
182
|
+
configurable: true
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(DataLabelProvider.prototype, "precision", {
|
|
185
|
+
/**
|
|
186
|
+
* Gets or sets the precision to use when formatting values to text
|
|
187
|
+
* For more control, override getText
|
|
188
|
+
*/
|
|
189
|
+
get: function () {
|
|
190
|
+
return this.precisionProperty;
|
|
191
|
+
},
|
|
192
|
+
set: function (value) {
|
|
193
|
+
this.precisionProperty = value;
|
|
194
|
+
this.invalidateParent();
|
|
195
|
+
},
|
|
196
|
+
enumerable: false,
|
|
197
|
+
configurable: true
|
|
198
|
+
});
|
|
199
|
+
Object.defineProperty(DataLabelProvider.prototype, "horizontalTextPosition", {
|
|
200
|
+
/**
|
|
201
|
+
* Gets or sets the horizontal text position for the label
|
|
202
|
+
* For more control, override getPosition
|
|
203
|
+
*/
|
|
204
|
+
get: function () {
|
|
205
|
+
return this.horizontalTextPositionProperty;
|
|
206
|
+
},
|
|
207
|
+
set: function (value) {
|
|
208
|
+
this.horizontalTextPositionProperty = value;
|
|
209
|
+
this.invalidateParent();
|
|
210
|
+
},
|
|
211
|
+
enumerable: false,
|
|
212
|
+
configurable: true
|
|
213
|
+
});
|
|
214
|
+
Object.defineProperty(DataLabelProvider.prototype, "verticalTextPosition", {
|
|
215
|
+
/**
|
|
216
|
+
* Gets or sets the vertical text position for the label
|
|
217
|
+
* For more control, override getPosition
|
|
218
|
+
*/
|
|
219
|
+
get: function () {
|
|
220
|
+
return this.verticalTextPositionProperty;
|
|
221
|
+
},
|
|
222
|
+
set: function (value) {
|
|
223
|
+
this.verticalTextPositionProperty = value;
|
|
224
|
+
this.invalidateParent();
|
|
225
|
+
},
|
|
226
|
+
enumerable: false,
|
|
227
|
+
configurable: true
|
|
228
|
+
});
|
|
229
|
+
DataLabelProvider.prototype.getText = function (state) {
|
|
230
|
+
var _a, _b;
|
|
231
|
+
if (this.metaDataSelector) {
|
|
232
|
+
return this.metaDataSelector(state.getMetaData());
|
|
233
|
+
}
|
|
234
|
+
var usefinal = !this.updateTextInAnimation && state.parentSeries.isRunningAnimation;
|
|
235
|
+
var yval = usefinal ? state.yValAfterAnimation() : state.yVal();
|
|
236
|
+
if (yval === yval) {
|
|
237
|
+
//isNaN check
|
|
238
|
+
return (0, number_1.formatNumber)(yval, (_a = this.numericFormat) !== null && _a !== void 0 ? _a : NumericFormat_1.ENumericFormat.Decimal, (_b = this.precision) !== null && _b !== void 0 ? _b : 1);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
return undefined;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Called at the start of generateDataLabels. If false, no labels will be generated.
|
|
246
|
+
* Checks {@link pointCountThreshold} then {@link pointGapThreshold}
|
|
247
|
+
* @param state
|
|
248
|
+
* @returns
|
|
249
|
+
*/
|
|
250
|
+
DataLabelProvider.prototype.shouldGenerate = function (state) {
|
|
251
|
+
var _a, _b;
|
|
252
|
+
if (state.pointCount > this.pointCountThresholdProperty)
|
|
253
|
+
return false;
|
|
254
|
+
var firstlabel = this.getText(state);
|
|
255
|
+
var bounds = (0, NativeObject_1.getTextBounds)(this.webAssemblyContext);
|
|
256
|
+
state.font.CalculateStringBounds(firstlabel !== null && firstlabel !== void 0 ? firstlabel : "", bounds, (_b = (_a = this.style) === null || _a === void 0 ? void 0 : _a.lineSpacing) !== null && _b !== void 0 ? _b : 2);
|
|
257
|
+
return state.pointGap > bounds.m_fWidth * this.pointGapThreshold;
|
|
258
|
+
};
|
|
259
|
+
DataLabelProvider.prototype.getPosition = function (state, textBounds) {
|
|
260
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
261
|
+
var x = state.xCoord();
|
|
262
|
+
if (this.horizontalTextPosition === TextPosition_1.EHorizontalTextPosition.Center) {
|
|
263
|
+
x -= textBounds.m_fWidth / 2;
|
|
264
|
+
}
|
|
265
|
+
else if (this.horizontalTextPosition === TextPosition_1.EHorizontalTextPosition.Left) {
|
|
266
|
+
x -= textBounds.m_fWidth + ((_b = (_a = this.style.padding) === null || _a === void 0 ? void 0 : _a.right) !== null && _b !== void 0 ? _b : 0);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
x += (_d = (_c = this.style.padding) === null || _c === void 0 ? void 0 : _c.left) !== null && _d !== void 0 ? _d : 0;
|
|
270
|
+
}
|
|
271
|
+
var yOffset = textBounds.m_fHeight - textBounds.GetLineBounds(0).m_fHeight;
|
|
272
|
+
var y = state.yCoord() - yOffset;
|
|
273
|
+
if (this.verticalTextPosition === TextPosition_1.EVerticalTextPosition.Center) {
|
|
274
|
+
y += textBounds.m_fHeight / 2;
|
|
275
|
+
}
|
|
276
|
+
else if (this.verticalTextPosition === TextPosition_1.EVerticalTextPosition.Bottom) {
|
|
277
|
+
y += textBounds.m_fHeight + ((_f = (_e = this.style.padding) === null || _e === void 0 ? void 0 : _e.top) !== null && _f !== void 0 ? _f : 0);
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
y -= (_h = (_g = this.style.padding) === null || _g === void 0 ? void 0 : _g.bottom) !== null && _h !== void 0 ? _h : 0;
|
|
281
|
+
}
|
|
282
|
+
return new Point_1.Point(x, y);
|
|
283
|
+
};
|
|
284
|
+
DataLabelProvider.prototype.getColor = function (state, text) {
|
|
285
|
+
return state.color;
|
|
286
|
+
};
|
|
287
|
+
DataLabelProvider.prototype.shouldSkipLabel = function (state, label) {
|
|
288
|
+
var _a;
|
|
289
|
+
// Skip if out of bounds
|
|
290
|
+
var svr = state.parentSeries.parentSurface.seriesViewRect;
|
|
291
|
+
// const yMax = state.renderPassData.isVerticalChart ? svr.width : svr.height;
|
|
292
|
+
if (label.rect.y < 0 || label.rect.bottom > svr.height)
|
|
293
|
+
return true;
|
|
294
|
+
// const xMax = state.renderPassData.isVerticalChart ? svr.height : svr.width;
|
|
295
|
+
if (label.rect.x < 0 || label.rect.right > svr.width)
|
|
296
|
+
return true;
|
|
297
|
+
switch (this.skipModeProperty) {
|
|
298
|
+
case DataLabelSkipMode_1.EDataLabelSkipMode.SkipIfOverlapPrevious:
|
|
299
|
+
return this.skipIfOverlapPrevious(state, label);
|
|
300
|
+
case DataLabelSkipMode_1.EDataLabelSkipMode.SkipIfOverlapNext:
|
|
301
|
+
return this.skipIfOverlapNext(state, label);
|
|
302
|
+
case DataLabelSkipMode_1.EDataLabelSkipMode.SkipIfSame:
|
|
303
|
+
return ((_a = state.lastLabel) === null || _a === void 0 ? void 0 : _a.text) === label.text;
|
|
304
|
+
case DataLabelSkipMode_1.EDataLabelSkipMode.ShowAll:
|
|
305
|
+
return false;
|
|
306
|
+
default:
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
/** Generates labels using getText, getPosition, getColor. Overrides manually set labels. */
|
|
311
|
+
DataLabelProvider.prototype.generateDataLabels = function (renderContext, renderPassData) {
|
|
312
|
+
var _a, _b;
|
|
313
|
+
// clear any previous labels
|
|
314
|
+
this.dataLabels = [];
|
|
315
|
+
if (!this.style || !this.style.fontFamily || !this.style.fontSize) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
var yValues = this.ySelector(renderPassData.pointSeries);
|
|
319
|
+
if (!yValues || yValues.size() === 0)
|
|
320
|
+
return;
|
|
321
|
+
this.state = new DataLabelState_1.DataLabelState(renderContext, renderPassData, this.style, this.color, yValues, this.parentSeries);
|
|
322
|
+
// console.log(
|
|
323
|
+
// "gen ",
|
|
324
|
+
// yValues.size(),
|
|
325
|
+
// renderPassData.pointSeries.xRange,
|
|
326
|
+
// renderPassData.pointSeries.indexes.size()
|
|
327
|
+
// );
|
|
328
|
+
var bounds = (0, NativeObject_1.getTextBounds)(this.webAssemblyContext);
|
|
329
|
+
if (!this.shouldGenerate(this.state))
|
|
330
|
+
return;
|
|
331
|
+
var skipCount = 0;
|
|
332
|
+
for (var i = this.state.indexStart; i <= this.state.indexEnd; i += this.skipNumberProperty + 1) {
|
|
333
|
+
this.state.index =
|
|
334
|
+
this.skipModeProperty === DataLabelSkipMode_1.EDataLabelSkipMode.SkipIfOverlapNext
|
|
335
|
+
? this.state.indexEnd - (i - this.state.indexStart)
|
|
336
|
+
: i;
|
|
337
|
+
var text = this.getText(this.state);
|
|
338
|
+
if (!text)
|
|
339
|
+
continue;
|
|
340
|
+
this.state.font.CalculateStringBounds(text !== null && text !== void 0 ? text : "", bounds, (_b = (_a = this.style) === null || _a === void 0 ? void 0 : _a.lineSpacing) !== null && _b !== void 0 ? _b : 2);
|
|
341
|
+
// console.log(text, bounds.m_fHeight, bounds.GetLinesCount());
|
|
342
|
+
var position = this.getPosition(this.state, bounds);
|
|
343
|
+
var color = this.getColor(this.state, text);
|
|
344
|
+
var firstLineHeight = bounds.GetLineBounds(0).m_fHeight;
|
|
345
|
+
var label = {
|
|
346
|
+
text: text,
|
|
347
|
+
position: position,
|
|
348
|
+
rect: new Rect_1.Rect(position.x, position.y - firstLineHeight, bounds.m_fWidth, bounds.m_fHeight),
|
|
349
|
+
color: color,
|
|
350
|
+
dataX: this.state.xCoord(),
|
|
351
|
+
dataY: this.state.yCoord()
|
|
352
|
+
};
|
|
353
|
+
if (!this.shouldSkipLabel(this.state, label)) {
|
|
354
|
+
this.state.dataLabels.push(label);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
skipCount++;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (skipCount > 100 && skipCount / (this.state.indexEnd - this.state.indexStart) > 0.8) {
|
|
361
|
+
performanceWarnings_1.performanceWarnings.dataLabelsSkippingMany.warn();
|
|
362
|
+
}
|
|
363
|
+
this.dataLabels = this.state.dataLabels;
|
|
364
|
+
};
|
|
365
|
+
DataLabelProvider.prototype.toJSON = function () {
|
|
366
|
+
var json = _super.prototype.toJSON.call(this);
|
|
367
|
+
var options = {
|
|
368
|
+
numericFormat: this.numericFormat,
|
|
369
|
+
pointGapThreshold: this.pointGapThreshold,
|
|
370
|
+
precision: this.precision,
|
|
371
|
+
pointCountThreshold: this.pointCountThreshold,
|
|
372
|
+
skipNumber: this.skipNumber,
|
|
373
|
+
skipMode: this.skipMode,
|
|
374
|
+
updateTextInAnimation: this.updateTextInAnimation,
|
|
375
|
+
horizontalTextPosition: this.horizontalTextPosition,
|
|
376
|
+
verticalTextPosition: this.verticalTextPosition
|
|
377
|
+
};
|
|
378
|
+
Object.assign(json.options, options);
|
|
379
|
+
return json;
|
|
380
|
+
};
|
|
381
|
+
DataLabelProvider.prototype.skipIfOverlapPrevious = function (state, label) {
|
|
382
|
+
var previous = state.lastLabel;
|
|
383
|
+
if (!previous)
|
|
384
|
+
// First label
|
|
385
|
+
return false;
|
|
386
|
+
if (previous.rect.right + state.xPadding < label.rect.left)
|
|
387
|
+
// x space
|
|
388
|
+
return false;
|
|
389
|
+
if (Math.abs(previous.rect.y - label.rect.y) > label.rect.height + state.yPadding)
|
|
390
|
+
// y space
|
|
391
|
+
return false;
|
|
392
|
+
return true;
|
|
393
|
+
};
|
|
394
|
+
DataLabelProvider.prototype.skipIfOverlapNext = function (state, label) {
|
|
395
|
+
// For this case, we generate the labels right to left, so last is the next to the right.
|
|
396
|
+
var next = state.lastLabel;
|
|
397
|
+
if (!next)
|
|
398
|
+
// First label
|
|
399
|
+
return false;
|
|
400
|
+
if (label.rect.right + state.xPadding < next.rect.left)
|
|
401
|
+
// x space
|
|
402
|
+
return false;
|
|
403
|
+
if (Math.abs(next.rect.y - label.rect.y) > label.rect.height + state.yPadding)
|
|
404
|
+
// y space
|
|
405
|
+
return false;
|
|
406
|
+
return true;
|
|
407
|
+
};
|
|
408
|
+
return DataLabelProvider;
|
|
409
|
+
}(BaseDataLabelProvider_1.BaseDataLabelProvider));
|
|
410
|
+
exports.DataLabelProvider = DataLabelProvider;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TDataLabelStyle } from "../../../../types/TDataLabelStyle";
|
|
2
|
+
import { SCRTDoubleVector, SCRTFont } from "../../../../types/TSciChart";
|
|
3
|
+
import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
|
|
4
|
+
import { RenderPassData } from "../../../Services/RenderPassData";
|
|
5
|
+
import { IRenderableSeries } from "../IRenderableSeries";
|
|
6
|
+
import { TDataLabel } from "./BaseDataLabelProvider";
|
|
7
|
+
export declare class DataLabelState {
|
|
8
|
+
readonly style: TDataLabelStyle;
|
|
9
|
+
readonly pointGap: number;
|
|
10
|
+
readonly xValues: SCRTDoubleVector;
|
|
11
|
+
readonly yValues: SCRTDoubleVector;
|
|
12
|
+
readonly yFinalValues: SCRTDoubleVector;
|
|
13
|
+
readonly font: SCRTFont;
|
|
14
|
+
readonly parentSeries: IRenderableSeries;
|
|
15
|
+
readonly renderPassData: RenderPassData;
|
|
16
|
+
readonly isXFlipped: boolean;
|
|
17
|
+
readonly pointCount: number;
|
|
18
|
+
readonly xPadding: number;
|
|
19
|
+
readonly yPadding: number;
|
|
20
|
+
readonly color: number;
|
|
21
|
+
readonly dataLabels: TDataLabel[];
|
|
22
|
+
readonly indexStart: number;
|
|
23
|
+
readonly indexEnd: number;
|
|
24
|
+
private indexProperty;
|
|
25
|
+
private xCoordCache;
|
|
26
|
+
private yCoordCache;
|
|
27
|
+
constructor(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData, style: TDataLabelStyle, color: string, yValues: SCRTDoubleVector, parentSeries: IRenderableSeries);
|
|
28
|
+
get index(): number;
|
|
29
|
+
set index(value: number);
|
|
30
|
+
xVal(index?: number): number;
|
|
31
|
+
yVal(index?: number): number;
|
|
32
|
+
yValAfterAnimation(index?: number): number;
|
|
33
|
+
xCoord(index?: number): number;
|
|
34
|
+
yCoord(index?: number): number;
|
|
35
|
+
hasNext(index?: number): boolean;
|
|
36
|
+
get lastLabel(): TDataLabel;
|
|
37
|
+
getMetaData(): import("../../../Model/IPointMetadata").IPointMetadata;
|
|
38
|
+
private xCoordInternal;
|
|
39
|
+
private yCoordInternal;
|
|
40
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataLabelState = void 0;
|
|
4
|
+
var NumberRange_1 = require("../../../../Core/NumberRange");
|
|
5
|
+
var parseColor_1 = require("../../../../utils/parseColor");
|
|
6
|
+
var DpiHelper_1 = require("../../TextureManager/DpiHelper");
|
|
7
|
+
var DataLabelState = /** @class */ (function () {
|
|
8
|
+
function DataLabelState(renderContext, renderPassData, style, color, yValues, parentSeries) {
|
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
10
|
+
this.dataLabels = [];
|
|
11
|
+
this.indexProperty = 0;
|
|
12
|
+
this.xCoordCache = undefined;
|
|
13
|
+
this.yCoordCache = undefined;
|
|
14
|
+
var pointSeries = renderPassData.pointSeries;
|
|
15
|
+
var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
16
|
+
this.style = DpiHelper_1.DpiHelper.adjustTextStyle(style);
|
|
17
|
+
this.color = (0, parseColor_1.parseColorToUIntArgb)(color);
|
|
18
|
+
this.xValues = isCategoryAxis ? pointSeries.indexes : pointSeries.xValues;
|
|
19
|
+
this.yValues = yValues;
|
|
20
|
+
this.parentSeries = parentSeries;
|
|
21
|
+
this.renderPassData = renderPassData;
|
|
22
|
+
this.yFinalValues = (_a = this.parentSeries.dataSeries) === null || _a === void 0 ? void 0 : _a.yFinalAnimationValues;
|
|
23
|
+
this.isXFlipped = (renderPassData.isVerticalChart
|
|
24
|
+
? this.renderPassData.yCoordinateCalculator
|
|
25
|
+
: this.renderPassData.xCoordinateCalculator).hasFlippedCoordinates;
|
|
26
|
+
if (!renderPassData.indexRange) {
|
|
27
|
+
var indicesRange = this.parentSeries.dataSeries.getIndicesRange(new NumberRange_1.NumberRange(renderPassData.xCoordinateCalculator.visibleMin, renderPassData.xCoordinateCalculator.visibleMax), isCategoryAxis);
|
|
28
|
+
this.indexStart = indicesRange.min;
|
|
29
|
+
this.indexEnd = indicesRange.max;
|
|
30
|
+
this.pointCount = indicesRange.diff;
|
|
31
|
+
if (this.pointCount > 1)
|
|
32
|
+
this.pointGap = Math.abs(this.xCoord(this.indexStart) - this.xCoord(this.indexEnd)) / this.pointCount;
|
|
33
|
+
else
|
|
34
|
+
this.pointGap = Infinity; // Single point
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.indexStart = 0;
|
|
38
|
+
this.pointCount = this.xValues.size();
|
|
39
|
+
this.indexEnd = this.pointCount - 1;
|
|
40
|
+
this.pointGap = Math.abs(this.xCoord(this.indexStart) - this.xCoord(this.indexEnd)) / this.pointCount;
|
|
41
|
+
}
|
|
42
|
+
this.index = this.indexStart;
|
|
43
|
+
this.font = renderContext.getFont(this.style);
|
|
44
|
+
this.xPadding = ((_c = (_b = this.style.padding) === null || _b === void 0 ? void 0 : _b.left) !== null && _c !== void 0 ? _c : 0) + ((_e = (_d = this.style.padding) === null || _d === void 0 ? void 0 : _d.right) !== null && _e !== void 0 ? _e : 0);
|
|
45
|
+
this.yPadding = ((_g = (_f = this.style.padding) === null || _f === void 0 ? void 0 : _f.top) !== null && _g !== void 0 ? _g : 0) + ((_j = (_h = this.style.padding) === null || _h === void 0 ? void 0 : _h.bottom) !== null && _j !== void 0 ? _j : 0);
|
|
46
|
+
}
|
|
47
|
+
Object.defineProperty(DataLabelState.prototype, "index", {
|
|
48
|
+
get: function () {
|
|
49
|
+
return this.indexProperty;
|
|
50
|
+
},
|
|
51
|
+
set: function (value) {
|
|
52
|
+
this.xCoordCache = undefined;
|
|
53
|
+
this.yCoordCache = undefined;
|
|
54
|
+
this.indexProperty = value;
|
|
55
|
+
},
|
|
56
|
+
enumerable: false,
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
DataLabelState.prototype.xVal = function (index) {
|
|
60
|
+
var i = index !== null && index !== void 0 ? index : this.indexProperty;
|
|
61
|
+
if (!this.isXFlipped) {
|
|
62
|
+
i = this.indexEnd - (i - this.indexStart);
|
|
63
|
+
}
|
|
64
|
+
return this.xValues.get(i);
|
|
65
|
+
};
|
|
66
|
+
DataLabelState.prototype.yVal = function (index) {
|
|
67
|
+
var i = index !== null && index !== void 0 ? index : this.indexProperty;
|
|
68
|
+
if (!this.isXFlipped) {
|
|
69
|
+
i = this.indexEnd - (i - this.indexStart);
|
|
70
|
+
}
|
|
71
|
+
return this.yValues.get(i);
|
|
72
|
+
};
|
|
73
|
+
DataLabelState.prototype.yValAfterAnimation = function (index) {
|
|
74
|
+
if (!this.yFinalValues)
|
|
75
|
+
return this.yVal(index);
|
|
76
|
+
var i = index !== null && index !== void 0 ? index : this.indexProperty;
|
|
77
|
+
if (!this.isXFlipped) {
|
|
78
|
+
i = this.indexEnd - (i - this.indexStart);
|
|
79
|
+
}
|
|
80
|
+
return this.yFinalValues.get(i);
|
|
81
|
+
};
|
|
82
|
+
DataLabelState.prototype.xCoord = function (index) {
|
|
83
|
+
if (this.renderPassData.isVerticalChart)
|
|
84
|
+
return this.yCoordInternal(index);
|
|
85
|
+
else
|
|
86
|
+
return this.xCoordInternal(index);
|
|
87
|
+
};
|
|
88
|
+
DataLabelState.prototype.yCoord = function (index) {
|
|
89
|
+
if (this.renderPassData.isVerticalChart)
|
|
90
|
+
return this.xCoordInternal(index);
|
|
91
|
+
else
|
|
92
|
+
return this.yCoordInternal(index);
|
|
93
|
+
};
|
|
94
|
+
DataLabelState.prototype.hasNext = function (index) {
|
|
95
|
+
var i = index !== null && index !== void 0 ? index : this.indexProperty;
|
|
96
|
+
if (!this.isXFlipped)
|
|
97
|
+
return i > 0;
|
|
98
|
+
else
|
|
99
|
+
return i < this.indexEnd;
|
|
100
|
+
};
|
|
101
|
+
Object.defineProperty(DataLabelState.prototype, "lastLabel", {
|
|
102
|
+
get: function () {
|
|
103
|
+
if (this.dataLabels.length > 0) {
|
|
104
|
+
return this.dataLabels[this.dataLabels.length - 1];
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
enumerable: false,
|
|
111
|
+
configurable: true
|
|
112
|
+
});
|
|
113
|
+
DataLabelState.prototype.getMetaData = function () {
|
|
114
|
+
var index = this.renderPassData.pointSeries.indexes.get(this.index);
|
|
115
|
+
return this.parentSeries.dataSeries.getMetadataAt(index);
|
|
116
|
+
};
|
|
117
|
+
DataLabelState.prototype.xCoordInternal = function (index) {
|
|
118
|
+
if (index !== undefined)
|
|
119
|
+
return this.renderPassData.xCoordinateCalculator.getCoordinate(this.xVal(index));
|
|
120
|
+
else {
|
|
121
|
+
if (this.xCoordCache !== undefined)
|
|
122
|
+
return this.xCoordCache;
|
|
123
|
+
else
|
|
124
|
+
this.xCoordCache = this.renderPassData.xCoordinateCalculator.getCoordinate(this.xVal());
|
|
125
|
+
return this.xCoordCache;
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
DataLabelState.prototype.yCoordInternal = function (index) {
|
|
129
|
+
if (index !== undefined)
|
|
130
|
+
return this.renderPassData.yCoordinateCalculator.getCoordinate(this.yVal(index));
|
|
131
|
+
else {
|
|
132
|
+
if (this.yCoordCache !== undefined)
|
|
133
|
+
return this.yCoordCache;
|
|
134
|
+
else
|
|
135
|
+
this.yCoordCache = this.renderPassData.yCoordinateCalculator.getCoordinate(this.yVal());
|
|
136
|
+
return this.yCoordCache;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
return DataLabelState;
|
|
140
|
+
}());
|
|
141
|
+
exports.DataLabelState = DataLabelState;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Point } from "../../../../Core/Point";
|
|
2
|
+
import { EDataLabelProviderType } from "../../../../types/DataLabelProviderType";
|
|
3
|
+
import { ENumericFormat } from "../../../../types/NumericFormat";
|
|
4
|
+
import { Size } from "../../../../types/Size";
|
|
5
|
+
import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
|
|
6
|
+
import { BaseHeatmapDataSeries } from "../../../Model/BaseHeatmapDataSeries";
|
|
7
|
+
import { IPointMetadata } from "../../../Model/IPointMetadata";
|
|
8
|
+
import { RenderPassData } from "../../../Services/RenderPassData";
|
|
9
|
+
import { BaseDataLabelProvider, IBaseDataLabelProviderOptions, TDataLabel } from "./BaseDataLabelProvider";
|
|
10
|
+
export interface IHeatmapDataLabelProviderOptions extends IBaseDataLabelProviderOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Gets or sets numeric format to use for formatting values to text. For a list of values, see {@link ENumericFormat}
|
|
13
|
+
*/
|
|
14
|
+
numericFormat?: ENumericFormat;
|
|
15
|
+
/**
|
|
16
|
+
* Gets or sets the precision to use when formatting values to text.
|
|
17
|
+
*/
|
|
18
|
+
precision?: number;
|
|
19
|
+
/**
|
|
20
|
+
* If this is set it will be used to get text values from metaData, rather than formatting y values.
|
|
21
|
+
* The selector will be called even if the metaData for an index is undefined.
|
|
22
|
+
*/
|
|
23
|
+
metaDataSelector?: (metadata: IPointMetadata) => string;
|
|
24
|
+
}
|
|
25
|
+
export declare class HeatMapDataLabelProvider extends BaseDataLabelProvider {
|
|
26
|
+
readonly type: EDataLabelProviderType;
|
|
27
|
+
/**
|
|
28
|
+
* If this is set it will be used to get text values from metaData, rather than formatting y values.
|
|
29
|
+
* The selector will be called even if the metaData for an index is undefined.
|
|
30
|
+
*/
|
|
31
|
+
metaDataSelector: (metadata: IPointMetadata) => string;
|
|
32
|
+
protected dataSeries: BaseHeatmapDataSeries;
|
|
33
|
+
protected zValues: number[][];
|
|
34
|
+
protected colorValue: number;
|
|
35
|
+
private numericFormatProperty;
|
|
36
|
+
private precisionProperty;
|
|
37
|
+
constructor(options?: IHeatmapDataLabelProviderOptions);
|
|
38
|
+
/**
|
|
39
|
+
* Gets or sets numeric format to use when formatting values to text. For a list of values, see {@link ENumericFormat}
|
|
40
|
+
* For more control, override getText
|
|
41
|
+
*/
|
|
42
|
+
get numericFormat(): ENumericFormat;
|
|
43
|
+
set numericFormat(value: ENumericFormat);
|
|
44
|
+
/**
|
|
45
|
+
* Gets or sets the precision to use when formatting values to text
|
|
46
|
+
* For more control, override getText
|
|
47
|
+
*/
|
|
48
|
+
get precision(): number;
|
|
49
|
+
set precision(value: number);
|
|
50
|
+
getText(xIndex: number, yIndex: number): string;
|
|
51
|
+
getPosition(xIndex: number, yIndex: number, xVal: number, yVal: number, textSize: Size, cellWidth: number, cellHeight: number, renderPassData: RenderPassData): Point;
|
|
52
|
+
shouldGenerate(textSize: Size, cellWidth: number, cellHeight: number): boolean;
|
|
53
|
+
getColor(xIndex: number, yIndex: number, text: string): number;
|
|
54
|
+
shouldSkipLabel(xIndex: number, yIndex: number, label: TDataLabel, cellWidth: number, cellHeight: number): boolean;
|
|
55
|
+
generateDataLabels(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
|
|
56
|
+
toJSON(): {
|
|
57
|
+
type: EDataLabelProviderType;
|
|
58
|
+
options: {
|
|
59
|
+
style: import("../../../../types/TDataLabelStyle").TDataLabelStyle;
|
|
60
|
+
color: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}
|