scichart 2.2.2417 → 3.0.0-beta.224
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 +83 -10
- 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 +40 -0
- package/Charting/ChartModifiers/RolloverModifier.js +40 -3
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +2 -1
- 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 +92 -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 +16 -17
- 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/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 +225 -7
- package/Charting/Visuals/SciChartSurface.js +782 -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 +199 -30
- 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/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 +8 -0
- package/utils/translate.js +27 -5
- package/utils/zeroArray2D.d.ts +5 -0
- package/utils/zeroArray2D.js +5 -0
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.FastImpulseRenderableSeries = void 0;
|
|
19
19
|
var NumberRange_1 = require("../../../Core/NumberRange");
|
|
20
20
|
var SeriesType_1 = require("../../../types/SeriesType");
|
|
21
|
+
var IThemeProvider_1 = require("../../Themes/IThemeProvider");
|
|
21
22
|
var EllipsePointMarker_1 = require("../PointMarkers/EllipsePointMarker");
|
|
22
23
|
var SciChartSurfaceBase_1 = require("../SciChartSurfaceBase");
|
|
23
24
|
var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
|
|
@@ -54,8 +55,9 @@ var FastImpulseRenderableSeries = /** @class */ (function (_super) {
|
|
|
54
55
|
* @param options optional parameters of type {@link IImpulseRenderableSeries} applied when constructing the series type
|
|
55
56
|
*/
|
|
56
57
|
function FastImpulseRenderableSeries(webAssemblyContext, options) {
|
|
58
|
+
var _this = this;
|
|
57
59
|
var _a, _b, _c, _d;
|
|
58
|
-
|
|
60
|
+
_this = _super.call(this, webAssemblyContext, options) || this;
|
|
59
61
|
/** @inheritDoc */
|
|
60
62
|
_this.type = SeriesType_1.ESeriesType.ImpulseSeries;
|
|
61
63
|
_this.impulseFillProperty = SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.impulseFillBrush;
|
|
@@ -82,7 +84,7 @@ var FastImpulseRenderableSeries = /** @class */ (function (_super) {
|
|
|
82
84
|
* Gets or sets the color of each impulse
|
|
83
85
|
*/
|
|
84
86
|
get: function () {
|
|
85
|
-
return this.impulseFillProperty;
|
|
87
|
+
return (0, IThemeProvider_1.stripAutoColor)(this.impulseFillProperty);
|
|
86
88
|
},
|
|
87
89
|
set: function (htmlColorCode) {
|
|
88
90
|
this.impulseFillProperty = htmlColorCode;
|
|
@@ -119,10 +121,11 @@ var FastImpulseRenderableSeries = /** @class */ (function (_super) {
|
|
|
119
121
|
* @inheritDoc
|
|
120
122
|
*/
|
|
121
123
|
FastImpulseRenderableSeries.prototype.getXRange = function () {
|
|
124
|
+
var _a, _b;
|
|
122
125
|
var range = _super.prototype.getXRange.call(this);
|
|
123
126
|
var delta = (0, BaseRenderableSeries_1.getDelta)({
|
|
124
127
|
pointSize: this.size,
|
|
125
|
-
areaSize: this.parentSurface.seriesViewRect.width,
|
|
128
|
+
areaSize: (_b = (_a = this.parentSurface.seriesViewRect) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 0,
|
|
126
129
|
range: range
|
|
127
130
|
});
|
|
128
131
|
return new NumberRange_1.NumberRange(range.min - delta, range.max + delta);
|
|
@@ -131,6 +134,7 @@ var FastImpulseRenderableSeries = /** @class */ (function (_super) {
|
|
|
131
134
|
* @inheritDoc
|
|
132
135
|
*/
|
|
133
136
|
FastImpulseRenderableSeries.prototype.getYRange = function (xVisibleRange, isXCategoryAxis) {
|
|
137
|
+
var _a, _b;
|
|
134
138
|
if (isXCategoryAxis === void 0) { isXCategoryAxis = false; }
|
|
135
139
|
var yRange = _super.prototype.getYRange.call(this, xVisibleRange, isXCategoryAxis);
|
|
136
140
|
if (!yRange) {
|
|
@@ -138,7 +142,7 @@ var FastImpulseRenderableSeries = /** @class */ (function (_super) {
|
|
|
138
142
|
}
|
|
139
143
|
var delta = (0, BaseRenderableSeries_1.getDelta)({
|
|
140
144
|
pointSize: this.size,
|
|
141
|
-
areaSize: this.parentSurface.seriesViewRect.height,
|
|
145
|
+
areaSize: (_b = (_a = this.parentSurface.seriesViewRect) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : 0,
|
|
142
146
|
range: yRange
|
|
143
147
|
});
|
|
144
148
|
return new NumberRange_1.NumberRange(yRange.min - delta, yRange.max + delta);
|
|
@@ -164,6 +168,14 @@ var FastImpulseRenderableSeries = /** @class */ (function (_super) {
|
|
|
164
168
|
}
|
|
165
169
|
};
|
|
166
170
|
/** @inheritDoc */
|
|
171
|
+
FastImpulseRenderableSeries.prototype.resolveAutoColors = function (index, maxSeries, theme) {
|
|
172
|
+
_super.prototype.resolveAutoColors.call(this, index, maxSeries, theme);
|
|
173
|
+
if (this.impulseFillProperty.startsWith(IThemeProvider_1.AUTO_COLOR)) {
|
|
174
|
+
var color = theme.getStrokeColor(index, maxSeries, this.webAssemblyContext);
|
|
175
|
+
this.fill = IThemeProvider_1.AUTO_COLOR + this.adjustAutoColor("impulseFill", color);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
/** @inheritDoc */
|
|
167
179
|
FastImpulseRenderableSeries.prototype.newHitTestProvider = function () {
|
|
168
180
|
return new ImpulseSeriesHitTestProvider_1.ImpulseSeriesHitTestProvider(this, this.webAssemblyContext);
|
|
169
181
|
};
|
|
@@ -49,8 +49,9 @@ var FastLineRenderableSeries = /** @class */ (function (_super) {
|
|
|
49
49
|
* @param options optional parameters of type {@link IFastLineRenderableSeriesOptions} applied when constructing the series type
|
|
50
50
|
*/
|
|
51
51
|
function FastLineRenderableSeries(webAssemblyContext, options) {
|
|
52
|
+
var _this = this;
|
|
52
53
|
var _a, _b;
|
|
53
|
-
|
|
54
|
+
_this = _super.call(this, webAssemblyContext, options) || this;
|
|
54
55
|
_this.type = SeriesType_1.ESeriesType.LineSeries;
|
|
55
56
|
// Must be called here for the series type to be available
|
|
56
57
|
if ((_a = _this.paletteProvider) === null || _a === void 0 ? void 0 : _a.onAttached) {
|
|
@@ -48,8 +48,9 @@ var FastMountainRenderableSeries = /** @class */ (function (_super) {
|
|
|
48
48
|
* @param options optional parameters of type {@link IMountainRenderableSeriesOptions} applied when constructing the series type
|
|
49
49
|
*/
|
|
50
50
|
function FastMountainRenderableSeries(webAssemblyContext, options) {
|
|
51
|
+
var _this = this;
|
|
51
52
|
var _a, _b;
|
|
52
|
-
|
|
53
|
+
_this = _super.call(this, webAssemblyContext, options) || this;
|
|
53
54
|
_this.type = SeriesType_1.ESeriesType.MountainSeries;
|
|
54
55
|
// Must be called here for the series type to be available
|
|
55
56
|
if ((_a = _this.paletteProvider) === null || _a === void 0 ? void 0 : _a.onAttached) {
|
|
@@ -48,8 +48,9 @@ var FastOhlcRenderableSeries = /** @class */ (function (_super) {
|
|
|
48
48
|
* @param options optional parameters of type {@link IOhlcRenderableSeriesOptions} applied when constructing the series type
|
|
49
49
|
*/
|
|
50
50
|
function FastOhlcRenderableSeries(webAssemblyContext, options) {
|
|
51
|
+
var _this = this;
|
|
51
52
|
var _a, _b;
|
|
52
|
-
|
|
53
|
+
_this = _super.call(this, webAssemblyContext, options) || this;
|
|
53
54
|
_this.type = SeriesType_1.ESeriesType.OhlcSeries;
|
|
54
55
|
// Must be called here for the series type to be available
|
|
55
56
|
if ((_a = _this.paletteProvider) === null || _a === void 0 ? void 0 : _a.onAttached) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ESeriesType } from "../../../types/SeriesType";
|
|
2
|
+
import { TSciChart } from "../../../types/TSciChart";
|
|
3
|
+
import { BaseRenderableSeries } from "./BaseRenderableSeries";
|
|
4
|
+
import { ITextDataLabelProviderOptions } from "./DataLabels/TextDataLabelProvider";
|
|
5
|
+
import { IHitTestProvider } from "./HitTest/IHitTestProvider";
|
|
6
|
+
import { IBaseRenderableSeriesOptions } from "./IBaseRenderableSeriesOptions";
|
|
7
|
+
export interface ITextRenderableSeriesOptions extends IBaseRenderableSeriesOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Options to pass to the DataLabelProvider. Set a style with font and size to enable per-point text for this series.
|
|
10
|
+
*/
|
|
11
|
+
dataLabels?: ITextDataLabelProviderOptions;
|
|
12
|
+
}
|
|
13
|
+
export declare class FastTextRenderableSeries extends BaseRenderableSeries {
|
|
14
|
+
type: ESeriesType;
|
|
15
|
+
constructor(webAssemblyContext: TSciChart, options?: ITextRenderableSeriesOptions);
|
|
16
|
+
protected newHitTestProvider(): IHitTestProvider;
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.FastTextRenderableSeries = void 0;
|
|
19
|
+
var SeriesType_1 = require("../../../types/SeriesType");
|
|
20
|
+
var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
|
|
21
|
+
var TextDataLabelProvider_1 = require("./DataLabels/TextDataLabelProvider");
|
|
22
|
+
var PointMarkerDrawingProvider_1 = require("./DrawingProviders/PointMarkerDrawingProvider");
|
|
23
|
+
var TextSeriesHitTestProvider_1 = require("./HitTest/TextSeriesHitTestProvider");
|
|
24
|
+
var FastTextRenderableSeries = /** @class */ (function (_super) {
|
|
25
|
+
__extends(FastTextRenderableSeries, _super);
|
|
26
|
+
function FastTextRenderableSeries(webAssemblyContext, options) {
|
|
27
|
+
var _this = _super.call(this, webAssemblyContext, options) || this;
|
|
28
|
+
_this.type = SeriesType_1.ESeriesType.TextSeries;
|
|
29
|
+
_this.drawingProviders = [];
|
|
30
|
+
_this.drawingProviders.push(new PointMarkerDrawingProvider_1.PointMarkerDrawingProvider(webAssemblyContext, _this));
|
|
31
|
+
if (!_this.dataLabelProviderProperty) {
|
|
32
|
+
_this.dataLabelProviderProperty = new TextDataLabelProvider_1.TextDataLabelProvider(options === null || options === void 0 ? void 0 : options.dataLabels);
|
|
33
|
+
_this.dataLabelProviderProperty.onAttach(_this.webAssemblyContext, _this);
|
|
34
|
+
}
|
|
35
|
+
if (options === null || options === void 0 ? void 0 : options.animation) {
|
|
36
|
+
_this.animationQueue.push(options.animation);
|
|
37
|
+
}
|
|
38
|
+
return _this;
|
|
39
|
+
}
|
|
40
|
+
FastTextRenderableSeries.prototype.newHitTestProvider = function () {
|
|
41
|
+
return new TextSeriesHitTestProvider_1.TextSeriesHitTestProvider(this, this.webAssemblyContext);
|
|
42
|
+
};
|
|
43
|
+
return FastTextRenderableSeries;
|
|
44
|
+
}(BaseRenderableSeries_1.BaseRenderableSeries));
|
|
45
|
+
exports.FastTextRenderableSeries = FastTextRenderableSeries;
|
|
@@ -6,8 +6,9 @@ var PropertyChangedEventArgs_1 = require("../../../Core/PropertyChangedEventArgs
|
|
|
6
6
|
var constants_1 = require("./constants");
|
|
7
7
|
var HeatmapColorMap = /** @class */ (function () {
|
|
8
8
|
function HeatmapColorMap(options) {
|
|
9
|
-
|
|
10
|
-
this.
|
|
9
|
+
var _a, _b;
|
|
10
|
+
this.minimumProperty = (_a = options === null || options === void 0 ? void 0 : options.minimum) !== null && _a !== void 0 ? _a : 0;
|
|
11
|
+
this.maximumProperty = (_b = options === null || options === void 0 ? void 0 : options.maximum) !== null && _b !== void 0 ? _b : 100;
|
|
11
12
|
this.gradientStops = (options === null || options === void 0 ? void 0 : options.gradientStops) || [
|
|
12
13
|
{ offset: 0, color: "Red" },
|
|
13
14
|
{ offset: 1, color: "Green" }
|
|
@@ -45,13 +45,22 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
45
45
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
46
46
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
47
47
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
48
|
+
var y1NativeValues = dataSeries.getNativeY1Values();
|
|
48
49
|
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
|
|
49
|
-
if (nearestPointIndex >= 0) {
|
|
50
|
-
hitTestInfo.y1Value =
|
|
50
|
+
if (dataSeries.dataDistributionCalculator.isSortedAscending && nearestPointIndex >= 0) {
|
|
51
|
+
hitTestInfo.y1Value = y1NativeValues.get(nearestPointIndex);
|
|
51
52
|
hitTestInfo.y1Coord = yCoordinateCalculator.getCoordinate(hitTestInfo.y1Value);
|
|
52
|
-
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), function (index) { return
|
|
53
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), function (index) { return yNativeValues.get(index); }, function (index) { return y1NativeValues.get(index); }, nearestPointIndex, xHitCoord, yHitCoord);
|
|
53
54
|
hitTestInfo.isHit = hitRes.isHit;
|
|
54
55
|
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
56
|
+
if (hitRes.secondPointIndex !== undefined) {
|
|
57
|
+
hitTestInfo.point2xValue = xNativeValues.get(hitRes.secondPointIndex);
|
|
58
|
+
hitTestInfo.point2xCoord = xCoordinateCalculator.getCoordinate(hitTestInfo.point2xValue);
|
|
59
|
+
hitTestInfo.point2yValue = yNativeValues.get(hitRes.secondPointIndex);
|
|
60
|
+
hitTestInfo.point2yCoord = yCoordinateCalculator.getCoordinate(hitTestInfo.point2yValue);
|
|
61
|
+
hitTestInfo.point2y1Value = y1NativeValues.get(hitRes.secondPointIndex);
|
|
62
|
+
hitTestInfo.point2y1Coord = yCoordinateCalculator.getCoordinate(hitTestInfo.point2y1Value);
|
|
63
|
+
}
|
|
55
64
|
}
|
|
56
65
|
else {
|
|
57
66
|
hitTestInfo.isHit = false;
|
|
@@ -104,15 +113,36 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
104
113
|
return HitTestInfo_1.HitTestInfo.empty();
|
|
105
114
|
}
|
|
106
115
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
107
|
-
var
|
|
116
|
+
var xNativeValues = dataSeries.getNativeXValues();
|
|
117
|
+
var yNativeValues = dataSeries.getNativeYValues();
|
|
118
|
+
var y1NativeValues = dataSeries.getNativeY1Values();
|
|
119
|
+
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
|
|
108
120
|
if (nearestPointIndex >= 0) {
|
|
109
121
|
hitTestInfo.isHit = hitTestInfo.isWithinDataBounds;
|
|
110
|
-
hitTestInfo.y1Value =
|
|
122
|
+
hitTestInfo.y1Value = y1NativeValues.get(nearestPointIndex);
|
|
111
123
|
hitTestInfo.y1Coord = yCoordinateCalculator.getCoordinate(hitTestInfo.y1Value);
|
|
112
124
|
}
|
|
113
125
|
else {
|
|
114
126
|
hitTestInfo.isHit = false;
|
|
115
127
|
}
|
|
128
|
+
if (dataSeries.dataDistributionCalculator.isSortedAscending && nearestPointIndex >= 0) {
|
|
129
|
+
var dataSeriesCount = xNativeValues.size();
|
|
130
|
+
var xValue = xNativeValues.get(nearestPointIndex);
|
|
131
|
+
var xHitValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
132
|
+
if (!(nearestPointIndex === dataSeriesCount - 1 && xHitValue >= xValue) &&
|
|
133
|
+
!(nearestPointIndex === 0 && xHitValue <= xValue)) {
|
|
134
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, 0);
|
|
135
|
+
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
136
|
+
if (hitRes.secondPointIndex !== undefined) {
|
|
137
|
+
hitTestInfo.point2xValue = xNativeValues.get(hitRes.secondPointIndex);
|
|
138
|
+
hitTestInfo.point2xCoord = xCoordinateCalculator.getCoordinate(hitTestInfo.point2xValue);
|
|
139
|
+
hitTestInfo.point2yValue = yNativeValues.get(hitRes.secondPointIndex);
|
|
140
|
+
hitTestInfo.point2yCoord = yCoordinateCalculator.getCoordinate(hitTestInfo.point2yValue);
|
|
141
|
+
hitTestInfo.point2y1Value = y1NativeValues.get(hitRes.secondPointIndex);
|
|
142
|
+
hitTestInfo.point2y1Coord = yCoordinateCalculator.getCoordinate(hitTestInfo.point2y1Value);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
116
146
|
return hitTestInfo;
|
|
117
147
|
};
|
|
118
148
|
return BandSeriesHitTestProvider;
|
|
@@ -78,8 +78,24 @@ var BaseHitTestProvider = /** @class */ (function () {
|
|
|
78
78
|
return HitTestInfo_1.HitTestInfo.empty();
|
|
79
79
|
}
|
|
80
80
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
81
|
-
var
|
|
81
|
+
var xNativeValues = dataSeries.getNativeXValues();
|
|
82
|
+
var yNativeValues = dataSeries.getNativeYValues();
|
|
83
|
+
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
|
|
82
84
|
hitTestInfo.isHit = hitTestInfo.isWithinDataBounds;
|
|
85
|
+
if (dataSeries.dataDistributionCalculator.isSortedAscending && nearestPointIndex >= 0) {
|
|
86
|
+
var dataSeriesCount = xNativeValues.size();
|
|
87
|
+
var xValue = xNativeValues.get(nearestPointIndex);
|
|
88
|
+
var xHitValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
89
|
+
if (!(nearestPointIndex === dataSeriesCount - 1 && xHitValue >= xValue) &&
|
|
90
|
+
!(nearestPointIndex === 0 && xHitValue <= xValue)) {
|
|
91
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, 0);
|
|
92
|
+
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
93
|
+
hitTestInfo.point2xValue = xNativeValues.get(hitRes.secondPointIndex);
|
|
94
|
+
hitTestInfo.point2xCoord = xCoordinateCalculator.getCoordinate(hitTestInfo.point2xValue);
|
|
95
|
+
hitTestInfo.point2yValue = yNativeValues.get(hitRes.secondPointIndex);
|
|
96
|
+
hitTestInfo.point2yCoord = yCoordinateCalculator.getCoordinate(hitTestInfo.point2yValue);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
83
99
|
return hitTestInfo;
|
|
84
100
|
};
|
|
85
101
|
BaseHitTestProvider.prototype.getTranslatedHitTestPoint = function (x, y) {
|
|
@@ -62,6 +62,10 @@ export declare class HitTestInfo {
|
|
|
62
62
|
* The Y1-coordinate result of the hit-test operation
|
|
63
63
|
*/
|
|
64
64
|
y1Coord: number;
|
|
65
|
+
/**
|
|
66
|
+
* The Y1-coordinate result of the hit-test operation for the second data point, X-coordinate for vertical chart
|
|
67
|
+
*/
|
|
68
|
+
point2y1Coord: number;
|
|
65
69
|
/**
|
|
66
70
|
* The X-value result of the hit-test operation
|
|
67
71
|
*/
|
|
@@ -86,6 +90,10 @@ export declare class HitTestInfo {
|
|
|
86
90
|
* XYY Series only: the Y1-value result of the hit-test operation
|
|
87
91
|
*/
|
|
88
92
|
y1Value: number;
|
|
93
|
+
/**
|
|
94
|
+
* The Y1-value result of the hit-test operation for the second data point
|
|
95
|
+
*/
|
|
96
|
+
point2y1Value: number;
|
|
89
97
|
/**
|
|
90
98
|
* XYZ Series only: the Z-value result of the hit-test operation
|
|
91
99
|
*/
|
|
@@ -47,10 +47,16 @@ var MountainSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
47
47
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
48
48
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
49
49
|
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(renderableSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
|
|
50
|
-
if (nearestPointIndex >= 0) {
|
|
50
|
+
if (dataSeries.dataDistributionCalculator.isSortedAscending && nearestPointIndex >= 0) {
|
|
51
51
|
var res = hitTestHelpers_1.hitTestHelpers.testIsHitForMountain(this.parentSeries.isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, dataSeries, renderableSeries.zeroLineY, nearestPointIndex, xHitCoord, yHitCoord);
|
|
52
52
|
hitTestInfo.isHit = res.isHit;
|
|
53
53
|
hitTestInfo.point2dataSeriesIndex = res.secondPointIndex;
|
|
54
|
+
if (res.secondPointIndex !== undefined) {
|
|
55
|
+
hitTestInfo.point2xValue = xNativeValues.get(res.secondPointIndex);
|
|
56
|
+
hitTestInfo.point2xCoord = xCoordinateCalculator.getCoordinate(hitTestInfo.point2xValue);
|
|
57
|
+
hitTestInfo.point2yValue = yNativeValues.get(res.secondPointIndex);
|
|
58
|
+
hitTestInfo.point2yCoord = yCoordinateCalculator.getCoordinate(hitTestInfo.point2yValue);
|
|
59
|
+
}
|
|
54
60
|
}
|
|
55
61
|
else {
|
|
56
62
|
hitTestInfo.isHit = false;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NonUniformHeatmapRenderableSeries } from "../NonUniformHeatmapRenderableSeries";
|
|
2
|
+
import { BaseHitTestProvider } from "./BaseHitTestProvider";
|
|
3
|
+
import { HitTestInfo } from "./HitTestInfo";
|
|
4
|
+
/**
|
|
5
|
+
* Hit-test provider for {@link UniformHeatmapRenderableSeries}. See base class {@link BaseHitTestProvider} for further info
|
|
6
|
+
*/
|
|
7
|
+
export declare class NonUniformHeatmapHitTestProvider extends BaseHitTestProvider<NonUniformHeatmapRenderableSeries> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
hitTest(x: number, y: number): HitTestInfo;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
hitTestDataPoint(x: number, y: number): HitTestInfo;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
hitTestXSlice(x: number, y: number): HitTestInfo;
|
|
20
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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.NonUniformHeatmapHitTestProvider = void 0;
|
|
19
|
+
var Point_1 = require("../../../../Core/Point");
|
|
20
|
+
var BaseHitTestProvider_1 = require("./BaseHitTestProvider");
|
|
21
|
+
var hitTestHelpers_1 = require("./hitTestHelpers");
|
|
22
|
+
var HitTestInfo_1 = require("./HitTestInfo");
|
|
23
|
+
/**
|
|
24
|
+
* Hit-test provider for {@link UniformHeatmapRenderableSeries}. See base class {@link BaseHitTestProvider} for further info
|
|
25
|
+
*/
|
|
26
|
+
var NonUniformHeatmapHitTestProvider = /** @class */ (function (_super) {
|
|
27
|
+
__extends(NonUniformHeatmapHitTestProvider, _super);
|
|
28
|
+
function NonUniformHeatmapHitTestProvider() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
NonUniformHeatmapHitTestProvider.prototype.hitTest = function (x, y) {
|
|
35
|
+
var hitTestPoint = this.getTranslatedHitTestPoint(x, y);
|
|
36
|
+
if (!hitTestPoint) {
|
|
37
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
38
|
+
}
|
|
39
|
+
var _a = this.currentRenderPassData, xCoordinateCalculator = _a.xCoordinateCalculator, yCoordinateCalculator = _a.yCoordinateCalculator, isVerticalChart = _a.isVerticalChart;
|
|
40
|
+
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
41
|
+
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
42
|
+
var dataSeries = this.parentSeries.dataSeries;
|
|
43
|
+
if (!dataSeries) {
|
|
44
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
45
|
+
}
|
|
46
|
+
var heatmapPoint = hitTestHelpers_1.hitTestHelpers.getNearestNonUniformHeatmapPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
47
|
+
var xIndex = heatmapPoint.xIndex, yIndex = heatmapPoint.yIndex, zValue = heatmapPoint.zValue;
|
|
48
|
+
var hitTestInfo = new HitTestInfo_1.HitTestInfo(this.parentSeries);
|
|
49
|
+
hitTestInfo.dataSeriesName = this.parentSeries.type;
|
|
50
|
+
hitTestInfo.dataSeriesType = dataSeries.type;
|
|
51
|
+
hitTestInfo.hitTestPoint = new Point_1.Point(xHitCoord, yHitCoord);
|
|
52
|
+
var hitTestPointXValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
53
|
+
var hitTestPointYValue = yCoordinateCalculator.getDataValue(yHitCoord);
|
|
54
|
+
hitTestInfo.hitTestPointValues = new Point_1.Point(hitTestPointXValue, hitTestPointYValue);
|
|
55
|
+
hitTestInfo.xValue = hitTestPointXValue;
|
|
56
|
+
hitTestInfo.yValue = hitTestPointYValue;
|
|
57
|
+
hitTestInfo.heatmapXIndex = xIndex;
|
|
58
|
+
hitTestInfo.heatmapYIndex = yIndex;
|
|
59
|
+
hitTestInfo.zValue = zValue;
|
|
60
|
+
// TODO: set correct heatmapValue
|
|
61
|
+
hitTestInfo.heatmapValue = zValue;
|
|
62
|
+
// TODO maybe calculate coordinates of the cell center?
|
|
63
|
+
hitTestInfo.xCoord = xHitCoord;
|
|
64
|
+
hitTestInfo.yCoord = yHitCoord;
|
|
65
|
+
hitTestInfo.isHit = xIndex !== -1 && yIndex !== -1;
|
|
66
|
+
hitTestInfo.isWithinDataBounds = hitTestInfo.isHit;
|
|
67
|
+
if (xIndex !== -1 && yIndex !== -1) {
|
|
68
|
+
hitTestInfo.metadata = dataSeries.getMetadataAt(yIndex, xIndex);
|
|
69
|
+
}
|
|
70
|
+
return hitTestInfo;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* @inheritDoc
|
|
74
|
+
*/
|
|
75
|
+
NonUniformHeatmapHitTestProvider.prototype.hitTestDataPoint = function (x, y) {
|
|
76
|
+
throw Error("hitTestDataPoint method is not supported for NonUniformHeatmapHitTestProvider");
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @inheritDoc
|
|
80
|
+
*/
|
|
81
|
+
NonUniformHeatmapHitTestProvider.prototype.hitTestXSlice = function (x, y) {
|
|
82
|
+
return this.hitTest(x, y);
|
|
83
|
+
};
|
|
84
|
+
return NonUniformHeatmapHitTestProvider;
|
|
85
|
+
}(BaseHitTestProvider_1.BaseHitTestProvider));
|
|
86
|
+
exports.NonUniformHeatmapHitTestProvider = NonUniformHeatmapHitTestProvider;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseRenderableSeries } from "../BaseRenderableSeries";
|
|
2
|
+
import { BaseHitTestProvider } from "./BaseHitTestProvider";
|
|
3
|
+
import { HitTestInfo } from "./HitTestInfo";
|
|
4
|
+
export declare class TextSeriesHitTestProvider extends BaseHitTestProvider<BaseRenderableSeries> {
|
|
5
|
+
hitTest(x: number, y: number, hitTestRadius?: number): HitTestInfo;
|
|
6
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.TextSeriesHitTestProvider = void 0;
|
|
19
|
+
var pointUtil_1 = require("../../../../utils/pointUtil");
|
|
20
|
+
var BaseHitTestProvider_1 = require("./BaseHitTestProvider");
|
|
21
|
+
var hitTestHelpers_1 = require("./hitTestHelpers");
|
|
22
|
+
var HitTestInfo_1 = require("./HitTestInfo");
|
|
23
|
+
var TextSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
24
|
+
__extends(TextSeriesHitTestProvider, _super);
|
|
25
|
+
function TextSeriesHitTestProvider() {
|
|
26
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
+
}
|
|
28
|
+
TextSeriesHitTestProvider.prototype.hitTest = function (x, y, hitTestRadius) {
|
|
29
|
+
var hitTestPoint = this.getTranslatedHitTestPoint(x, y);
|
|
30
|
+
if (!hitTestPoint) {
|
|
31
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
32
|
+
}
|
|
33
|
+
var _a = this.currentRenderPassData, xCoordinateCalculator = _a.xCoordinateCalculator, yCoordinateCalculator = _a.yCoordinateCalculator, isVerticalChart = _a.isVerticalChart;
|
|
34
|
+
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
35
|
+
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
36
|
+
var dataSeries = this.parentSeries.dataSeries;
|
|
37
|
+
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
38
|
+
var xNativeValues = dataSeries.getNativeXValues();
|
|
39
|
+
var yNativeValues = dataSeries.getNativeYValues();
|
|
40
|
+
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, hitTestRadius);
|
|
41
|
+
var labels = this.parentSeries.dataLabelProvider.dataLabels;
|
|
42
|
+
var isHit = false;
|
|
43
|
+
for (var _i = 0, labels_1 = labels; _i < labels_1.length; _i++) {
|
|
44
|
+
var label = labels_1[_i];
|
|
45
|
+
var _b = label.rect, left = _b.left, top_1 = _b.top, right = _b.right, bottom = _b.bottom;
|
|
46
|
+
if ((0, pointUtil_1.testIsInBounds)(hitTestPoint.x, hitTestPoint.y, left, top_1, right, bottom)) {
|
|
47
|
+
isHit = true;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
hitTestInfo.isHit = isHit;
|
|
52
|
+
return hitTestInfo;
|
|
53
|
+
};
|
|
54
|
+
return TextSeriesHitTestProvider;
|
|
55
|
+
}(BaseHitTestProvider_1.BaseHitTestProvider));
|
|
56
|
+
exports.TextSeriesHitTestProvider = TextSeriesHitTestProvider;
|
|
@@ -43,7 +43,7 @@ var UniformHeatmapHitTestProvider = /** @class */ (function (_super) {
|
|
|
43
43
|
if (!dataSeries) {
|
|
44
44
|
return HitTestInfo_1.HitTestInfo.empty();
|
|
45
45
|
}
|
|
46
|
-
var heatmapPoint = hitTestHelpers_1.hitTestHelpers.
|
|
46
|
+
var heatmapPoint = hitTestHelpers_1.hitTestHelpers.getNearestUniformHeatmapPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
47
47
|
var xIndex = heatmapPoint.xIndex, yIndex = heatmapPoint.yIndex, zValue = heatmapPoint.zValue;
|
|
48
48
|
var hitTestInfo = new HitTestInfo_1.HitTestInfo(this.parentSeries);
|
|
49
49
|
hitTestInfo.dataSeriesName = this.parentSeries.type;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
|
|
2
2
|
import { BaseDataSeries } from "../../../Model/BaseDataSeries";
|
|
3
3
|
import { IDataSeries } from "../../../Model/IDataSeries";
|
|
4
|
+
import { NonUniformHeatmapDataSeries } from "../../../Model/NonUniformHeatmapDataSeries";
|
|
4
5
|
import { OhlcDataSeries } from "../../../Model/OhlcDataSeries";
|
|
5
6
|
import { UniformHeatmapDataSeries } from "../../../Model/UniformHeatmapDataSeries";
|
|
6
7
|
import { XyDataSeries } from "../../../Model/XyDataSeries";
|
|
@@ -17,7 +18,12 @@ export declare const hitTestHelpers: {
|
|
|
17
18
|
getNearestXPoint: (webAssemblyContext: TSciChart, xCoordinateCalculator: CoordinateCalculatorBase, dataSeries: IDataSeries, xHitCoord: number, isSorted: boolean) => number;
|
|
18
19
|
getNearestXyPoint: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, dataSeries: IDataSeries, xHitCoord: number, yHitCoord: number) => number;
|
|
19
20
|
getNearestXyyPoint: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, dataSeries: XyyDataSeries, xHitCoord: number, yHitCoord: number) => number;
|
|
20
|
-
|
|
21
|
+
getNearestUniformHeatmapPoint: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, heatmapDataSeries: UniformHeatmapDataSeries, xHitCoord: number, yHitCoord: number) => {
|
|
22
|
+
xIndex: number;
|
|
23
|
+
yIndex: number;
|
|
24
|
+
zValue: number;
|
|
25
|
+
};
|
|
26
|
+
getNearestNonUniformHeatmapPoint: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, heatmapDataSeries: NonUniformHeatmapDataSeries, xHitCoord: number, yHitCoord: number) => {
|
|
21
27
|
xIndex: number;
|
|
22
28
|
yIndex: number;
|
|
23
29
|
zValue: number;
|
|
@@ -139,7 +139,7 @@ var getNearestXyyPoint = function (xCoordinateCalculator, yCoordinateCalculator,
|
|
|
139
139
|
}
|
|
140
140
|
return nearestPointIndex;
|
|
141
141
|
};
|
|
142
|
-
var
|
|
142
|
+
var getNearestUniformHeatmapPoint = function (xCoordinateCalculator, yCoordinateCalculator, heatmapDataSeries, xHitCoord, yHitCoord) {
|
|
143
143
|
var xHitValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
144
144
|
var yHitValue = yCoordinateCalculator.getDataValue(yHitCoord);
|
|
145
145
|
var xIndex = Math.floor((xHitValue - heatmapDataSeries.xStart) / heatmapDataSeries.xStep);
|
|
@@ -150,6 +150,37 @@ var getNearestHeatmapPoint = function (xCoordinateCalculator, yCoordinateCalcula
|
|
|
150
150
|
var zValue = heatmapDataSeries.getZValue(yIndex, xIndex);
|
|
151
151
|
return { xIndex: xIndex, yIndex: yIndex, zValue: zValue };
|
|
152
152
|
};
|
|
153
|
+
var getNearestNonUniformHeatmapPoint = function (xCoordinateCalculator, yCoordinateCalculator, heatmapDataSeries, xHitCoord, yHitCoord) {
|
|
154
|
+
var xHitValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
155
|
+
var yHitValue = yCoordinateCalculator.getDataValue(yHitCoord);
|
|
156
|
+
var xCellOffsets = heatmapDataSeries.xCellOffsets, yCellOffsets = heatmapDataSeries.yCellOffsets;
|
|
157
|
+
var xIndex = -1;
|
|
158
|
+
if (xHitValue >= xCellOffsets[0] && xHitValue <= xCellOffsets[xCellOffsets.length - 1]) {
|
|
159
|
+
for (var i = 0; i < xCellOffsets.length; i++) {
|
|
160
|
+
var isWithinCellOffsets = xHitValue >= xCellOffsets[i] && xHitValue <= xCellOffsets[i + 1];
|
|
161
|
+
if (isWithinCellOffsets) {
|
|
162
|
+
xIndex = i;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
var yIndex = -1;
|
|
168
|
+
if (yHitValue >= yCellOffsets[0] && yHitValue <= yCellOffsets[yCellOffsets.length - 1]) {
|
|
169
|
+
for (var i = 0; i < yCellOffsets.length - 1; i++) {
|
|
170
|
+
var isWithinCellOffsets = yHitValue >= yCellOffsets[i] && yHitValue <= yCellOffsets[i + 1];
|
|
171
|
+
if (isWithinCellOffsets) {
|
|
172
|
+
yIndex = i;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// TODO shouldn't we return a neerest cell anyway?
|
|
178
|
+
if (xIndex < 0 || xIndex >= heatmapDataSeries.arrayWidth || yIndex < 0 || yIndex >= heatmapDataSeries.arrayHeight) {
|
|
179
|
+
return { xIndex: -1, yIndex: -1, zValue: undefined };
|
|
180
|
+
}
|
|
181
|
+
var zValue = heatmapDataSeries.getZValue(yIndex, xIndex);
|
|
182
|
+
return { xIndex: xIndex, yIndex: yIndex, zValue: zValue };
|
|
183
|
+
};
|
|
153
184
|
var testIsHitForPoint = function (xCoordinateCalculator, yCoordinateCalculator, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
|
|
154
185
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
155
186
|
var xValue = isCategoryAxis ? pointIndex : xValues.get(pointIndex);
|
|
@@ -385,7 +416,8 @@ exports.hitTestHelpers = {
|
|
|
385
416
|
getNearestXPoint: getNearestXPoint,
|
|
386
417
|
getNearestXyPoint: getNearestXyPoint,
|
|
387
418
|
getNearestXyyPoint: getNearestXyyPoint,
|
|
388
|
-
|
|
419
|
+
getNearestUniformHeatmapPoint: getNearestUniformHeatmapPoint,
|
|
420
|
+
getNearestNonUniformHeatmapPoint: getNearestNonUniformHeatmapPoint,
|
|
389
421
|
testIsHitForPoint: testIsHitForPoint,
|
|
390
422
|
testIsHitForLine: testIsHitForLine,
|
|
391
423
|
testIsHitForBand: testIsHitForBand,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TAnimationDefinition, TEffectDefinition, TPaletteProviderDefinition, TPointMarkerDefinition } from "../../../Builder/buildSeries";
|
|
1
|
+
import { TAnimationDefinition, TDataLabelProviderDefinition, TEffectDefinition, TPaletteProviderDefinition, TPointMarkerDefinition } from "../../../Builder/buildSeries";
|
|
2
2
|
import { ELineDrawMode } from "../../Drawing/WebGlRenderContext2D";
|
|
3
3
|
import { IDataSeries } from "../../Model/IDataSeries";
|
|
4
4
|
import { IPaletteProvider } from "../../Model/IPaletteProvider";
|
|
@@ -7,6 +7,7 @@ import { IPointMarker } from "../PointMarkers/IPointMarker";
|
|
|
7
7
|
import { SeriesAnimation } from "./Animations/SeriesAnimation";
|
|
8
8
|
import { IRenderableSeries } from "./IRenderableSeries";
|
|
9
9
|
import { ShaderEffect } from "./ShaderEffect";
|
|
10
|
+
import { BaseDataLabelProvider } from "./DataLabels/BaseDataLabelProvider";
|
|
10
11
|
/**
|
|
11
12
|
* The type of the {@link IBaseRenderableSeriesOptions.onIsVisibleChanged } callback
|
|
12
13
|
*/
|
|
@@ -175,4 +176,8 @@ export interface IBaseRenderableSeriesOptions {
|
|
|
175
176
|
* Gets or sets the resampling precision for this series
|
|
176
177
|
*/
|
|
177
178
|
resamplingPrecision?: number;
|
|
179
|
+
/**
|
|
180
|
+
* A {@link SeriesTextProvider} used for creating and drawing per-point text.
|
|
181
|
+
*/
|
|
182
|
+
dataLabelProvider?: BaseDataLabelProvider | TDataLabelProviderDefinition;
|
|
178
183
|
}
|