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
|
@@ -4,6 +4,7 @@ import { EExecuteOn } from "../../types/ExecuteOn";
|
|
|
4
4
|
import { IThemeable } from "../Themes/IThemeable";
|
|
5
5
|
import { IThemeProvider } from "../Themes/IThemeProvider";
|
|
6
6
|
import { IRenderableSeries } from "../Visuals/RenderableSeries/IRenderableSeries";
|
|
7
|
+
import { SciChartSubSurface } from "../Visuals/SciChartSurface";
|
|
7
8
|
import { SciChartSurfaceBase } from "../Visuals/SciChartSurfaceBase";
|
|
8
9
|
import { ModifierMouseArgs } from "./ModifierMouseArgs";
|
|
9
10
|
export declare enum EModifierType {
|
|
@@ -72,6 +73,14 @@ export interface IChartModifierBase extends IThemeable, IDeletable {
|
|
|
72
73
|
* Called when a {@link IRenderableSeries | RenderableSeries} is detached from this modifier
|
|
73
74
|
*/
|
|
74
75
|
onDetachSeries(rs: IRenderableSeries): void;
|
|
76
|
+
/**
|
|
77
|
+
* Called when a {@link SciChartSubSurface | SciChartSubSurface}} is attached to the parent {@link SciChartSurface}
|
|
78
|
+
*/
|
|
79
|
+
onAttachSubSurface(subChart: SciChartSubSurface): void;
|
|
80
|
+
/**
|
|
81
|
+
* Called when a {@link SciChartSubSurface | SciChartSubSurface} is detached from the parent {@link SciChartSurface}
|
|
82
|
+
*/
|
|
83
|
+
onDetachSubSurface(subChart: SciChartSubSurface): void;
|
|
75
84
|
/**
|
|
76
85
|
* Called when the parent {@link SciChartSurfaceBase} is rendered
|
|
77
86
|
*/
|
|
@@ -120,6 +129,12 @@ export interface IChartModifierBase extends IThemeable, IDeletable {
|
|
|
120
129
|
* @param scs the {@link SciChartSurfaceBase} on which method was called
|
|
121
130
|
*/
|
|
122
131
|
modifierMouseEnter(args: ModifierMouseArgs, scs: SciChartSurfaceBase): void;
|
|
132
|
+
/**
|
|
133
|
+
* Method called when the drop event occurs {@link SciChartSurfaceBase}
|
|
134
|
+
* @param args the {@link ModifierMouseArgs} containing data about the mouse event
|
|
135
|
+
* @param scs the {@link SciChartSurfaceBase} on which method was called
|
|
136
|
+
*/
|
|
137
|
+
modifierDrop(args: ModifierMouseArgs, scs: SciChartSurfaceBase): void;
|
|
123
138
|
/**
|
|
124
139
|
* Method called when pointer event is canceled {@link SciChartSurfaceBase}
|
|
125
140
|
* @param args the {@link ModifierMouseArgs} containing data about the pointer event
|
|
@@ -185,6 +200,10 @@ export declare abstract class ChartModifierBase<TSurfaceType extends SciChartSur
|
|
|
185
200
|
/** @inheritDoc */
|
|
186
201
|
onDetachSeries(rs: IRenderableSeries): void;
|
|
187
202
|
/** @inheritDoc */
|
|
203
|
+
onAttachSubSurface(subChart: SciChartSubSurface): void;
|
|
204
|
+
/** @inheritDoc */
|
|
205
|
+
onDetachSubSurface(subChart: SciChartSubSurface): void;
|
|
206
|
+
/** @inheritDoc */
|
|
188
207
|
onParentSurfaceRendered(): void;
|
|
189
208
|
/** @inheritDoc */
|
|
190
209
|
modifierMouseDown(args: ModifierMouseArgs): void;
|
|
@@ -201,6 +220,8 @@ export declare abstract class ChartModifierBase<TSurfaceType extends SciChartSur
|
|
|
201
220
|
/** @inheritDoc */
|
|
202
221
|
modifierMouseLeave(args: ModifierMouseArgs): void;
|
|
203
222
|
/** @inheritDoc */
|
|
223
|
+
modifierDrop(args: ModifierMouseArgs): void;
|
|
224
|
+
/** @inheritDoc */
|
|
204
225
|
modifierPointerCancel(args: ModifierMouseArgs): void;
|
|
205
226
|
/** @inheritDoc */
|
|
206
227
|
setParentSurface(parentSurface: SciChartSurfaceBase): void;
|
|
@@ -106,6 +106,14 @@ var ChartModifierBase = /** @class */ (function () {
|
|
|
106
106
|
// Override in derived class to be notified of detached
|
|
107
107
|
};
|
|
108
108
|
/** @inheritDoc */
|
|
109
|
+
ChartModifierBase.prototype.onAttachSubSurface = function (subChart) {
|
|
110
|
+
// Override in derived class to be notified of attached
|
|
111
|
+
};
|
|
112
|
+
/** @inheritDoc */
|
|
113
|
+
ChartModifierBase.prototype.onDetachSubSurface = function (subChart) {
|
|
114
|
+
// Override in derived class to be notified of detached
|
|
115
|
+
};
|
|
116
|
+
/** @inheritDoc */
|
|
109
117
|
ChartModifierBase.prototype.onParentSurfaceRendered = function () {
|
|
110
118
|
// Override in derived class to be notified when render pass is finished
|
|
111
119
|
};
|
|
@@ -143,6 +151,10 @@ var ChartModifierBase = /** @class */ (function () {
|
|
|
143
151
|
// Override in derived class to be notified of mouse leave
|
|
144
152
|
};
|
|
145
153
|
/** @inheritDoc */
|
|
154
|
+
ChartModifierBase.prototype.modifierDrop = function (args) {
|
|
155
|
+
// Override in derived class to be notified of drop event
|
|
156
|
+
};
|
|
157
|
+
/** @inheritDoc */
|
|
146
158
|
ChartModifierBase.prototype.modifierPointerCancel = function (args) {
|
|
147
159
|
// Override in derived class to be notified of mouse leave
|
|
148
160
|
};
|
|
@@ -32,8 +32,9 @@ var ChartModifierBase2D = /** @class */ (function (_super) {
|
|
|
32
32
|
* @param options optional parameters via {@link IChartModifierBaseOptions} which can be passed to configure the modifier
|
|
33
33
|
*/
|
|
34
34
|
function ChartModifierBase2D(options) {
|
|
35
|
+
var _this = this;
|
|
35
36
|
var _a, _b, _c, _d, _e;
|
|
36
|
-
|
|
37
|
+
_this = _super.call(this, options) || this;
|
|
37
38
|
_this.xyDirection = XyDirection_1.EXyDirection.XyDirection;
|
|
38
39
|
_this.changedPropertiesList = [];
|
|
39
40
|
_this.xAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
|
|
@@ -5,6 +5,7 @@ import { EMousePosition } from "../../types/MousePosition";
|
|
|
5
5
|
import { SeriesInfo } from "../Model/ChartData/SeriesInfo";
|
|
6
6
|
import { IThemeProvider } from "../Themes/IThemeProvider";
|
|
7
7
|
import { CursorTooltipSvgAnnotation } from "../Visuals/Annotations/CursorTooltipSvgAnnotation";
|
|
8
|
+
import { LineAnnotation } from "../Visuals/Annotations/LineAnnotation";
|
|
8
9
|
import { HitTestInfo } from "../Visuals/RenderableSeries/HitTest/HitTestInfo";
|
|
9
10
|
import { IRenderableSeries } from "../Visuals/RenderableSeries/IRenderableSeries";
|
|
10
11
|
import { ChartModifierBase2D, IChartModifierBaseOptions } from "./ChartModifierBase2D";
|
|
@@ -15,25 +16,63 @@ export declare type TCursorTooltipDataTemplate = (seriesInfos: SeriesInfo[], too
|
|
|
15
16
|
* Optional parameters used to configure a {@link CursorModifier} at construct time
|
|
16
17
|
*/
|
|
17
18
|
export interface ICursorModifierOptions extends IChartModifierBaseOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Set a function which generates the svg for the entire tooltip. Note that the repositioning of the tooltip to keep it within the chart is normally done in this function.
|
|
21
|
+
* To retain this functionality in your own template function, include the following:
|
|
22
|
+
* ```ts
|
|
23
|
+
* // valuesWithLabels is the result of the tooltipDataTemplate function, which is the text content of the tooltip as an array of strings
|
|
24
|
+
* const { width, height } = calcTooltipSize(valuesWithLabels);
|
|
25
|
+
* // this calculates and sets svgAnnotation.xCoordShift and svgAnnotation.yCoordShift. Do not set x1 or y1 at this point.
|
|
26
|
+
* adjustTooltipPosition(width, height, svgAnnotation);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
18
29
|
tooltipSvgTemplate?: TCursorTooltipSvgTemplate | string;
|
|
30
|
+
/** Sets the crosshair stroke color as an HTML Color code */
|
|
19
31
|
crosshairStroke?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the crosshair line strokethickness
|
|
34
|
+
*/
|
|
20
35
|
crosshairStrokeThickness?: number;
|
|
36
|
+
/** Sets the crosshair line dash array */
|
|
21
37
|
crosshairStrokeDashArray?: number[];
|
|
38
|
+
/** Sets the tooltip container background color as an HTML Color code */
|
|
22
39
|
tooltipContainerBackground?: string;
|
|
40
|
+
/** Sets the tooltip text color as an HTML Color code */
|
|
23
41
|
tooltipTextStroke?: string;
|
|
42
|
+
/** Sets whether we should display the tooltip. Default is false */
|
|
24
43
|
showTooltip?: boolean;
|
|
44
|
+
/** Sets whether we should display axis labels. Default is true */
|
|
25
45
|
showAxisLabels?: boolean;
|
|
46
|
+
/** Sets both axis label text color as an HTML Color code */
|
|
26
47
|
axisLabelStroke?: string;
|
|
48
|
+
/** Sets both axis label fill as an HTML Color code. */
|
|
27
49
|
axisLabelFill?: string;
|
|
50
|
+
/** Sets the xAxis label text color as an HTML Color code */
|
|
28
51
|
xAxisLabelStroke?: string;
|
|
52
|
+
/** Sets the xAxis label fill as an HTML Color code. */
|
|
29
53
|
xAxisLabelFill?: string;
|
|
54
|
+
/** Sets the yAxis label text color as an HTML Color code */
|
|
30
55
|
yAxisLabelStroke?: string;
|
|
56
|
+
/** Sets the yAxis label fill as an HTML Color code. */
|
|
31
57
|
yAxisLabelFill?: string;
|
|
58
|
+
/** Sets the template for the legend */
|
|
32
59
|
tooltipLegendTemplate?: TCursorTooltipSvgTemplate | string;
|
|
60
|
+
/** Sets the legend X offset */
|
|
33
61
|
tooltipLegendOffsetX?: number;
|
|
62
|
+
/** Sets the legend Y offset */
|
|
34
63
|
tooltipLegendOffsetY?: number;
|
|
64
|
+
/** Sets the tooltipDataTemplate, which allows to customize content for the tooltip */
|
|
35
65
|
tooltipDataTemplate?: TCursorTooltipDataTemplate | string;
|
|
66
|
+
/** Sets the parent div element reference or id for the Tooltip */
|
|
36
67
|
placementDivId?: string;
|
|
68
|
+
/** Sets whether we should display the X Line. Default is true */
|
|
69
|
+
showXLine?: boolean;
|
|
70
|
+
/** Sets whether we should display the Y Line. Default is true */
|
|
71
|
+
showYLine?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
74
|
+
*/
|
|
75
|
+
hitTestRadius?: number;
|
|
37
76
|
}
|
|
38
77
|
/**
|
|
39
78
|
* The CursorModifier provides tooltip and cursor behavior on a 2D {@link SciChartSurface}
|
|
@@ -50,6 +89,16 @@ export interface ICursorModifierOptions extends IChartModifierBaseOptions {
|
|
|
50
89
|
*/
|
|
51
90
|
export declare class CursorModifier extends ChartModifierBase2D implements IIncludeSeries {
|
|
52
91
|
readonly type = EChart2DModifierType.Cursor;
|
|
92
|
+
/**
|
|
93
|
+
* Get or set a function which generates the svg for the entire tooltip. Note that the repositioning of the tooltip to keep it within the chart is normally done in this function.
|
|
94
|
+
* To retain this functionality in your own template function, include the following:
|
|
95
|
+
* ```ts
|
|
96
|
+
* // valuesWithLabels is the result of the tooltipDataTemplate function, which is the text content of the tooltip as an array of strings
|
|
97
|
+
* const { width, height } = calcTooltipSize(valuesWithLabels);
|
|
98
|
+
* // this calculates and sets svgAnnotation.xCoordShift and svgAnnotation.yCoordShift. Do not set x1 or y1 at this point.
|
|
99
|
+
* adjustTooltipPosition(width, height, svgAnnotation);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
53
102
|
tooltipSvgTemplate?: TCursorTooltipSvgTemplate;
|
|
54
103
|
/**
|
|
55
104
|
* Gets or sets the crosshair line strokethickness
|
|
@@ -76,11 +125,11 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
76
125
|
*/
|
|
77
126
|
showAxisLabels: boolean;
|
|
78
127
|
/**
|
|
79
|
-
* Gets or sets both
|
|
128
|
+
* Gets or sets both axis label text color as an HTML Color code
|
|
80
129
|
*/
|
|
81
130
|
axisLabelStroke: string;
|
|
82
131
|
/**
|
|
83
|
-
* Gets or sets both
|
|
132
|
+
* Gets or sets both axis label fill as an HTML Color code.
|
|
84
133
|
*/
|
|
85
134
|
axisLabelFill: string;
|
|
86
135
|
/**
|
|
@@ -96,7 +145,7 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
96
145
|
*/
|
|
97
146
|
yAxisLabelStroke: string;
|
|
98
147
|
/**
|
|
99
|
-
* Gets or sets the
|
|
148
|
+
* Gets or sets the yAxis label fill as an HTML Color code.
|
|
100
149
|
*/
|
|
101
150
|
yAxisLabelFill: string;
|
|
102
151
|
/**
|
|
@@ -111,14 +160,26 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
111
160
|
* Gets or sets the legend Y offset
|
|
112
161
|
*/
|
|
113
162
|
tooltipLegendOffsetY: number;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
163
|
+
/**
|
|
164
|
+
* Gets or sets whether we should display the X Line. Default is true
|
|
165
|
+
*/
|
|
166
|
+
showXLine: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Gets or sets whether we should display the Y Line. Default is true
|
|
169
|
+
*/
|
|
170
|
+
showYLine: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
173
|
+
*/
|
|
174
|
+
hitTestRadius: number;
|
|
175
|
+
protected xLineAnnotation: LineAnnotation;
|
|
176
|
+
protected yLineAnnotation: LineAnnotation;
|
|
177
|
+
protected tooltipAnnotation: CursorTooltipSvgAnnotation;
|
|
178
|
+
protected mousePosition: EMousePosition;
|
|
179
|
+
protected crosshairStrokeProperty: string;
|
|
180
|
+
protected tooltipDataTemplateProperty?: TCursorTooltipDataTemplate;
|
|
181
|
+
protected includedSeriesMap: Map<IRenderableSeries, boolean>;
|
|
182
|
+
protected placementDivIdProperty: string;
|
|
122
183
|
/**
|
|
123
184
|
* Creates an instance of the CursorModifier
|
|
124
185
|
*
|
|
@@ -171,6 +232,14 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
171
232
|
* Gets or sets the crosshair line Stroke color as an HTML Color code
|
|
172
233
|
*/
|
|
173
234
|
set crosshairStroke(value: string);
|
|
235
|
+
/**
|
|
236
|
+
* Gets or sets the parent div element reference or id for the Tooltip
|
|
237
|
+
*/
|
|
238
|
+
get placementDivId(): string;
|
|
239
|
+
/**
|
|
240
|
+
* Gets or sets the parent div element reference or id for the Tooltip
|
|
241
|
+
*/
|
|
242
|
+
set placementDivId(value: string);
|
|
174
243
|
/**
|
|
175
244
|
* @inheritDoc
|
|
176
245
|
*/
|
|
@@ -196,21 +265,25 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
196
265
|
getMousePosition(): EMousePosition;
|
|
197
266
|
/** @inheritDoc */
|
|
198
267
|
toJSON(): {
|
|
199
|
-
/**
|
|
200
|
-
* Gets or sets the xAxis label text color as an HTML Color code
|
|
201
|
-
*/
|
|
202
268
|
type: string;
|
|
203
269
|
options: Required<Omit<IChartModifierBaseOptions, never>>;
|
|
204
270
|
};
|
|
205
271
|
protected notifyPropertyChanged(propertyName: string): void;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
272
|
+
protected getSeriesInfos(): SeriesInfo[];
|
|
273
|
+
protected update(): void;
|
|
274
|
+
protected newLineAnnotation(axisLabelFill: string, axisLabelStroke: string): LineAnnotation;
|
|
209
275
|
/**
|
|
210
276
|
* Test if the series is included or excluded, by default it is included
|
|
211
277
|
* @param series
|
|
212
278
|
* @private
|
|
213
279
|
*/
|
|
214
|
-
|
|
215
|
-
|
|
280
|
+
protected testIsIncludedSeries(series: IRenderableSeries): boolean;
|
|
281
|
+
protected isVerticalChart(): boolean;
|
|
216
282
|
}
|
|
283
|
+
/** Calculate the width and height of the tooltip based on the content array */
|
|
284
|
+
export declare const calcTooltipSize: (valuesWithLabels: string[], fontSize?: number) => {
|
|
285
|
+
width: number;
|
|
286
|
+
height: number;
|
|
287
|
+
};
|
|
288
|
+
/** Relocate the tooltip so that it is always within the seriesViewRect */
|
|
289
|
+
export declare const adjustTooltipPosition: (width: number, height: number, svgAnnotation: CursorTooltipSvgAnnotation) => void;
|
|
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.CursorModifier = void 0;
|
|
18
|
+
exports.adjustTooltipPosition = exports.calcTooltipSize = exports.CursorModifier = void 0;
|
|
19
19
|
var classFactory_1 = require("../../Builder/classFactory");
|
|
20
20
|
var BaseType_1 = require("../../types/BaseType");
|
|
21
21
|
var ChartModifierType_1 = require("../../types/ChartModifierType");
|
|
@@ -51,9 +51,20 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
51
51
|
* @param options Optional parameters {@link ICursorModifierOptions} used to configure the modifier
|
|
52
52
|
*/
|
|
53
53
|
function CursorModifier(options) {
|
|
54
|
-
var
|
|
55
|
-
var
|
|
54
|
+
var _this = this;
|
|
55
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
56
|
+
_this = _super.call(this, options) || this;
|
|
56
57
|
_this.type = ChartModifierType_1.EChart2DModifierType.Cursor;
|
|
58
|
+
/**
|
|
59
|
+
* Get or set a function which generates the svg for the entire tooltip. Note that the repositioning of the tooltip to keep it within the chart is normally done in this function.
|
|
60
|
+
* To retain this functionality in your own template function, include the following:
|
|
61
|
+
* ```ts
|
|
62
|
+
* // valuesWithLabels is the result of the tooltipDataTemplate function, which is the text content of the tooltip as an array of strings
|
|
63
|
+
* const { width, height } = calcTooltipSize(valuesWithLabels);
|
|
64
|
+
* // this calculates and sets svgAnnotation.xCoordShift and svgAnnotation.yCoordShift. Do not set x1 or y1 at this point.
|
|
65
|
+
* adjustTooltipPosition(width, height, svgAnnotation);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
57
68
|
_this.tooltipSvgTemplate = defaultTooltipTemplate;
|
|
58
69
|
/**
|
|
59
70
|
* Gets or sets the crosshair line strokethickness
|
|
@@ -80,11 +91,11 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
80
91
|
*/
|
|
81
92
|
_this.showAxisLabels = true;
|
|
82
93
|
/**
|
|
83
|
-
* Gets or sets both
|
|
94
|
+
* Gets or sets both axis label text color as an HTML Color code
|
|
84
95
|
*/
|
|
85
96
|
_this.axisLabelStroke = "#fff";
|
|
86
97
|
/**
|
|
87
|
-
* Gets or sets both
|
|
98
|
+
* Gets or sets both axis label fill as an HTML Color code.
|
|
88
99
|
*/
|
|
89
100
|
_this.axisLabelFill = "#228B22";
|
|
90
101
|
/**
|
|
@@ -100,7 +111,7 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
100
111
|
*/
|
|
101
112
|
_this.yAxisLabelStroke = undefined;
|
|
102
113
|
/**
|
|
103
|
-
* Gets or sets the
|
|
114
|
+
* Gets or sets the yAxis label fill as an HTML Color code.
|
|
104
115
|
*/
|
|
105
116
|
_this.yAxisLabelFill = undefined;
|
|
106
117
|
/**
|
|
@@ -111,6 +122,18 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
111
122
|
* Gets or sets the legend Y offset
|
|
112
123
|
*/
|
|
113
124
|
_this.tooltipLegendOffsetY = 0;
|
|
125
|
+
/**
|
|
126
|
+
* Gets or sets whether we should display the X Line. Default is true
|
|
127
|
+
*/
|
|
128
|
+
_this.showXLine = true;
|
|
129
|
+
/**
|
|
130
|
+
* Gets or sets whether we should display the Y Line. Default is true
|
|
131
|
+
*/
|
|
132
|
+
_this.showYLine = true;
|
|
133
|
+
/**
|
|
134
|
+
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
135
|
+
*/
|
|
136
|
+
_this.hitTestRadius = 0;
|
|
114
137
|
_this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
|
|
115
138
|
_this.crosshairStrokeProperty = SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush;
|
|
116
139
|
_this.includedSeriesMap = new Map();
|
|
@@ -135,7 +158,7 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
135
158
|
_this.xAxisLabelFill = (_m = options === null || options === void 0 ? void 0 : options.xAxisLabelFill) !== null && _m !== void 0 ? _m : _this.xAxisLabelFill;
|
|
136
159
|
_this.yAxisLabelStroke = (_o = options === null || options === void 0 ? void 0 : options.yAxisLabelStroke) !== null && _o !== void 0 ? _o : _this.yAxisLabelStroke;
|
|
137
160
|
_this.yAxisLabelFill = (_p = options === null || options === void 0 ? void 0 : options.yAxisLabelFill) !== null && _p !== void 0 ? _p : _this.yAxisLabelFill;
|
|
138
|
-
_this.
|
|
161
|
+
_this.placementDivIdProperty = (_q = options === null || options === void 0 ? void 0 : options.placementDivId) !== null && _q !== void 0 ? _q : _this.placementDivIdProperty;
|
|
139
162
|
if (options === null || options === void 0 ? void 0 : options.tooltipLegendTemplate) {
|
|
140
163
|
if (typeof options.tooltipLegendTemplate === "string") {
|
|
141
164
|
_this.typeMap.set("tooltipLegendTemplate", options.tooltipLegendTemplate);
|
|
@@ -156,6 +179,9 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
156
179
|
}
|
|
157
180
|
_this.tooltipDataTemplateProperty =
|
|
158
181
|
(_u = options === null || options === void 0 ? void 0 : options.tooltipDataTemplate) !== null && _u !== void 0 ? _u : _this.tooltipDataTemplateProperty;
|
|
182
|
+
_this.showXLine = (_v = options === null || options === void 0 ? void 0 : options.showXLine) !== null && _v !== void 0 ? _v : _this.showXLine;
|
|
183
|
+
_this.showYLine = (_w = options === null || options === void 0 ? void 0 : options.showYLine) !== null && _w !== void 0 ? _w : _this.showYLine;
|
|
184
|
+
_this.hitTestRadius = (_x = options === null || options === void 0 ? void 0 : options.hitTestRadius) !== null && _x !== void 0 ? _x : _this.hitTestRadius;
|
|
159
185
|
return _this;
|
|
160
186
|
}
|
|
161
187
|
/**
|
|
@@ -176,8 +202,14 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
176
202
|
var yAxisLabelFill = this.yAxisLabelFill ? this.yAxisLabelFill : this.axisLabelFill;
|
|
177
203
|
var xAxisLabelStroke = this.xAxisLabelStroke ? this.xAxisLabelStroke : this.axisLabelStroke;
|
|
178
204
|
var yAxisLabelStroke = this.yAxisLabelStroke ? this.yAxisLabelStroke : this.axisLabelStroke;
|
|
179
|
-
|
|
180
|
-
|
|
205
|
+
if (this.showXLine) {
|
|
206
|
+
this.xLineAnnotation = this.newLineAnnotation(xAxisLabelFill, xAxisLabelStroke);
|
|
207
|
+
this.parentSurface.modifierAnnotations.add(this.xLineAnnotation);
|
|
208
|
+
}
|
|
209
|
+
if (this.showYLine) {
|
|
210
|
+
this.yLineAnnotation = this.newLineAnnotation(yAxisLabelFill, yAxisLabelStroke);
|
|
211
|
+
this.parentSurface.modifierAnnotations.add(this.yLineAnnotation);
|
|
212
|
+
}
|
|
181
213
|
this.tooltipAnnotation = new CursorTooltipSvgAnnotation_1.CursorTooltipSvgAnnotation({
|
|
182
214
|
cursorModifier: this,
|
|
183
215
|
xCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
|
|
@@ -192,17 +224,22 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
192
224
|
yAxisId: this.yAxisId,
|
|
193
225
|
placementDivId: this.placementDivId
|
|
194
226
|
});
|
|
195
|
-
this.parentSurface.modifierAnnotations.add(this.
|
|
227
|
+
this.parentSurface.modifierAnnotations.add(this.tooltipAnnotation);
|
|
196
228
|
};
|
|
197
229
|
/**
|
|
198
230
|
* @inheritDoc
|
|
199
231
|
*/
|
|
200
232
|
CursorModifier.prototype.onDetach = function () {
|
|
233
|
+
var _a;
|
|
201
234
|
_super.prototype.onDetach.call(this);
|
|
202
|
-
this.xLineAnnotation
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
235
|
+
if (this.xLineAnnotation) {
|
|
236
|
+
(_a = this.xLineAnnotation) === null || _a === void 0 ? void 0 : _a.delete();
|
|
237
|
+
this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation);
|
|
238
|
+
}
|
|
239
|
+
if (this.yLineAnnotation) {
|
|
240
|
+
this.yLineAnnotation.delete();
|
|
241
|
+
this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation);
|
|
242
|
+
}
|
|
206
243
|
this.tooltipAnnotation.delete();
|
|
207
244
|
this.parentSurface.modifierAnnotations.remove(this.tooltipAnnotation);
|
|
208
245
|
};
|
|
@@ -275,6 +312,25 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
275
312
|
enumerable: false,
|
|
276
313
|
configurable: true
|
|
277
314
|
});
|
|
315
|
+
Object.defineProperty(CursorModifier.prototype, "placementDivId", {
|
|
316
|
+
/**
|
|
317
|
+
* Gets or sets the parent div element reference or id for the Tooltip
|
|
318
|
+
*/
|
|
319
|
+
get: function () {
|
|
320
|
+
return this.placementDivIdProperty;
|
|
321
|
+
},
|
|
322
|
+
/**
|
|
323
|
+
* Gets or sets the parent div element reference or id for the Tooltip
|
|
324
|
+
*/
|
|
325
|
+
set: function (value) {
|
|
326
|
+
if (this.placementDivIdProperty !== value) {
|
|
327
|
+
this.placementDivIdProperty = value;
|
|
328
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.PLACEMENT_DIV_ID);
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
enumerable: false,
|
|
332
|
+
configurable: true
|
|
333
|
+
});
|
|
278
334
|
/**
|
|
279
335
|
* @inheritDoc
|
|
280
336
|
*/
|
|
@@ -324,7 +380,12 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
324
380
|
if (!mousePoint) {
|
|
325
381
|
return undefined;
|
|
326
382
|
}
|
|
327
|
-
|
|
383
|
+
if (this.hitTestRadius <= 0) {
|
|
384
|
+
return rs.hitTestProvider.hitTestXSlice(mousePoint.x, mousePoint.y);
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
return rs.hitTestProvider.hitTestDataPoint(mousePoint.x, mousePoint.y, this.hitTestRadius);
|
|
388
|
+
}
|
|
328
389
|
};
|
|
329
390
|
/**
|
|
330
391
|
* Returns current mouse position
|
|
@@ -362,13 +423,21 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
362
423
|
_super.prototype.notifyPropertyChanged.call(this, propertyName);
|
|
363
424
|
if (propertyName === constants_1.PROPERTY.X_AXIS_ID) {
|
|
364
425
|
this.tooltipAnnotation.xAxisId = this.xAxisId;
|
|
365
|
-
this.xLineAnnotation
|
|
366
|
-
|
|
426
|
+
if (this.xLineAnnotation) {
|
|
427
|
+
this.xLineAnnotation.xAxisId = this.xAxisId;
|
|
428
|
+
}
|
|
429
|
+
if (this.yLineAnnotation) {
|
|
430
|
+
this.yLineAnnotation.xAxisId = this.xAxisId;
|
|
431
|
+
}
|
|
367
432
|
}
|
|
368
433
|
if (propertyName === constants_1.PROPERTY.Y_AXIS_ID) {
|
|
369
434
|
this.tooltipAnnotation.yAxisId = this.yAxisId;
|
|
370
|
-
this.xLineAnnotation
|
|
371
|
-
|
|
435
|
+
if (this.xLineAnnotation) {
|
|
436
|
+
this.xLineAnnotation.yAxisId = this.yAxisId;
|
|
437
|
+
}
|
|
438
|
+
if (this.yLineAnnotation) {
|
|
439
|
+
this.yLineAnnotation.yAxisId = this.yAxisId;
|
|
440
|
+
}
|
|
372
441
|
}
|
|
373
442
|
};
|
|
374
443
|
CursorModifier.prototype.getSeriesInfos = function () {
|
|
@@ -385,8 +454,12 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
385
454
|
};
|
|
386
455
|
CursorModifier.prototype.update = function () {
|
|
387
456
|
if (this.mousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
|
|
388
|
-
this.xLineAnnotation
|
|
389
|
-
|
|
457
|
+
if (this.xLineAnnotation) {
|
|
458
|
+
this.xLineAnnotation.isHidden = true;
|
|
459
|
+
}
|
|
460
|
+
if (this.yLineAnnotation) {
|
|
461
|
+
this.yLineAnnotation.isHidden = true;
|
|
462
|
+
}
|
|
390
463
|
this.tooltipAnnotation.isHidden = true;
|
|
391
464
|
if (this.placementDivId) {
|
|
392
465
|
this.tooltipAnnotation.delete();
|
|
@@ -394,31 +467,47 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
394
467
|
return;
|
|
395
468
|
}
|
|
396
469
|
var translatedMousePoint = (0, translate_1.translateFromCanvasToSeriesViewRect)(this.mousePoint, this.parentSurface.seriesViewRect);
|
|
397
|
-
this.xLineAnnotation
|
|
398
|
-
|
|
470
|
+
if (this.xLineAnnotation) {
|
|
471
|
+
this.xLineAnnotation.isHidden = false;
|
|
472
|
+
}
|
|
473
|
+
if (this.yLineAnnotation) {
|
|
474
|
+
this.yLineAnnotation.isHidden = false;
|
|
475
|
+
}
|
|
399
476
|
if (this.showTooltip) {
|
|
400
477
|
this.tooltipAnnotation.isHidden = false;
|
|
401
478
|
}
|
|
402
479
|
if (translatedMousePoint) {
|
|
403
480
|
var x = (0, translate_1.translateToNotScaled)(translatedMousePoint.x);
|
|
404
481
|
var y = (0, translate_1.translateToNotScaled)(translatedMousePoint.y);
|
|
405
|
-
this.xLineAnnotation
|
|
406
|
-
|
|
482
|
+
if (this.xLineAnnotation) {
|
|
483
|
+
this.xLineAnnotation.y1 = 0;
|
|
484
|
+
}
|
|
485
|
+
if (this.yLineAnnotation) {
|
|
486
|
+
this.yLineAnnotation.x1 = 0;
|
|
487
|
+
}
|
|
407
488
|
if (this.isVerticalChart()) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
this.yLineAnnotation
|
|
489
|
+
if (this.xLineAnnotation) {
|
|
490
|
+
this.xLineAnnotation.y2 = (0, translate_1.translateToNotScaled)(this.parentSurface.seriesViewRect.right);
|
|
491
|
+
this.xLineAnnotation.x1 = y;
|
|
492
|
+
this.xLineAnnotation.x2 = y;
|
|
493
|
+
}
|
|
494
|
+
if (this.yLineAnnotation) {
|
|
495
|
+
this.yLineAnnotation.x2 = (0, translate_1.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom);
|
|
496
|
+
this.yLineAnnotation.y1 = x;
|
|
497
|
+
this.yLineAnnotation.y2 = x;
|
|
498
|
+
}
|
|
414
499
|
}
|
|
415
500
|
else {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
this.yLineAnnotation
|
|
501
|
+
if (this.xLineAnnotation) {
|
|
502
|
+
this.xLineAnnotation.y2 = (0, translate_1.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom);
|
|
503
|
+
this.xLineAnnotation.x1 = x;
|
|
504
|
+
this.xLineAnnotation.x2 = x;
|
|
505
|
+
}
|
|
506
|
+
if (this.yLineAnnotation) {
|
|
507
|
+
this.yLineAnnotation.x2 = (0, translate_1.translateToNotScaled)(this.parentSurface.seriesViewRect.right);
|
|
508
|
+
this.yLineAnnotation.y1 = y;
|
|
509
|
+
this.yLineAnnotation.y2 = y;
|
|
510
|
+
}
|
|
422
511
|
}
|
|
423
512
|
if (this.showTooltip) {
|
|
424
513
|
this.tooltipAnnotation.x1 = x;
|
|
@@ -518,18 +607,10 @@ var defaultTooltipTemplate = function (seriesInfos, svgAnnotation) {
|
|
|
518
607
|
if (valuesWithLabels.length === 0) {
|
|
519
608
|
return "<svg></svg>";
|
|
520
609
|
}
|
|
521
|
-
// tooltip
|
|
522
|
-
var
|
|
523
|
-
//
|
|
524
|
-
|
|
525
|
-
// Positioning the tooltip
|
|
526
|
-
var seriesViewRect = svgAnnotation.parentSurface.seriesViewRect;
|
|
527
|
-
var xCoord = svgAnnotation.x1;
|
|
528
|
-
var yCoord = svgAnnotation.y1;
|
|
529
|
-
var xCoordShift = (0, translate_1.translateToNotScaled)(seriesViewRect.width) - xCoord < width ? -width : 5;
|
|
530
|
-
var yCoordShift = (0, translate_1.translateToNotScaled)(seriesViewRect.height) - yCoord < height ? -height : 5;
|
|
531
|
-
svgAnnotation.xCoordShift = xCoordShift;
|
|
532
|
-
svgAnnotation.yCoordShift = yCoordShift;
|
|
610
|
+
// tooltip size
|
|
611
|
+
var _b = (0, exports.calcTooltipSize)(valuesWithLabels), width = _b.width, height = _b.height;
|
|
612
|
+
// adjust position
|
|
613
|
+
(0, exports.adjustTooltipPosition)(width, height, svgAnnotation);
|
|
533
614
|
var valuesBlock = "";
|
|
534
615
|
valuesWithLabels.forEach(function (val, index) {
|
|
535
616
|
valuesBlock += "<tspan x=\"8\" dy=\"1.2em\">".concat(val, "</tspan>");
|
|
@@ -538,15 +619,23 @@ var defaultTooltipTemplate = function (seriesInfos, svgAnnotation) {
|
|
|
538
619
|
var tooltipStroke = svgAnnotation.textStroke;
|
|
539
620
|
return "<svg class=\"scichart__cursor-tooltip\" width=\"".concat(width, "\" height=\"").concat(height, "\">\n <defs>\n <filter id=\"").concat(id, "\" x=\"0\" y=\"0\" width=\"200%\" height=\"200%\">\n <feOffset result=\"offOut\" in=\"SourceAlpha\" dx=\"3\" dy=\"3\" />\n <feGaussianBlur result=\"blurOut\" in=\"offOut\" stdDeviation=\"3\" />\n <feBlend in=\"SourceGraphic\" in2=\"blurOut\" mode=\"normal\" />\n </filter>\n </defs>\n <rect rx=\"4\" ry=\"4\" width=\"95%\" height=\"90%\" fill=\"").concat(tooltipFill, "\" filter=\"url(#").concat(id, ")\" />\n <svg width=\"100%\">\n <text x=\"8\" y=\"3\" font-size=\"13\" font-family=\"Verdana\" dy=\"0\" fill=\"").concat(tooltipStroke, "\">").concat(valuesBlock, "</text>\n </svg>\n </svg>");
|
|
540
621
|
};
|
|
541
|
-
/**
|
|
542
|
-
var
|
|
543
|
-
if (textLength === void 0) { textLength = 20; }
|
|
622
|
+
/** Calculate the width and height of the tooltip based on the content array */
|
|
623
|
+
var calcTooltipSize = function (valuesWithLabels, fontSize) {
|
|
544
624
|
if (fontSize === void 0) { fontSize = 13; }
|
|
545
|
-
|
|
625
|
+
var textLength = valuesWithLabels.reduce(function (prev, cur) { return (cur.length > prev ? cur.length : prev); }, 0);
|
|
626
|
+
var width = textLength * 8 + 20;
|
|
627
|
+
var height = 17 * valuesWithLabels.length + 16;
|
|
628
|
+
return { width: width, height: height };
|
|
546
629
|
};
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
630
|
+
exports.calcTooltipSize = calcTooltipSize;
|
|
631
|
+
/** Relocate the tooltip so that it is always within the seriesViewRect */
|
|
632
|
+
var adjustTooltipPosition = function (width, height, svgAnnotation) {
|
|
633
|
+
var seriesViewRect = svgAnnotation.parentSurface.seriesViewRect;
|
|
634
|
+
var xCoord = svgAnnotation.x1;
|
|
635
|
+
var yCoord = svgAnnotation.y1;
|
|
636
|
+
var xCoordShift = (0, translate_1.translateToNotScaled)(seriesViewRect.width) - xCoord < width ? -width : 5;
|
|
637
|
+
var yCoordShift = (0, translate_1.translateToNotScaled)(seriesViewRect.height) - yCoord < height ? -height : 5;
|
|
638
|
+
svgAnnotation.xCoordShift = xCoordShift;
|
|
639
|
+
svgAnnotation.yCoordShift = yCoordShift;
|
|
552
640
|
};
|
|
641
|
+
exports.adjustTooltipPosition = adjustTooltipPosition;
|
|
@@ -57,8 +57,9 @@ var DataPointSelectionModifier = /** @class */ (function (_super) {
|
|
|
57
57
|
* @param options Optional parameters of type {@link IDataPointSelectionModifierOptions} used to configure the modifier
|
|
58
58
|
*/
|
|
59
59
|
function DataPointSelectionModifier(options) {
|
|
60
|
+
var _this = this;
|
|
60
61
|
var _a, _b, _c;
|
|
61
|
-
|
|
62
|
+
_this = _super.call(this, options) || this;
|
|
62
63
|
_this.type = ChartModifierType_1.EChart2DModifierType.DataPointSelection;
|
|
63
64
|
/**
|
|
64
65
|
* A selection-changed EventHandler. See {@link EventHandler} for how to subscribe to and be
|
|
@@ -40,8 +40,9 @@ var LegendModifier = /** @class */ (function (_super) {
|
|
|
40
40
|
* @param options Optional parameters {@link ILegendModifierOptions} used to configure the modifier
|
|
41
41
|
*/
|
|
42
42
|
function LegendModifier(options) {
|
|
43
|
+
var _this = this;
|
|
43
44
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
44
|
-
|
|
45
|
+
_this = _super.call(this, options) || this;
|
|
45
46
|
_this.type = ChartModifierType_1.EChart2DModifierType.Legend;
|
|
46
47
|
/**
|
|
47
48
|
* An event handler raised when a {@link SciChartLegend} row checkbox is checked or unchecked
|