scichart 2.2.2416 → 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/ISpline.d.ts +2 -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.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +29 -10
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +7 -3
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +28 -8
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +28 -8
- 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/copyVector.d.ts +2 -0
- package/utils/copyVector.js +10 -0
- 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
|
@@ -30,7 +30,6 @@ var DpiHelper_1 = require("../TextureManager/DpiHelper");
|
|
|
30
30
|
var AnnotationBase_1 = require("./AnnotationBase");
|
|
31
31
|
var annotationHelpers_1 = require("./annotationHelpers");
|
|
32
32
|
var constants_1 = require("./constants");
|
|
33
|
-
var constants_2 = require("./constants");
|
|
34
33
|
var IAnnotation_1 = require("./IAnnotation");
|
|
35
34
|
var RenderContextAnnotationBase_1 = require("./RenderContextAnnotationBase");
|
|
36
35
|
/**
|
|
@@ -51,11 +50,33 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
51
50
|
* @param options Optional parameters of type {@link IBoxAnnotationOptions} which configure the annotation upon construction
|
|
52
51
|
*/
|
|
53
52
|
function BoxAnnotation(options) {
|
|
53
|
+
var _this = this;
|
|
54
54
|
var _a, _b, _c;
|
|
55
|
-
|
|
55
|
+
_this = _super.call(this, options) || this;
|
|
56
56
|
/** @inheritDoc */
|
|
57
57
|
_this.type = IAnnotation_1.EAnnotationType.RenderContextBoxAnnotation;
|
|
58
58
|
_this.strokeThicknessProperty = 1;
|
|
59
|
+
_this.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
60
|
+
var colorLine = _this.selectionBoxStroke;
|
|
61
|
+
var width = x2 - x1;
|
|
62
|
+
var height = y2 - y1;
|
|
63
|
+
var svg = "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(_this.selectionBoxThickness, "px\" fill=\"none\" />\n ");
|
|
64
|
+
var grips = _this.getAdornerAnnotationBorders(false, true);
|
|
65
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
66
|
+
svg += _this.getAnnotationGripSvg(grips.x1, grips.y1);
|
|
67
|
+
}
|
|
68
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
69
|
+
svg += _this.getAnnotationGripSvg(grips.x2, grips.y2);
|
|
70
|
+
}
|
|
71
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
72
|
+
svg += _this.getAnnotationGripSvg(grips.x2, grips.y1);
|
|
73
|
+
}
|
|
74
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
75
|
+
svg += _this.getAnnotationGripSvg(grips.x1, grips.y2);
|
|
76
|
+
}
|
|
77
|
+
svg += "</svg>";
|
|
78
|
+
return svg;
|
|
79
|
+
};
|
|
59
80
|
_this.stroke = (_a = options === null || options === void 0 ? void 0 : options.stroke) !== null && _a !== void 0 ? _a : "#ffffff";
|
|
60
81
|
_this.strokeThickness = (_b = options === null || options === void 0 ? void 0 : options.strokeThickness) !== null && _b !== void 0 ? _b : 1;
|
|
61
82
|
_this.fill = (_c = options === null || options === void 0 ? void 0 : options.fill) !== null && _c !== void 0 ? _c : "#777777";
|
|
@@ -164,41 +185,38 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
164
185
|
};
|
|
165
186
|
BoxAnnotation.prototype.onDragStarted = function (args) {
|
|
166
187
|
_super.prototype.onDragStarted.call(this, args);
|
|
167
|
-
var _a =
|
|
168
|
-
var
|
|
169
|
-
var xyCoord2 = this.getXYCoordinatesFromValues(new Point_1.Point(point2.x, point2.y));
|
|
170
|
-
var xyCoord3 = this.getXYCoordinatesFromValues(new Point_1.Point(point3.x, point3.y));
|
|
171
|
-
var xyCoord4 = this.getXYCoordinatesFromValues(new Point_1.Point(point4.x, point4.y));
|
|
188
|
+
var _a = this.getAnnotationBorders(false, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
189
|
+
var _b = annotationHelpers_1.annotationHelpers.calcNewApex(x1, y1, x2, y2, this.isVerticalChart), x1y1 = _b.x1y1, x2y1 = _b.x2y1, x1y2 = _b.x1y2, x2y2 = _b.x2y2;
|
|
172
190
|
var xyMousePoint = (0, translate_1.translateFromCanvasToSeriesViewRect)(new Point_1.Point(args.mousePoint.x, args.mousePoint.y), this.parentSurface.seriesViewRect);
|
|
173
|
-
if (
|
|
174
|
-
var dist = (0, pointUtil_1.calcDistance)(
|
|
175
|
-
if (dist <
|
|
176
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
191
|
+
if (x1y1 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
192
|
+
var dist = (0, pointUtil_1.calcDistance)(x1y1.x, x1y1.y, xyMousePoint.x, xyMousePoint.y);
|
|
193
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
194
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y1;
|
|
177
195
|
return true;
|
|
178
196
|
}
|
|
179
197
|
}
|
|
180
|
-
if (
|
|
181
|
-
var dist = (0, pointUtil_1.calcDistance)(
|
|
182
|
-
if (dist <
|
|
183
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
198
|
+
if (x2y1 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
199
|
+
var dist = (0, pointUtil_1.calcDistance)(x2y1.x, x2y1.y, xyMousePoint.x, xyMousePoint.y);
|
|
200
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
201
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x2y1;
|
|
184
202
|
return true;
|
|
185
203
|
}
|
|
186
204
|
}
|
|
187
|
-
if (
|
|
188
|
-
var dist = (0, pointUtil_1.calcDistance)(
|
|
189
|
-
if (dist <
|
|
190
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
205
|
+
if (x1y2 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
206
|
+
var dist = (0, pointUtil_1.calcDistance)(x1y2.x, x1y2.y, xyMousePoint.x, xyMousePoint.y);
|
|
207
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
208
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y2;
|
|
191
209
|
return true;
|
|
192
210
|
}
|
|
193
211
|
}
|
|
194
|
-
if (
|
|
195
|
-
var dist = (0, pointUtil_1.calcDistance)(
|
|
196
|
-
if (dist <
|
|
197
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
212
|
+
if (x2y2 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
213
|
+
var dist = (0, pointUtil_1.calcDistance)(x2y2.x, x2y2.y, xyMousePoint.x, xyMousePoint.y);
|
|
214
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
215
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x2y2;
|
|
198
216
|
return true;
|
|
199
217
|
}
|
|
200
218
|
}
|
|
201
|
-
if (xyMousePoint) {
|
|
219
|
+
if (xyMousePoint && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.Body)) {
|
|
202
220
|
if (this.clickToSelect(args)) {
|
|
203
221
|
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.Body;
|
|
204
222
|
return true;
|
|
@@ -207,73 +225,65 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
207
225
|
return false;
|
|
208
226
|
};
|
|
209
227
|
BoxAnnotation.prototype.calcDragDistance = function (xyValues) {
|
|
228
|
+
if (!this.prevValue) {
|
|
229
|
+
this.prevValue = xyValues;
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
210
232
|
if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.Body) {
|
|
211
|
-
if (!this.prevValue) {
|
|
212
|
-
this.prevValue = xyValues;
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
233
|
this.x1 = this.x1 - (this.prevValue.x - xyValues.x);
|
|
216
234
|
this.x2 = this.x2 - (this.prevValue.x - xyValues.x);
|
|
217
235
|
this.y1 = this.y1 - (this.prevValue.y - xyValues.y);
|
|
218
236
|
this.y2 = this.y2 - (this.prevValue.y - xyValues.y);
|
|
219
|
-
this.prevValue = xyValues;
|
|
220
237
|
}
|
|
221
|
-
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.
|
|
238
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x1y1) {
|
|
222
239
|
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
223
|
-
this.
|
|
224
|
-
this.x1 = xyValues.x;
|
|
240
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
225
241
|
}
|
|
226
242
|
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
227
|
-
this.
|
|
228
|
-
this.y2 = xyValues.y;
|
|
243
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
229
244
|
}
|
|
230
245
|
else {
|
|
231
|
-
this.x1
|
|
232
|
-
this.
|
|
246
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
247
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
233
248
|
}
|
|
234
249
|
}
|
|
235
|
-
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.
|
|
250
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x2y2) {
|
|
236
251
|
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
237
|
-
this.
|
|
238
|
-
this.x2 = xyValues.x;
|
|
252
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
239
253
|
}
|
|
240
254
|
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
241
|
-
this.
|
|
242
|
-
this.y2 = xyValues.y;
|
|
255
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
243
256
|
}
|
|
244
257
|
else {
|
|
245
|
-
this.x2
|
|
246
|
-
this.y2
|
|
258
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
259
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
247
260
|
}
|
|
248
261
|
}
|
|
249
|
-
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.
|
|
262
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x2y1) {
|
|
250
263
|
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
251
|
-
this.
|
|
252
|
-
this.x2 = xyValues.x;
|
|
264
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
253
265
|
}
|
|
254
266
|
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
255
|
-
this.
|
|
256
|
-
this.y1 = xyValues.y;
|
|
267
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
257
268
|
}
|
|
258
269
|
else {
|
|
259
|
-
this.x2
|
|
260
|
-
this.y1
|
|
270
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
271
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
261
272
|
}
|
|
262
273
|
}
|
|
263
|
-
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.
|
|
274
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x1y2) {
|
|
264
275
|
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
265
|
-
this.
|
|
266
|
-
this.x1 = xyValues.x;
|
|
276
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
267
277
|
}
|
|
268
278
|
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
269
|
-
this.
|
|
270
|
-
this.y1 = xyValues.y;
|
|
279
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
271
280
|
}
|
|
272
281
|
else {
|
|
273
|
-
this.x1
|
|
274
|
-
this.
|
|
282
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
283
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
275
284
|
}
|
|
276
285
|
}
|
|
286
|
+
this.prevValue = xyValues;
|
|
277
287
|
};
|
|
278
288
|
BoxAnnotation.prototype.onDpiChanged = function (args) {
|
|
279
289
|
_super.prototype.onDpiChanged.call(this, args);
|
|
@@ -313,8 +323,8 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
313
323
|
var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
|
|
314
324
|
this.deleteAdorner();
|
|
315
325
|
if (this.isSelected) {
|
|
316
|
-
var _a = this.getAdornerAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
317
|
-
var svgString = svgStringAdornerTemplate(x1, y1, x2, y2);
|
|
326
|
+
var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
327
|
+
var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
|
|
318
328
|
this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
|
|
319
329
|
}
|
|
320
330
|
};
|
|
@@ -361,11 +371,3 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
361
371
|
return BoxAnnotation;
|
|
362
372
|
}(RenderContextAnnotationBase_1.RenderContextAnnotationBase));
|
|
363
373
|
exports.BoxAnnotation = BoxAnnotation;
|
|
364
|
-
/** @ignore */
|
|
365
|
-
var svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
366
|
-
var colorLine = "#f00e0e66";
|
|
367
|
-
var adornerFill = "#CDCDCD22";
|
|
368
|
-
var adornerStroke = "#CDCDCD99";
|
|
369
|
-
var delta = 3;
|
|
370
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"".concat(x1 - delta, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2 + delta, "\" y2=\"").concat(y1, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(2 * delta, "\" />\n <line x1=\"").concat(x2, "\" y1=\"").concat(y1 + delta, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2 - delta, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(2 * delta, "\" />\n <line x1=\"").concat(x1 - delta, "\" y1=\"").concat(y2, "\" x2=\"").concat(x2 + delta, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(2 * delta, "\" />\n <line x1=\"").concat(x1, "\" y1=\"").concat(y1 + delta, "\" x2=\"").concat(x1, "\" y2=\"").concat(y2 - delta, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(2 * delta, "\" />\n <circle cx=\"").concat(x1, "\" cy=\"").concat(y1, "\" r=\"").concat(constants_2.ADORNER_GRIP_RADIUS, "\" fill=\"").concat(adornerFill, "\" stroke=\"").concat(adornerStroke, "\"/>\n <circle cx=\"").concat(x1, "\" cy=\"").concat(y2, "\" r=\"").concat(constants_2.ADORNER_GRIP_RADIUS, "\" fill=\"").concat(adornerFill, "\" stroke=\"").concat(adornerStroke, "\"/>\n <circle cx=\"").concat(x2, "\" cy=\"").concat(y1, "\" r=\"").concat(constants_2.ADORNER_GRIP_RADIUS, "\" fill=\"").concat(adornerFill, "\" stroke=\"").concat(adornerStroke, "\"/>\n <circle cx=\"").concat(x2, "\" cy=\"").concat(y2, "\" r=\"").concat(constants_2.ADORNER_GRIP_RADIUS, "\" fill=\"").concat(adornerFill, "\" stroke=\"").concat(adornerStroke, "\"/>\n</svg>");
|
|
371
|
-
};
|
|
@@ -64,13 +64,13 @@ export declare class CursorTooltipSvgAnnotation extends SvgAnnotationBase {
|
|
|
64
64
|
/**
|
|
65
65
|
* @inheritDoc
|
|
66
66
|
*/
|
|
67
|
-
update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
|
|
67
|
+
update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
|
|
68
68
|
/** @inheritDoc */
|
|
69
69
|
delete(): void;
|
|
70
70
|
/**
|
|
71
71
|
* @inheritDoc
|
|
72
72
|
*/
|
|
73
|
-
protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
|
|
73
|
+
protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
|
|
74
74
|
private updateTooltip;
|
|
75
75
|
private updateLegendTooltip;
|
|
76
76
|
private updateExternalLegendTooltip;
|
|
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.CursorTooltipSvgAnnotation = void 0;
|
|
19
19
|
var MousePosition_1 = require("../../../types/MousePosition");
|
|
20
|
+
var annotationHelpers_1 = require("./annotationHelpers");
|
|
20
21
|
var constants_1 = require("./constants");
|
|
21
22
|
var IAnnotation_1 = require("./IAnnotation");
|
|
22
23
|
var SvgAnnotationBase_1 = require("./SvgAnnotationBase");
|
|
@@ -30,8 +31,9 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
|
|
|
30
31
|
* @param options
|
|
31
32
|
*/
|
|
32
33
|
function CursorTooltipSvgAnnotation(options) {
|
|
34
|
+
var _this = this;
|
|
33
35
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
34
|
-
|
|
36
|
+
_this = _super.call(this, options) || this;
|
|
35
37
|
/** @inheritDoc */
|
|
36
38
|
_this.type = IAnnotation_1.EAnnotationType.SVG;
|
|
37
39
|
_this.seriesInfosProperty = [];
|
|
@@ -64,14 +66,15 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
|
|
|
64
66
|
*/
|
|
65
67
|
set: function (newSeriesInfos) {
|
|
66
68
|
if (this.seriesInfosProperty && newSeriesInfos) {
|
|
69
|
+
this.seriesInfosProperty = newSeriesInfos;
|
|
67
70
|
// Compare infos against the ones for the matching series. See if any are different
|
|
71
|
+
// This logic is needed to prevent infinite rerendering
|
|
68
72
|
if (newSeriesInfos.length !== this.seriesInfosProperty.length ||
|
|
69
73
|
this.seriesInfosProperty
|
|
70
74
|
.map(function (seriesInfo) {
|
|
71
75
|
return seriesInfo.equals(newSeriesInfos.find(function (newSeriesInfo) { return newSeriesInfo.renderableSeries.id === seriesInfo.renderableSeries.id; }));
|
|
72
76
|
})
|
|
73
77
|
.some(function (sameSeriesInfo) { return sameSeriesInfo === false; })) {
|
|
74
|
-
this.seriesInfosProperty = newSeriesInfos;
|
|
75
78
|
this.notifyPropertyChanged(constants_1.PROPERTY.SERIES_INFOS);
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -169,7 +172,7 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
|
|
|
169
172
|
/**
|
|
170
173
|
* @inheritDoc
|
|
171
174
|
*/
|
|
172
|
-
CursorTooltipSvgAnnotation.prototype.update = function (xCalc, yCalc) {
|
|
175
|
+
CursorTooltipSvgAnnotation.prototype.update = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
|
|
173
176
|
var currentMousePosition = this.cursorModifier.getMousePosition();
|
|
174
177
|
if (this.previousMousePosition === currentMousePosition && currentMousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
|
|
175
178
|
return;
|
|
@@ -178,12 +181,12 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
|
|
|
178
181
|
if (this.svg) {
|
|
179
182
|
this.delete();
|
|
180
183
|
}
|
|
181
|
-
this.create(xCalc, yCalc);
|
|
184
|
+
this.create(xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
|
|
182
185
|
if (this.placementDivId) {
|
|
183
186
|
this.updateExternalLegendTooltip();
|
|
184
187
|
}
|
|
185
188
|
else {
|
|
186
|
-
this.updateTooltip();
|
|
189
|
+
this.updateTooltip(xCoordSvgTrans, yCoordSvgTrans);
|
|
187
190
|
this.updateLegendTooltip();
|
|
188
191
|
}
|
|
189
192
|
};
|
|
@@ -202,29 +205,28 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
|
|
|
202
205
|
/**
|
|
203
206
|
* @inheritDoc
|
|
204
207
|
*/
|
|
205
|
-
CursorTooltipSvgAnnotation.prototype.create = function (xCalc, yCalc) {
|
|
208
|
+
CursorTooltipSvgAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
|
|
206
209
|
if (!this.tooltipSvgTemplate)
|
|
207
210
|
throw Error("Please provide a tooltipSvgTemplate for CursorTooltipSvgAnnotation");
|
|
208
211
|
var svgString = this.tooltipSvgTemplate(this.seriesInfos, this);
|
|
209
|
-
var svgNode = document.createRange().createContextualFragment(svgString);
|
|
210
212
|
if (this.placementDivId) {
|
|
211
|
-
this.svgDivRoot
|
|
212
|
-
this.setSvg(
|
|
213
|
+
var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgDivRoot);
|
|
214
|
+
this.setSvg(svgNode);
|
|
213
215
|
}
|
|
214
216
|
else {
|
|
215
|
-
this.svgRoot
|
|
216
|
-
this.setSvg(
|
|
217
|
+
var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
|
|
218
|
+
this.setSvg(svgNode);
|
|
217
219
|
}
|
|
218
220
|
};
|
|
219
|
-
CursorTooltipSvgAnnotation.prototype.updateTooltip = function () {
|
|
221
|
+
CursorTooltipSvgAnnotation.prototype.updateTooltip = function (xCoordSvgTrans, yCoordSvgTrans) {
|
|
220
222
|
var _a, _b, _c, _d;
|
|
221
223
|
var shiftX = (_a = this.xCoordShift) !== null && _a !== void 0 ? _a : 0;
|
|
222
224
|
var shiftY = (_b = this.yCoordShift) !== null && _b !== void 0 ? _b : 0;
|
|
223
225
|
this.svg.style.display = this.isHidden ? "none" : "block";
|
|
224
226
|
var mousePointX = (_c = this.x1) !== null && _c !== void 0 ? _c : 0;
|
|
225
227
|
var mousePointY = (_d = this.y1) !== null && _d !== void 0 ? _d : 0;
|
|
226
|
-
var x1Coord = shiftX + mousePointX;
|
|
227
|
-
var y1Coord = shiftY + mousePointY;
|
|
228
|
+
var x1Coord = shiftX + mousePointX + xCoordSvgTrans;
|
|
229
|
+
var y1Coord = shiftY + mousePointY + yCoordSvgTrans;
|
|
228
230
|
if (isNaN(x1Coord) || isNaN(y1Coord)) {
|
|
229
231
|
this.svg.style.display = "none";
|
|
230
232
|
}
|
|
@@ -236,12 +238,11 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
|
|
|
236
238
|
CursorTooltipSvgAnnotation.prototype.updateLegendTooltip = function () {
|
|
237
239
|
if (this.tooltipLegendTemplate) {
|
|
238
240
|
var svgString = this.seriesInfos ? this.tooltipLegendTemplate(this.seriesInfos, this) : "<svg></svg>";
|
|
239
|
-
var svgNode = document.createRange().createContextualFragment(svgString);
|
|
240
241
|
if (this.svgLegend) {
|
|
241
242
|
this.svgRoot.removeChild(this.svgLegend);
|
|
242
243
|
}
|
|
243
|
-
this.svgRoot
|
|
244
|
-
this.svgLegend =
|
|
244
|
+
var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
|
|
245
|
+
this.svgLegend = svgNode;
|
|
245
246
|
this.svgLegend.setAttribute("x", this.tooltipLegendOffsetX.toString());
|
|
246
247
|
this.svgLegend.setAttribute("y", this.tooltipLegendOffsetY.toString());
|
|
247
248
|
}
|
|
@@ -251,12 +252,11 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
|
|
|
251
252
|
var svgString = this.seriesInfos
|
|
252
253
|
? this.tooltipLegendTemplate(this.seriesInfos, this)
|
|
253
254
|
: "<svg style='display: none'></svg>";
|
|
254
|
-
var svgNode = document.createRange().createContextualFragment(svgString);
|
|
255
255
|
if (this.svgLegend) {
|
|
256
256
|
this.svgLegend.removeChild(this.svgLegend);
|
|
257
257
|
}
|
|
258
|
-
|
|
259
|
-
this.svgLegend =
|
|
258
|
+
var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
|
|
259
|
+
this.svgLegend = svgNode;
|
|
260
260
|
}
|
|
261
261
|
};
|
|
262
262
|
return CursorTooltipSvgAnnotation;
|
|
@@ -31,7 +31,7 @@ export declare class CustomAnnotation extends SvgAnnotationBase {
|
|
|
31
31
|
options: Required<Omit<import("./AnnotationBase").IAnnotationBaseOptions, never>>;
|
|
32
32
|
};
|
|
33
33
|
/** @inheritDoc */
|
|
34
|
-
protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
|
|
34
|
+
protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
|
|
35
35
|
get svgString(): string;
|
|
36
36
|
set svgString(value: string);
|
|
37
37
|
}
|
|
@@ -29,8 +29,9 @@ var CustomAnnotation = /** @class */ (function (_super) {
|
|
|
29
29
|
* @param options The {@link ICustomAnnotationOptions} which contain optional parameters
|
|
30
30
|
*/
|
|
31
31
|
function CustomAnnotation(options) {
|
|
32
|
+
var _this = this;
|
|
32
33
|
var _a;
|
|
33
|
-
|
|
34
|
+
_this = _super.call(this, options) || this;
|
|
34
35
|
/** @inheritDoc */
|
|
35
36
|
_this.type = IAnnotation_1.EAnnotationType.SVGCustomAnnotation;
|
|
36
37
|
_this.svgStringProperty = (_a = options === null || options === void 0 ? void 0 : options.svgString) !== null && _a !== void 0 ? _a : undefined;
|
|
@@ -46,7 +47,7 @@ var CustomAnnotation = /** @class */ (function (_super) {
|
|
|
46
47
|
return json;
|
|
47
48
|
};
|
|
48
49
|
/** @inheritDoc */
|
|
49
|
-
CustomAnnotation.prototype.create = function (xCalc, yCalc) {
|
|
50
|
+
CustomAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
|
|
50
51
|
if (this.svg && !this.isEditable) {
|
|
51
52
|
this.calcAndSetAnnotationBorders(xCalc, yCalc);
|
|
52
53
|
return;
|
|
@@ -58,8 +58,9 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
|
|
|
58
58
|
* @param options Optional parameters of type {@link ILineAnnotationOptions} which configure the annotation upon construction
|
|
59
59
|
*/
|
|
60
60
|
function HorizontalLineAnnotation(options) {
|
|
61
|
+
var _this = this;
|
|
61
62
|
var _a, _b, _c;
|
|
62
|
-
|
|
63
|
+
_this = _super.call(this, options) || this;
|
|
63
64
|
/** @inheritDoc */
|
|
64
65
|
_this.type = IAnnotation_1.EAnnotationType.RenderContextHorizontalLineAnnotation;
|
|
65
66
|
_this.dragOnLine = true;
|
|
@@ -114,6 +115,8 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
|
|
|
114
115
|
Guard_1.Guard.notNull(yCalc, "yCalc");
|
|
115
116
|
var strokePen = this.stroke && this.strokeThickness ? (0, Pen2DCache_1.getWebGlPenFromCache)(this.strokePenCache) : undefined;
|
|
116
117
|
var _a = this.getDrawConfig(xCalc, yCalc), annotationCoord = _a.annotationCoord, lineAnnotationEdgeCoord = _a.lineAnnotationEdgeCoord, horizontalAxis = _a.horizontalAxis, verticalAxis = _a.verticalAxis, horizontalAxisCoordinateMode = _a.horizontalAxisCoordinateMode, verticalAxisCoordinateMode = _a.verticalAxisCoordinateMode, horizontalCoordinateCalculator = _a.horizontalCoordinateCalculator, verticalCoordinateCalculator = _a.verticalCoordinateCalculator, isAlignmentRight = _a.isAlignmentRight;
|
|
118
|
+
if (!horizontalAxis || !verticalAxis)
|
|
119
|
+
return;
|
|
117
120
|
var borderX1 = 0;
|
|
118
121
|
var borderX2 = viewRect.width;
|
|
119
122
|
if (isAlignmentRight) {
|
|
@@ -192,7 +195,7 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
|
|
|
192
195
|
verticalAxisCoordinateMode: this.yCoordinateMode,
|
|
193
196
|
horizontalCoordinateCalculator: xCalc,
|
|
194
197
|
verticalCoordinateCalculator: yCalc,
|
|
195
|
-
isAlignmentRight: yAxis.axisAlignment === AxisAlignment_1.EAxisAlignment.Right
|
|
198
|
+
isAlignmentRight: (yAxis === null || yAxis === void 0 ? void 0 : yAxis.axisAlignment) === AxisAlignment_1.EAxisAlignment.Right
|
|
196
199
|
};
|
|
197
200
|
var verticalChartCoordinateConfig = {
|
|
198
201
|
annotationCoord: this.x1,
|
|
@@ -203,7 +206,7 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
|
|
|
203
206
|
verticalAxisCoordinateMode: this.xCoordinateMode,
|
|
204
207
|
horizontalCoordinateCalculator: yCalc,
|
|
205
208
|
verticalCoordinateCalculator: xCalc,
|
|
206
|
-
isAlignmentRight: xAxis.axisAlignment === AxisAlignment_1.EAxisAlignment.Right
|
|
209
|
+
isAlignmentRight: (xAxis === null || xAxis === void 0 ? void 0 : xAxis.axisAlignment) === AxisAlignment_1.EAxisAlignment.Right
|
|
207
210
|
};
|
|
208
211
|
return this.isVerticalChart ? verticalChartCoordinateConfig : defaultChartCoordinateConfig;
|
|
209
212
|
};
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { ModifierMouseArgs } from "../../ChartModifiers/ModifierMouseArgs";
|
|
2
2
|
export interface IAdornerProvider {
|
|
3
|
+
/** The stroke color for the adorner drag handle */
|
|
4
|
+
annotationsGripsStroke: string;
|
|
5
|
+
/** The fill color for the adorner drag handle */
|
|
6
|
+
annotationsGripsFill: string;
|
|
7
|
+
/** The radius of the adorner drag handle */
|
|
8
|
+
annotationsGripsRadius: number;
|
|
9
|
+
/** The stroke color for the adorner selection box */
|
|
10
|
+
selectionBoxStroke: string;
|
|
11
|
+
/** How much bigger the selection box is than the bounding box of the annotation, in pixels */
|
|
12
|
+
selectionBoxDelta: number;
|
|
13
|
+
/** The thickness of the selection box line */
|
|
14
|
+
selectionBoxThickness: number;
|
|
3
15
|
isDraggingStarted: boolean;
|
|
4
16
|
clickToSelect(args: ModifierMouseArgs): boolean;
|
|
5
17
|
onDragStarted(args: ModifierMouseArgs): boolean;
|
|
@@ -83,6 +83,15 @@ export declare enum EAnnotationType {
|
|
|
83
83
|
* but more flexible SVG to draw annotations on the chart
|
|
84
84
|
*/
|
|
85
85
|
RenderContextAxisMarkerAnnotation = "RenderContextAxisMarkerAnnotation",
|
|
86
|
+
/**
|
|
87
|
+
* The Annotation is an {@link NativeTextAnnotation | NativeTextAnnotation}
|
|
88
|
+
* @remarks
|
|
89
|
+
* {@link NativeTextAnnotation | NativeTextAnnotation} * are drawn on the
|
|
90
|
+
* {@link https://www.scichart.com/javascript-chart-features | Javascript chart} using WebGL2 where available.
|
|
91
|
+
* They differ from {@link TextAnnotation | TextAnnotation} which use slower,
|
|
92
|
+
* but more flexible SVG to draw annotations on the chart
|
|
93
|
+
*/
|
|
94
|
+
RenderContextNativeTextAnnotation = "RenderContextNativeTextAnnotation",
|
|
86
95
|
/**
|
|
87
96
|
* The Annotation is an {@link TextAnnotation | TextAnnotation}
|
|
88
97
|
* @remarks
|
|
@@ -83,6 +83,15 @@ var EAnnotationType;
|
|
|
83
83
|
* but more flexible SVG to draw annotations on the chart
|
|
84
84
|
*/
|
|
85
85
|
EAnnotationType["RenderContextAxisMarkerAnnotation"] = "RenderContextAxisMarkerAnnotation";
|
|
86
|
+
/**
|
|
87
|
+
* The Annotation is an {@link NativeTextAnnotation | NativeTextAnnotation}
|
|
88
|
+
* @remarks
|
|
89
|
+
* {@link NativeTextAnnotation | NativeTextAnnotation} * are drawn on the
|
|
90
|
+
* {@link https://www.scichart.com/javascript-chart-features | Javascript chart} using WebGL2 where available.
|
|
91
|
+
* They differ from {@link TextAnnotation | TextAnnotation} which use slower,
|
|
92
|
+
* but more flexible SVG to draw annotations on the chart
|
|
93
|
+
*/
|
|
94
|
+
EAnnotationType["RenderContextNativeTextAnnotation"] = "RenderContextNativeTextAnnotation";
|
|
86
95
|
/**
|
|
87
96
|
* The Annotation is an {@link TextAnnotation | TextAnnotation}
|
|
88
97
|
* @remarks
|
|
@@ -188,4 +188,5 @@ export declare class LineAnnotation extends RenderContextAnnotationBase {
|
|
|
188
188
|
protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
|
|
189
189
|
protected notifyPropertyChanged(propertyName: string): void;
|
|
190
190
|
protected updateAdornerInner(): void;
|
|
191
|
+
protected svgStringAdornerTemplate: (x1: number, y1: number, x2: number, y2: number) => string;
|
|
191
192
|
}
|
|
@@ -58,8 +58,9 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
58
58
|
* @param options Optional parameters of type {@link ILineAnnotationOptions} which configure the annotation upon construction
|
|
59
59
|
*/
|
|
60
60
|
function LineAnnotation(options) {
|
|
61
|
+
var _this = this;
|
|
61
62
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
62
|
-
|
|
63
|
+
_this = _super.call(this, options) || this;
|
|
63
64
|
/** @inheritDoc */
|
|
64
65
|
_this.type = IAnnotation_1.EAnnotationType.RenderContextLineAnnotation;
|
|
65
66
|
_this.axisFontSizeProperty = 14;
|
|
@@ -72,6 +73,10 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
72
73
|
_this.axisLabelFillProperty = "#b36200";
|
|
73
74
|
_this.labelPlacementProperty = LabelPlacement_1.ELabelPlacement.Auto;
|
|
74
75
|
_this.labelValueProperty = "";
|
|
76
|
+
_this.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
77
|
+
var colorLine = _this.selectionBoxStroke;
|
|
78
|
+
return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"".concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"6\" />\n ").concat(_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1) ? _this.getAnnotationGripSvg(x1, y1) : "", "\n ").concat(_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2) ? _this.getAnnotationGripSvg(x2, y2) : "", "\n </svg>");
|
|
79
|
+
};
|
|
75
80
|
_this.stroke = (_a = options === null || options === void 0 ? void 0 : options.stroke) !== null && _a !== void 0 ? _a : _this.strokeProperty;
|
|
76
81
|
_this.strokeThickness = (_b = options === null || options === void 0 ? void 0 : options.strokeThickness) !== null && _b !== void 0 ? _b : _this.strokeThicknessProperty;
|
|
77
82
|
_this.strokeDashArray = (_c = options === null || options === void 0 ? void 0 : options.strokeDashArray) !== null && _c !== void 0 ? _c : _this.strokeDashArrayProperty;
|
|
@@ -320,21 +325,21 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
320
325
|
var xyCoord1 = this.getXYCoordinatesFromValues(new Point_1.Point(x1, y1));
|
|
321
326
|
var xyCoord2 = this.getXYCoordinatesFromValues(new Point_1.Point(x2, y2));
|
|
322
327
|
var xyCoordBody = new Point_1.Point(args.mousePoint.x, args.mousePoint.y);
|
|
323
|
-
if (xyCoord1) {
|
|
328
|
+
if (xyCoord1 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
324
329
|
var dist = (0, pointUtil_1.calcDistance)(xyCoord1.x, xyCoord1.y, args.mousePoint.x, args.mousePoint.y);
|
|
325
|
-
if (dist <
|
|
326
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
330
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
331
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y1;
|
|
327
332
|
return true;
|
|
328
333
|
}
|
|
329
334
|
}
|
|
330
|
-
if (xyCoord2) {
|
|
335
|
+
if (xyCoord2 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
331
336
|
var dist = (0, pointUtil_1.calcDistance)(xyCoord2.x, xyCoord2.y, args.mousePoint.x, args.mousePoint.y);
|
|
332
|
-
if (dist <
|
|
333
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
337
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
338
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x2y2;
|
|
334
339
|
return true;
|
|
335
340
|
}
|
|
336
341
|
}
|
|
337
|
-
if (xyCoordBody) {
|
|
342
|
+
if (xyCoordBody && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.Body)) {
|
|
338
343
|
if (this.clickToSelect(args)) {
|
|
339
344
|
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.Body;
|
|
340
345
|
return true;
|
|
@@ -343,12 +348,12 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
343
348
|
return false;
|
|
344
349
|
};
|
|
345
350
|
LineAnnotation.prototype.calcDragDistance = function (xyValues) {
|
|
351
|
+
if (!this.prevValue) {
|
|
352
|
+
this.prevValue = xyValues;
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
346
355
|
var isVerticalChart = this.parentSurface.getYAxisById(this.yAxisId).isVerticalChart;
|
|
347
356
|
if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.Body) {
|
|
348
|
-
if (!this.prevValue) {
|
|
349
|
-
this.prevValue = xyValues;
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
357
|
if (this.type === IAnnotation_1.EAnnotationType.RenderContextHorizontalLineAnnotation) {
|
|
353
358
|
if (isVerticalChart) {
|
|
354
359
|
this.x1 = this.x1 - (this.prevValue.x - xyValues.x);
|
|
@@ -371,36 +376,32 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
371
376
|
this.y1 = this.y1 - (this.prevValue.y - xyValues.y);
|
|
372
377
|
this.y2 = this.y2 - (this.prevValue.y - xyValues.y);
|
|
373
378
|
}
|
|
374
|
-
this.prevValue = xyValues;
|
|
375
379
|
}
|
|
376
|
-
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.
|
|
380
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x1y1) {
|
|
377
381
|
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
378
|
-
this.
|
|
379
|
-
this.x1 = xyValues.x;
|
|
382
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
380
383
|
}
|
|
381
384
|
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
382
|
-
this.
|
|
383
|
-
this.y1 = xyValues.y;
|
|
385
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
384
386
|
}
|
|
385
387
|
else {
|
|
386
|
-
this.x1
|
|
387
|
-
this.y1
|
|
388
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
389
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
388
390
|
}
|
|
389
391
|
}
|
|
390
|
-
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.
|
|
392
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x2y2) {
|
|
391
393
|
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
392
|
-
this.
|
|
393
|
-
this.x2 = xyValues.x;
|
|
394
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
394
395
|
}
|
|
395
396
|
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
396
|
-
this.
|
|
397
|
-
this.y2 = xyValues.y;
|
|
397
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
398
398
|
}
|
|
399
399
|
else {
|
|
400
|
-
this.x2
|
|
401
|
-
this.y2
|
|
400
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
401
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
+
this.prevValue = xyValues;
|
|
404
405
|
};
|
|
405
406
|
/**
|
|
406
407
|
* @instance
|
|
@@ -448,17 +449,10 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
448
449
|
this.deleteAdorner();
|
|
449
450
|
if (this.isSelected) {
|
|
450
451
|
var _a = this.getAdornerAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
451
|
-
var svgString = svgStringAdornerTemplate(x1, y1, x2, y2);
|
|
452
|
+
var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
|
|
452
453
|
this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
|
|
453
454
|
}
|
|
454
455
|
};
|
|
455
456
|
return LineAnnotation;
|
|
456
457
|
}(RenderContextAnnotationBase_1.RenderContextAnnotationBase));
|
|
457
458
|
exports.LineAnnotation = LineAnnotation;
|
|
458
|
-
/** @ignore */
|
|
459
|
-
var svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
460
|
-
var colorLine = "#f00e0e66";
|
|
461
|
-
var adornerFill = "#CDCDCD22";
|
|
462
|
-
var adornerStroke = "#CDCDCD99";
|
|
463
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"".concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"6\" />\n <circle cx=\"").concat(x1, "\" cy=\"").concat(y1, "\" r=\"").concat(constants_1.ADORNER_GRIP_RADIUS, "\" fill=\"").concat(adornerFill, "\" stroke=\"").concat(adornerStroke, "\"/>\n <circle cx=\"").concat(x2, "\" cy=\"").concat(y2, "\" r=\"").concat(constants_1.ADORNER_GRIP_RADIUS, "\" fill=\"").concat(adornerFill, "\" stroke=\"").concat(adornerStroke, "\"/>\n</svg>");
|
|
464
|
-
};
|