scichart 2.2.2417 → 3.0.0-beta.224
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Builder/buildDataSeries.d.ts +16 -1
- package/Builder/buildDataSeries.js +24 -1
- package/Builder/buildSeries.d.ts +60 -3
- package/Builder/buildSeries.js +28 -1
- package/Builder/buildSurface.d.ts +28 -2
- package/Builder/buildSurface.js +53 -31
- package/Builder/chartBuilder.d.ts +20 -7
- package/Builder/chartBuilder.js +37 -3
- package/Charting/ChartModifiers/ChartModifierBase.d.ts +21 -0
- package/Charting/ChartModifiers/ChartModifierBase.js +12 -0
- package/Charting/ChartModifiers/ChartModifierBase2D.js +2 -1
- package/Charting/ChartModifiers/CursorModifier.d.ts +83 -10
- package/Charting/ChartModifiers/CursorModifier.js +147 -58
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +2 -1
- package/Charting/ChartModifiers/LegendModifier.js +2 -1
- package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +6 -1
- package/Charting/ChartModifiers/ModifierMouseArgs.js +13 -3
- package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +2 -2
- package/Charting/ChartModifiers/MouseWheelZoomModifier.js +16 -4
- package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +2 -1
- package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +8 -4
- package/Charting/ChartModifiers/PinchZoomModifier.js +2 -1
- package/Charting/ChartModifiers/RolloverModifier.d.ts +40 -0
- package/Charting/ChartModifiers/RolloverModifier.js +40 -3
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +2 -1
- package/Charting/ChartModifiers/SeriesSelectionModifier.js +2 -1
- package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/XAxisDragModifier.js +2 -1
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/YAxisDragModifier.js +2 -1
- package/Charting/ChartModifiers/ZoomExtentsModifier.js +2 -1
- package/Charting/ChartModifiers/ZoomPanModifier.js +2 -1
- package/Charting/ChartModifiers/constants.d.ts +3 -1
- package/Charting/ChartModifiers/constants.js +2 -0
- package/Charting/Drawing/BatchRenderContext.d.ts +6 -0
- package/Charting/Drawing/BatchRenderContext.js +40 -0
- package/Charting/Drawing/RenderSurface.d.ts +2 -1
- package/Charting/Drawing/RenderSurface.js +3 -2
- package/Charting/Drawing/WebGlRenderContext2D.d.ts +19 -4
- package/Charting/Drawing/WebGlRenderContext2D.js +70 -41
- package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.js +2 -1
- package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/CentralAxesLayoutManager.js +2 -1
- package/Charting/LayoutManager/LayoutManager.d.ts +2 -1
- package/Charting/LayoutManager/LayoutManager.js +6 -5
- package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +1 -1
- package/Charting/Model/BaseDataSeries.d.ts +10 -1
- package/Charting/Model/BaseDataSeries.js +9 -8
- package/Charting/Model/BaseHeatmapDataSeries.d.ts +18 -5
- package/Charting/Model/BaseHeatmapDataSeries.js +21 -13
- package/Charting/Model/ChartData/SeriesInfo.d.ts +6 -0
- package/Charting/Model/ChartData/SeriesInfo.js +5 -0
- package/Charting/Model/ChartData/XyySeriesInfo.d.ts +2 -0
- package/Charting/Model/ChartData/XyySeriesInfo.js +2 -0
- package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +4 -3
- package/Charting/Model/Filters/HlcCustomFilter.js +12 -9
- package/Charting/Model/Filters/HlcFilterBase.js +2 -1
- package/Charting/Model/Filters/HlcScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/OhlcCustomFilter.js +12 -9
- package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/XyCustomFilter.js +12 -9
- package/Charting/Model/Filters/XyFilterBase.d.ts +14 -5
- package/Charting/Model/Filters/XyFilterBase.js +47 -15
- package/Charting/Model/Filters/XyMovingAverageFilter.js +2 -1
- package/Charting/Model/Filters/XyRatioFilter.js +2 -1
- package/Charting/Model/Filters/XyScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/XyyCustomFilter.js +12 -9
- package/Charting/Model/Filters/XyyFilterBase.js +2 -1
- package/Charting/Model/Filters/XyyScaleOffsetFilter.js +2 -1
- package/Charting/Model/Filters/XyzCustomFilter.js +12 -9
- package/Charting/Model/Filters/XyzFilterBase.js +2 -1
- package/Charting/Model/Filters/XyzScaleOffsetFilter.js +2 -1
- package/Charting/Model/IDataSeries.d.ts +9 -1
- package/Charting/Model/IDataSeries.js +8 -0
- package/Charting/Model/NonUniformHeatmapDataSeries.d.ts +112 -0
- package/Charting/Model/NonUniformHeatmapDataSeries.js +261 -0
- package/Charting/Model/PaletteFactory.d.ts +40 -4
- package/Charting/Model/PaletteFactory.js +37 -11
- package/Charting/Model/XyTextDataSeries.d.ts +121 -0
- package/Charting/Model/XyTextDataSeries.js +274 -0
- package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +1 -1
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +1 -1
- package/Charting/Services/RenderPassData.d.ts +15 -5
- package/Charting/Services/RenderPassData.js +27 -5
- package/Charting/Services/SciChartRenderer.d.ts +2 -1
- package/Charting/Services/SciChartRenderer.js +92 -29
- package/Charting/Themes/IThemeProvider.d.ts +61 -0
- package/Charting/Themes/IThemeProvider.js +67 -1
- package/Charting/Themes/SciChartJSDarkTheme.d.ts +4 -0
- package/Charting/Themes/SciChartJSDarkTheme.js +6 -2
- package/Charting/Themes/SciChartJSDarkv2Theme.js +3 -0
- package/Charting/Themes/SciChartJSLightTheme.d.ts +8 -0
- package/Charting/Themes/SciChartJSLightTheme.js +8 -0
- package/Charting/Themes/SciChartJsNavyTheme.d.ts +10 -0
- package/Charting/Themes/SciChartJsNavyTheme.js +49 -0
- package/Charting/Visuals/Annotations/AdornerLayer.js +4 -8
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +80 -7
- package/Charting/Visuals/Annotations/AnnotationBase.js +238 -28
- package/Charting/Visuals/Annotations/AnnotationClickEventArgs.d.ts +11 -0
- package/Charting/Visuals/Annotations/AnnotationClickEventArgs.js +12 -0
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -0
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +18 -19
- package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -0
- package/Charting/Visuals/Annotations/BoxAnnotation.js +69 -67
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +20 -20
- package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/CustomAnnotation.js +3 -2
- package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +6 -3
- package/Charting/Visuals/Annotations/IAdornerProvider.d.ts +12 -0
- package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -0
- package/Charting/Visuals/Annotations/IAnnotation.js +9 -0
- package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -0
- package/Charting/Visuals/Annotations/LineAnnotation.js +29 -35
- package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +193 -0
- package/Charting/Visuals/Annotations/NativeTextAnnotation.js +536 -0
- package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.d.ts +4 -2
- package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +19 -14
- package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +9 -8
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +6 -6
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +16 -17
- package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +13 -2
- package/Charting/Visuals/Annotations/SvgAnnotationBase.js +34 -42
- package/Charting/Visuals/Annotations/TextAnnotation.d.ts +2 -2
- package/Charting/Visuals/Annotations/TextAnnotation.js +41 -22
- package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +6 -3
- package/Charting/Visuals/Annotations/annotationHelpers.d.ts +6 -6
- package/Charting/Visuals/Annotations/annotationHelpers.js +7 -6
- package/Charting/Visuals/Annotations/constants.d.ts +13 -1
- package/Charting/Visuals/Annotations/constants.js +12 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +24 -4
- package/Charting/Visuals/Axis/AxisBase2D.js +115 -38
- package/Charting/Visuals/Axis/AxisCore.d.ts +10 -5
- package/Charting/Visuals/Axis/AxisCore.js +11 -10
- package/Charting/Visuals/Axis/AxisRenderer.js +114 -20
- package/Charting/Visuals/Axis/CategoryAxis.js +2 -1
- package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +15 -15
- package/Charting/Visuals/Axis/CategoryAxisBase.js +14 -12
- package/Charting/Visuals/Axis/DateTimeNumericAxis.js +2 -1
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/DateLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +14 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +140 -33
- package/Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/NumericLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +2 -1
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +31 -1
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +64 -42
- package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +2 -2
- package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.js +16 -19
- package/Charting/Visuals/Axis/LogarithmicAxis.js +9 -6
- package/Charting/Visuals/Axis/NumericAxis.js +3 -3
- package/Charting/Visuals/Axis/constants.d.ts +1 -0
- package/Charting/Visuals/Axis/constants.js +1 -0
- package/Charting/Visuals/HeatmapLegend.d.ts +95 -0
- package/Charting/Visuals/HeatmapLegend.js +192 -0
- package/Charting/Visuals/Helpers/NativeObject.d.ts +15 -2
- package/Charting/Visuals/Helpers/NativeObject.js +72 -6
- package/Charting/Visuals/I2DSurfaceOptions.d.ts +46 -0
- package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +5 -0
- package/Charting/Visuals/PointMarkers/BasePointMarker.js +28 -0
- package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +8 -0
- package/Charting/Visuals/RenderableSeries/Animations/BandAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/BandAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/BubbleAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/CustomPointMarkerStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/LineAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/MountainAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/MountainAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimationStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/PointMarkerStyle.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/ScatterAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +8 -2
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +3 -3
- package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.js +2 -1
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +42 -10
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +128 -0
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +201 -0
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +26 -0
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +39 -3
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +17 -2
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +2 -0
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +15 -2
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +10 -0
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +93 -17
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +8 -1
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +21 -1
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +4 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +43 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.js +142 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +92 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +129 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.d.ts +17 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.js +62 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +47 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.js +125 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +71 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.js +221 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.js +2 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +208 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +410 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +40 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +141 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +63 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.js +198 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +35 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.js +92 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.d.ts +12 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +134 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.d.ts +56 -0
- package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +167 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +0 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +47 -40
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +18 -5
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +0 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +14 -27
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +17 -4
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +34 -11
- package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.d.ts +36 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +493 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +5 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +8 -5
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +4 -4
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +15 -4
- package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +21 -0
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +40 -4
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +2 -0
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +18 -3
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +36 -2
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +77 -8
- package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +16 -4
- package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastMountainRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +17 -0
- package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +45 -0
- package/Charting/Visuals/RenderableSeries/HeatmapColorMap.js +3 -2
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +35 -5
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +17 -1
- package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +8 -0
- package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +7 -1
- package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.d.ts +20 -0
- package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.js +86 -0
- package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.d.ts +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.js +56 -0
- package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +7 -1
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +34 -2
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +6 -1
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +12 -0
- package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.d.ts +74 -0
- package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.js +99 -0
- package/Charting/Visuals/RenderableSeries/ShaderEffect.js +2 -2
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +2 -3
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +2 -1
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +13 -2
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -1
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +33 -9
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +7 -1
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +2 -75
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +8 -130
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +7 -1
- package/Charting/Visuals/RenderableSeries/constants.d.ts +5 -1
- package/Charting/Visuals/RenderableSeries/constants.js +4 -0
- package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +3 -3
- package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
- package/Charting/Visuals/SciChartDefaults.js +4 -0
- package/Charting/Visuals/SciChartOverview.js +5 -3
- package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -0
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -0
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +22 -4
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +2 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +1 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +5 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +17 -19
- package/Charting/Visuals/SciChartSurface.d.ts +225 -7
- package/Charting/Visuals/SciChartSurface.js +782 -28
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +16 -1
- package/Charting/Visuals/SciChartSurfaceBase.js +34 -2
- package/Charting/Visuals/TextureManager/CanvasTexture.js +1 -1
- package/Charting/Visuals/TextureManager/DpiHelper.js +3 -7
- package/Charting/Visuals/TextureManager/TextureManager.d.ts +11 -0
- package/Charting/Visuals/TextureManager/TextureManager.js +37 -1
- package/Charting/Visuals/createMaster.js +7 -10
- package/Charting/Visuals/createSingle.js +2 -0
- package/Charting/Visuals/licenseManager2D.js +9 -9
- package/Charting/Visuals/sciChartInitCommon.js +16 -12
- package/Charting3D/CameraController.d.ts +5 -0
- package/Charting3D/CameraController.js +6 -0
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +2 -1
- package/Charting3D/Visuals/Axis/AxisBase3D.js +7 -5
- package/Charting3D/Visuals/Axis/NumericAxis3D.js +2 -1
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +4 -0
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +7 -0
- package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +6 -4
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +7 -2
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +3 -2
- package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.d.ts +0 -5
- package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.js +12 -11
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
- package/Charting3D/Visuals/SciChart3DSurface.js +18 -11
- package/Charting3D/Visuals/createMaster3d.js +10 -18
- package/Charting3D/Visuals/createSingle3d.js +12 -10
- package/Core/Animations/GenericAnimation.d.ts +2 -0
- package/Core/Animations/GenericAnimation.js +3 -0
- package/Core/Animations/NumberRangeAnimator.js +7 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/Mouse/MouseManager.d.ts +20 -0
- package/Core/Mouse/MouseManager.js +199 -30
- package/README.md +91 -403
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.data +0 -0
- package/_wasm/scichart2d.js +280 -267
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.data +0 -0
- package/_wasm/scichart3d.js +280 -268
- package/_wasm/scichart3d.wasm +0 -0
- package/constants/performanceWarnings.d.ts +2 -0
- package/constants/performanceWarnings.js +3 -1
- package/package.json +2 -2
- package/types/AutoColorMode.d.ts +9 -0
- package/types/AutoColorMode.js +13 -0
- package/types/BaseType.d.ts +3 -1
- package/types/BaseType.js +2 -0
- package/types/DataLabelProviderType.d.ts +15 -0
- package/types/DataLabelProviderType.js +19 -0
- package/types/DataLabelSkipMode.d.ts +21 -0
- package/types/DataLabelSkipMode.js +25 -0
- package/types/DefaultRenderLayer.d.ts +10 -0
- package/types/DefaultRenderLayer.js +14 -0
- package/types/SeriesType.d.ts +7 -1
- package/types/SeriesType.js +6 -0
- package/types/SvgClippingMode.d.ts +17 -0
- package/types/SvgClippingMode.js +21 -0
- package/types/TDataLabelStyle.d.ts +16 -0
- package/types/TDataLabelStyle.js +2 -0
- package/types/TSciChart.d.ts +214 -118
- package/types/TSciChart3D.d.ts +104 -70
- package/types/TextPosition.d.ts +17 -0
- package/types/TextPosition.js +39 -0
- package/types/ThemeProviderType.d.ts +3 -1
- package/types/ThemeProviderType.js +2 -0
- package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +10 -1
- package/utils/ccall/appendDoubleVectorFromJsArray.js +24 -1
- package/utils/memoize.d.ts +1 -0
- package/utils/memoize.js +26 -0
- package/utils/number.d.ts +1 -0
- package/utils/number.js +5 -1
- package/utils/parseColor.d.ts +2 -0
- package/utils/parseColor.js +3 -3
- package/utils/text.d.ts +5 -0
- package/utils/text.js +48 -0
- package/utils/translate.d.ts +8 -0
- package/utils/translate.js +27 -5
- package/utils/zeroArray2D.d.ts +5 -0
- package/utils/zeroArray2D.js +5 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.NativeTextAnnotation = exports.EWrapTo = void 0;
|
|
19
|
+
var Guard_1 = require("../../../Core/Guard");
|
|
20
|
+
var Point_1 = require("../../../Core/Point");
|
|
21
|
+
var AnchorPoint_1 = require("../../../types/AnchorPoint");
|
|
22
|
+
var TextPosition_1 = require("../../../types/TextPosition");
|
|
23
|
+
var XyDirection_1 = require("../../../types/XyDirection");
|
|
24
|
+
var colorUtil_1 = require("../../../utils/colorUtil");
|
|
25
|
+
var parseColor_1 = require("../../../utils/parseColor");
|
|
26
|
+
var pointUtil_1 = require("../../../utils/pointUtil");
|
|
27
|
+
var text_1 = require("../../../utils/text");
|
|
28
|
+
var translate_1 = require("../../../utils/translate");
|
|
29
|
+
var NativeObject_1 = require("../Helpers/NativeObject");
|
|
30
|
+
var DpiHelper_1 = require("../TextureManager/DpiHelper");
|
|
31
|
+
var AnnotationBase_1 = require("./AnnotationBase");
|
|
32
|
+
var annotationHelpers_1 = require("./annotationHelpers");
|
|
33
|
+
var constants_1 = require("./constants");
|
|
34
|
+
var IAnnotation_1 = require("./IAnnotation");
|
|
35
|
+
var RenderContextAnnotationBase_1 = require("./RenderContextAnnotationBase");
|
|
36
|
+
var EWrapTo;
|
|
37
|
+
(function (EWrapTo) {
|
|
38
|
+
EWrapTo["ViewRect"] = "ViewRect";
|
|
39
|
+
EWrapTo["Annotation"] = "Annotation";
|
|
40
|
+
})(EWrapTo = exports.EWrapTo || (exports.EWrapTo = {}));
|
|
41
|
+
/**
|
|
42
|
+
* @summary The {@link NativeTextAnnotation} provides an {@link AnnotationBase | Annotation} which draws a text at
|
|
43
|
+
* specific x1 y1 over the {@link SciChartSurface}
|
|
44
|
+
* @description
|
|
45
|
+
* To add a {@link NativeTextAnnotation} to a {@link SciChartSurface}, use the following code:
|
|
46
|
+
* ```ts
|
|
47
|
+
* const sciChartSurface: SciChartSurface;
|
|
48
|
+
* const textAnnotation = new NativeTextAnnotation( { x1: 1, y1: 3, color: "#FF000077", text: "Hello SciChart"});
|
|
49
|
+
* sciChartSurface.annotations.add(textAnnotation);
|
|
50
|
+
* ```
|
|
51
|
+
* @remarks Uses the fast WebGL/WebAssembly {@link WebGL2RenderingContext} for rendering
|
|
52
|
+
*/
|
|
53
|
+
var NativeTextAnnotation = /** @class */ (function (_super) {
|
|
54
|
+
__extends(NativeTextAnnotation, _super);
|
|
55
|
+
/**
|
|
56
|
+
* Create an instance of a NativeTextAnnotation
|
|
57
|
+
* @param options Optional parameters of type {@link INativeTextAnnotationOptions} which configure the annotation upon construction
|
|
58
|
+
*/
|
|
59
|
+
function NativeTextAnnotation(options) {
|
|
60
|
+
var _this = this;
|
|
61
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
62
|
+
_this = _super.call(this, options) || this;
|
|
63
|
+
/** @inheritDoc */
|
|
64
|
+
_this.type = IAnnotation_1.EAnnotationType.RenderContextNativeTextAnnotation;
|
|
65
|
+
_this.fontSizeProperty = 14;
|
|
66
|
+
_this.fontFamilyProperty = "Arial";
|
|
67
|
+
_this.textColorProperty = "#ffffff";
|
|
68
|
+
_this.rotationProperty = 0;
|
|
69
|
+
_this.textProperty = "";
|
|
70
|
+
_this.verticalAnchorPointProperty = AnchorPoint_1.EVerticalAnchorPoint.Top;
|
|
71
|
+
_this.horizontalAnchorPointProperty = AnchorPoint_1.EHorizontalAnchorPoint.Left;
|
|
72
|
+
_this.multiLineAlignmentProperty = TextPosition_1.EMultiLineAlignment.Center;
|
|
73
|
+
_this.lineSpacingProperty = 3;
|
|
74
|
+
_this.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
75
|
+
var colorLine = _this.selectionBoxStroke;
|
|
76
|
+
var width = x2 - x1;
|
|
77
|
+
var height = y2 - y1;
|
|
78
|
+
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 ");
|
|
79
|
+
var grips = _this.getAdornerAnnotationBorders(false, true);
|
|
80
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
81
|
+
svg += _this.getAnnotationGripSvg(grips.x1, grips.y1);
|
|
82
|
+
}
|
|
83
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
84
|
+
svg += _this.getAnnotationGripSvg(grips.x2, grips.y2);
|
|
85
|
+
}
|
|
86
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
87
|
+
svg += _this.getAnnotationGripSvg(grips.x2, grips.y1);
|
|
88
|
+
}
|
|
89
|
+
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
90
|
+
svg += _this.getAnnotationGripSvg(grips.x1, grips.y2);
|
|
91
|
+
}
|
|
92
|
+
svg += "</svg>";
|
|
93
|
+
return svg;
|
|
94
|
+
};
|
|
95
|
+
_this.textColorProperty = (_a = options === null || options === void 0 ? void 0 : options.textColor) !== null && _a !== void 0 ? _a : _this.textColorProperty;
|
|
96
|
+
_this.fontSizeProperty = (_b = options === null || options === void 0 ? void 0 : options.fontSize) !== null && _b !== void 0 ? _b : _this.fontSizeProperty;
|
|
97
|
+
_this.fontFamilyProperty = (_c = options === null || options === void 0 ? void 0 : options.fontFamily) !== null && _c !== void 0 ? _c : _this.fontFamilyProperty;
|
|
98
|
+
_this.rotationProperty = (_d = options === null || options === void 0 ? void 0 : options.rotation) !== null && _d !== void 0 ? _d : _this.rotationProperty;
|
|
99
|
+
_this.textProperty = (_e = options === null || options === void 0 ? void 0 : options.text) !== null && _e !== void 0 ? _e : _this.textProperty;
|
|
100
|
+
_this.verticalAnchorPointProperty = (_f = options === null || options === void 0 ? void 0 : options.verticalAnchorPoint) !== null && _f !== void 0 ? _f : _this.verticalAnchorPointProperty;
|
|
101
|
+
_this.horizontalAnchorPointProperty = (_g = options === null || options === void 0 ? void 0 : options.horizontalAnchorPoint) !== null && _g !== void 0 ? _g : _this.horizontalAnchorPointProperty;
|
|
102
|
+
_this.multiLineAlignmentProperty = (_h = options === null || options === void 0 ? void 0 : options.multiLineAlignment) !== null && _h !== void 0 ? _h : _this.multiLineAlignmentProperty;
|
|
103
|
+
_this.wrapToProperty = (_j = options === null || options === void 0 ? void 0 : options.wrapTo) !== null && _j !== void 0 ? _j : _this.wrapToProperty;
|
|
104
|
+
_this.lineSpacingProperty = (_k = options === null || options === void 0 ? void 0 : options.lineSpacing) !== null && _k !== void 0 ? _k : _this.lineSpacingProperty;
|
|
105
|
+
return _this;
|
|
106
|
+
}
|
|
107
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "textColor", {
|
|
108
|
+
/**
|
|
109
|
+
* Gets the color for the {@link NativeTextAnnotation}
|
|
110
|
+
*/
|
|
111
|
+
get: function () {
|
|
112
|
+
return this.textColorProperty;
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Sets the color for the {@link NativeTextAnnotation}
|
|
116
|
+
*/
|
|
117
|
+
set: function (value) {
|
|
118
|
+
this.textColorProperty = value;
|
|
119
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.COLOR);
|
|
120
|
+
},
|
|
121
|
+
enumerable: false,
|
|
122
|
+
configurable: true
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "fontSize", {
|
|
125
|
+
/**
|
|
126
|
+
* Gets the fontSize for the {@link NativeTextAnnotation}
|
|
127
|
+
*/
|
|
128
|
+
get: function () {
|
|
129
|
+
return this.fontSizeProperty;
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* Sets the fontSize for the {@link NativeTextAnnotation}
|
|
133
|
+
*/
|
|
134
|
+
set: function (value) {
|
|
135
|
+
this.fontSizeProperty = value;
|
|
136
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_FONT_SIZE);
|
|
137
|
+
},
|
|
138
|
+
enumerable: false,
|
|
139
|
+
configurable: true
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "fontFamily", {
|
|
142
|
+
/**
|
|
143
|
+
* Gets the fontSize for the {@link NativeTextAnnotation}
|
|
144
|
+
*/
|
|
145
|
+
get: function () {
|
|
146
|
+
return this.fontFamilyProperty;
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Sets the fontSize for the {@link NativeTextAnnotation}
|
|
150
|
+
*/
|
|
151
|
+
set: function (value) {
|
|
152
|
+
this.fontFamilyProperty = value;
|
|
153
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_FONT_FAMILY);
|
|
154
|
+
},
|
|
155
|
+
enumerable: false,
|
|
156
|
+
configurable: true
|
|
157
|
+
});
|
|
158
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "rotation", {
|
|
159
|
+
/**
|
|
160
|
+
* Gets the rotation for the {@link NativeTextAnnotation}
|
|
161
|
+
*/
|
|
162
|
+
get: function () {
|
|
163
|
+
return this.rotationProperty;
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
* Sets the labelPlacement for the {@link NativeTextAnnotation}
|
|
167
|
+
*/
|
|
168
|
+
set: function (value) {
|
|
169
|
+
this.rotationProperty = value;
|
|
170
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.ROTATION);
|
|
171
|
+
},
|
|
172
|
+
enumerable: false,
|
|
173
|
+
configurable: true
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "text", {
|
|
176
|
+
/**
|
|
177
|
+
* Gets the text for the {@link NativeTextAnnotation}
|
|
178
|
+
*/
|
|
179
|
+
get: function () {
|
|
180
|
+
return this.textProperty;
|
|
181
|
+
},
|
|
182
|
+
/**
|
|
183
|
+
* Sets the text for the {@link NativeTextAnnotation}
|
|
184
|
+
*/
|
|
185
|
+
set: function (value) {
|
|
186
|
+
this.textProperty = value;
|
|
187
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.TEXT);
|
|
188
|
+
},
|
|
189
|
+
enumerable: false,
|
|
190
|
+
configurable: true
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "verticalAnchorPoint", {
|
|
193
|
+
/**
|
|
194
|
+
* Gets or sets vertical anchor point
|
|
195
|
+
*/
|
|
196
|
+
get: function () {
|
|
197
|
+
return this.verticalAnchorPointProperty;
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
* Gets or sets vertical anchor point
|
|
201
|
+
*/
|
|
202
|
+
set: function (value) {
|
|
203
|
+
if (this.verticalAnchorPointProperty !== value) {
|
|
204
|
+
this.verticalAnchorPointProperty = value;
|
|
205
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.VERTICAL_ANCHOR_POINT);
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
enumerable: false,
|
|
209
|
+
configurable: true
|
|
210
|
+
});
|
|
211
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "horizontalAnchorPoint", {
|
|
212
|
+
/**
|
|
213
|
+
* Gets or sets horizontal anchor point
|
|
214
|
+
*/
|
|
215
|
+
get: function () {
|
|
216
|
+
return this.horizontalAnchorPointProperty;
|
|
217
|
+
},
|
|
218
|
+
/**
|
|
219
|
+
* Gets or sets horizontal anchor point
|
|
220
|
+
*/
|
|
221
|
+
set: function (value) {
|
|
222
|
+
if (this.horizontalAnchorPointProperty !== value) {
|
|
223
|
+
this.horizontalAnchorPointProperty = value;
|
|
224
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.HORIZONTAL_ANCHOR_POINT);
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
enumerable: false,
|
|
228
|
+
configurable: true
|
|
229
|
+
});
|
|
230
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "multiLineAlignment", {
|
|
231
|
+
/**
|
|
232
|
+
* Gets or sets the horizontal alignment mode for multiline text
|
|
233
|
+
*/
|
|
234
|
+
get: function () {
|
|
235
|
+
return this.multiLineAlignmentProperty;
|
|
236
|
+
},
|
|
237
|
+
/**
|
|
238
|
+
* Gets or sets the horizontal alignment mode for multiline text
|
|
239
|
+
*/
|
|
240
|
+
set: function (value) {
|
|
241
|
+
if (this.multiLineAlignmentProperty !== value) {
|
|
242
|
+
this.multiLineAlignmentProperty = value;
|
|
243
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.MULTILINE_ALIGNMENT);
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
enumerable: false,
|
|
247
|
+
configurable: true
|
|
248
|
+
});
|
|
249
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "wrapTo", {
|
|
250
|
+
/**
|
|
251
|
+
* Gets or sets the text wrapping mode. A pure number will be treated as a pixel width. Default is undefined meaning no wrap
|
|
252
|
+
*/
|
|
253
|
+
get: function () {
|
|
254
|
+
return this.wrapToProperty;
|
|
255
|
+
},
|
|
256
|
+
/**
|
|
257
|
+
* Gets or sets the text wrapping mode. A pure number will be treated as a pixel width. Default is undefined meaning no wrap
|
|
258
|
+
*/
|
|
259
|
+
set: function (value) {
|
|
260
|
+
if (this.wrapToProperty !== value) {
|
|
261
|
+
this.wrapToProperty = value;
|
|
262
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.WRAP_TO);
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
enumerable: false,
|
|
266
|
+
configurable: true
|
|
267
|
+
});
|
|
268
|
+
Object.defineProperty(NativeTextAnnotation.prototype, "lineSpacing", {
|
|
269
|
+
/**
|
|
270
|
+
* The spacing between lines. Default 3
|
|
271
|
+
* If a whole number then treated as pixels. If between 0 and 1 then treated as a fraction of line height
|
|
272
|
+
*/
|
|
273
|
+
get: function () {
|
|
274
|
+
return this.lineSpacingProperty;
|
|
275
|
+
},
|
|
276
|
+
/**
|
|
277
|
+
* The spacing between lines. Default 3
|
|
278
|
+
* If a whole number then treated as pixels. If between 0 and 1 then treated as a fraction of line height
|
|
279
|
+
*/
|
|
280
|
+
set: function (value) {
|
|
281
|
+
this.lineSpacingProperty = value;
|
|
282
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.LINE_SPACING);
|
|
283
|
+
},
|
|
284
|
+
enumerable: false,
|
|
285
|
+
configurable: true
|
|
286
|
+
});
|
|
287
|
+
/** @inheritDoc */
|
|
288
|
+
NativeTextAnnotation.prototype.delete = function () { };
|
|
289
|
+
/** @inheritDoc */
|
|
290
|
+
NativeTextAnnotation.prototype.onAttach = function (scs) {
|
|
291
|
+
_super.prototype.onAttach.call(this, scs);
|
|
292
|
+
};
|
|
293
|
+
/** Calculate the center point for a rotation */
|
|
294
|
+
NativeTextAnnotation.prototype.getRotationCenter = function (x, y, bounds) {
|
|
295
|
+
return new Point_1.Point(x, y);
|
|
296
|
+
};
|
|
297
|
+
/** @inheritDoc */
|
|
298
|
+
NativeTextAnnotation.prototype.drawWithContext = function (renderContext, xCalc, yCalc, viewRect) {
|
|
299
|
+
Guard_1.Guard.notNull(renderContext, "renderContext");
|
|
300
|
+
Guard_1.Guard.notNull(xCalc, "xCalc");
|
|
301
|
+
Guard_1.Guard.notNull(yCalc, "yCalc");
|
|
302
|
+
var x1 = this.getX1Coordinate(xCalc, yCalc);
|
|
303
|
+
var y1 = this.getY1Coordinate(xCalc, yCalc);
|
|
304
|
+
var style = {
|
|
305
|
+
fontFamily: this.fontFamily,
|
|
306
|
+
fontSize: this.fontSize
|
|
307
|
+
};
|
|
308
|
+
var colorNum = (0, parseColor_1.parseColorToUIntArgb)(this.textColor);
|
|
309
|
+
colorNum = (0, colorUtil_1.uintArgbColorOverrideOpacity)(colorNum, this.opacity);
|
|
310
|
+
var font;
|
|
311
|
+
var rotationVector;
|
|
312
|
+
var rotationRads = -(this.rotation * Math.PI) / 180;
|
|
313
|
+
font = renderContext.getFont(style, this.rotation !== 0, false);
|
|
314
|
+
var textBounds = (0, NativeObject_1.getTextBounds)(this.parentSurface.webAssemblyContext2D);
|
|
315
|
+
var text = this.text;
|
|
316
|
+
if (this.wrapTo) {
|
|
317
|
+
var wrapWidth = Infinity;
|
|
318
|
+
if (typeof this.wrapTo === "number") {
|
|
319
|
+
wrapWidth = this.wrapTo;
|
|
320
|
+
}
|
|
321
|
+
else if (this.wrapTo === EWrapTo.ViewRect) {
|
|
322
|
+
if (this.horizontalAnchorPoint === AnchorPoint_1.EHorizontalAnchorPoint.Left) {
|
|
323
|
+
wrapWidth = this.parentSurface.seriesViewRect.width - x1;
|
|
324
|
+
}
|
|
325
|
+
else if (this.horizontalAnchorPoint === AnchorPoint_1.EHorizontalAnchorPoint.Center) {
|
|
326
|
+
wrapWidth = 2 * Math.min(x1, this.parentSurface.seriesViewRect.width - x1);
|
|
327
|
+
}
|
|
328
|
+
else if (this.horizontalAnchorPoint === AnchorPoint_1.EHorizontalAnchorPoint.Right) {
|
|
329
|
+
wrapWidth = x1;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
else if (this.wrapTo === EWrapTo.Annotation) {
|
|
333
|
+
var x2 = this.getX2Coordinate(xCalc, yCalc);
|
|
334
|
+
if (x2 > x1) {
|
|
335
|
+
wrapWidth = x2 - x1;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
text = (0, text_1.wrapNativeText)(this.text, wrapWidth, font, textBounds);
|
|
339
|
+
}
|
|
340
|
+
var spacing = this.lineSpacing;
|
|
341
|
+
font.CalculateStringBounds(text !== null && text !== void 0 ? text : "", textBounds, spacing);
|
|
342
|
+
if (spacing < 1) {
|
|
343
|
+
spacing =
|
|
344
|
+
this.lineSpacing * (textBounds.GetLineBounds(0).m_fHeight - textBounds.GetLineBounds(0).m_fOffsetY);
|
|
345
|
+
font.CalculateStringBounds(text !== null && text !== void 0 ? text : "", textBounds, spacing);
|
|
346
|
+
}
|
|
347
|
+
var rotationCenter = this.getRotationCenter(x1 + viewRect.x, y1 + viewRect.y, textBounds);
|
|
348
|
+
rotationVector = (0, NativeObject_1.getVector4)(this.parentSurface.webAssemblyContext2D, rotationCenter.x, rotationCenter.y, rotationRads, 0);
|
|
349
|
+
if (this.horizontalAnchorPointProperty === AnchorPoint_1.EHorizontalAnchorPoint.Center) {
|
|
350
|
+
x1 -= textBounds.m_fWidth / 2;
|
|
351
|
+
}
|
|
352
|
+
else if (this.horizontalAnchorPointProperty === AnchorPoint_1.EHorizontalAnchorPoint.Right) {
|
|
353
|
+
x1 -= textBounds.m_fWidth;
|
|
354
|
+
}
|
|
355
|
+
if (this.verticalAnchorPointProperty === AnchorPoint_1.EVerticalAnchorPoint.Center) {
|
|
356
|
+
y1 += textBounds.GetLineBounds(0).m_fHeight / 2;
|
|
357
|
+
y1 -=
|
|
358
|
+
((textBounds.GetLineBounds(0).m_fHeight - textBounds.GetLineBounds(0).m_fOffsetY) *
|
|
359
|
+
(textBounds.GetLinesCount() - 1)) /
|
|
360
|
+
2;
|
|
361
|
+
}
|
|
362
|
+
else if (this.verticalAnchorPointProperty === AnchorPoint_1.EVerticalAnchorPoint.Top) {
|
|
363
|
+
y1 += textBounds.GetLineBounds(0).m_fHeight;
|
|
364
|
+
}
|
|
365
|
+
else if (textBounds.GetLinesCount() > 1) {
|
|
366
|
+
y1 += textBounds.GetLineBounds(0).m_fOffsetY;
|
|
367
|
+
y1 -=
|
|
368
|
+
(textBounds.GetLineBounds(0).m_fHeight - textBounds.GetLineBounds(0).m_fOffsetY) *
|
|
369
|
+
(textBounds.GetLinesCount() - 1);
|
|
370
|
+
}
|
|
371
|
+
var x = x1 + viewRect.x;
|
|
372
|
+
var y = y1 + viewRect.y;
|
|
373
|
+
var borderX1 = x1;
|
|
374
|
+
var borderY1 = y1 - textBounds.GetLineBounds(0).m_fHeight;
|
|
375
|
+
var borderX2 = x1 + textBounds.m_fWidth;
|
|
376
|
+
var borderY2 = borderY1 + textBounds.m_fHeight;
|
|
377
|
+
if (this.rotation !== 0) {
|
|
378
|
+
var sin_1 = Math.sin(rotationRads);
|
|
379
|
+
var cos_1 = Math.cos(rotationRads);
|
|
380
|
+
var rc_1 = this.getRotationCenter(x1, y1, textBounds);
|
|
381
|
+
var transform = function (a, b) {
|
|
382
|
+
var ta = (a - rc_1.x) * cos_1 + (b - rc_1.y) * sin_1;
|
|
383
|
+
var tb = (b - rc_1.y) * cos_1 - (a - rc_1.x) * sin_1;
|
|
384
|
+
return { x: ta, y: tb };
|
|
385
|
+
};
|
|
386
|
+
var x1y1 = transform(borderX1, borderY1);
|
|
387
|
+
var x2y1 = transform(borderX2, borderY1);
|
|
388
|
+
var x1y2 = transform(borderX1, borderY2);
|
|
389
|
+
var x2y2 = transform(borderX2, borderY2);
|
|
390
|
+
borderX1 = Math.min(x1y1.x, x2y1.x, x1y2.x, x2y2.x) + rc_1.x;
|
|
391
|
+
borderX2 = Math.max(x1y1.x, x2y1.x, x1y2.x, x2y2.x) + rc_1.x;
|
|
392
|
+
borderY1 = Math.min(x1y1.y, x2y1.y, x1y2.y, x2y2.y) + rc_1.y;
|
|
393
|
+
borderY2 = Math.max(x1y1.y, x2y1.y, x1y2.y, x2y2.y) + rc_1.y;
|
|
394
|
+
}
|
|
395
|
+
this.setAnnotationBorders(borderX1, borderX2, borderY1, borderY2);
|
|
396
|
+
var alignMode = (0, TextPosition_1.convertMultiLineAlignment)(this.multiLineAlignment, this.parentSurface.webAssemblyContext2D);
|
|
397
|
+
font.DrawStringAdvanced(text, colorNum, Math.round(x), Math.round(y), rotationVector, alignMode, spacing);
|
|
398
|
+
this.updateAdornerInner();
|
|
399
|
+
};
|
|
400
|
+
NativeTextAnnotation.prototype.onDragStarted = function (args) {
|
|
401
|
+
_super.prototype.onDragStarted.call(this, args);
|
|
402
|
+
var _a = this.getAnnotationBorders(false, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
403
|
+
var _b = annotationHelpers_1.annotationHelpers.calcNewApex(x1, y1, x2, y2, this.isVerticalChart), x1y1 = _b.x1y1, x2y1 = _b.x2y1, x1y2 = _b.x1y2, x2y2 = _b.x2y2;
|
|
404
|
+
var xyMousePoint = (0, translate_1.translateFromCanvasToSeriesViewRect)(new Point_1.Point(args.mousePoint.x, args.mousePoint.y), this.parentSurface.seriesViewRect);
|
|
405
|
+
if (x1y1 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
406
|
+
var dist = (0, pointUtil_1.calcDistance)(x1y1.x, x1y1.y, xyMousePoint.x, xyMousePoint.y);
|
|
407
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
408
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y1;
|
|
409
|
+
return true;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
if (x2y1 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
413
|
+
var dist = (0, pointUtil_1.calcDistance)(x2y1.x, x2y1.y, xyMousePoint.x, xyMousePoint.y);
|
|
414
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
415
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x2y1;
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (x1y2 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
420
|
+
var dist = (0, pointUtil_1.calcDistance)(x1y2.x, x1y2.y, xyMousePoint.x, xyMousePoint.y);
|
|
421
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
422
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y2;
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
if (x2y2 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
427
|
+
var dist = (0, pointUtil_1.calcDistance)(x2y2.x, x2y2.y, xyMousePoint.x, xyMousePoint.y);
|
|
428
|
+
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
429
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x2y2;
|
|
430
|
+
return true;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
if (xyMousePoint && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.Body)) {
|
|
434
|
+
if (this.clickToSelect(args)) {
|
|
435
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.Body;
|
|
436
|
+
return true;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return false;
|
|
440
|
+
};
|
|
441
|
+
NativeTextAnnotation.prototype.calcDragDistance = function (xyValues) {
|
|
442
|
+
if (!this.prevValue) {
|
|
443
|
+
this.prevValue = xyValues;
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.Body) {
|
|
447
|
+
this.x1 = this.x1 - (this.prevValue.x - xyValues.x);
|
|
448
|
+
this.x2 = this.x2 - (this.prevValue.x - xyValues.x);
|
|
449
|
+
this.y1 = this.y1 - (this.prevValue.y - xyValues.y);
|
|
450
|
+
this.y2 = this.y2 - (this.prevValue.y - xyValues.y);
|
|
451
|
+
}
|
|
452
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x1y1) {
|
|
453
|
+
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
454
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
455
|
+
}
|
|
456
|
+
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
457
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
461
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x2y2) {
|
|
465
|
+
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
466
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
467
|
+
}
|
|
468
|
+
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
469
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
473
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x2y1) {
|
|
477
|
+
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
478
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
479
|
+
}
|
|
480
|
+
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
481
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
this.x2 -= this.prevValue.x - xyValues.x;
|
|
485
|
+
this.y1 -= this.prevValue.y - xyValues.y;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x1y2) {
|
|
489
|
+
if (this.resizeDirections === XyDirection_1.EXyDirection.XDirection) {
|
|
490
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
491
|
+
}
|
|
492
|
+
else if (this.resizeDirections === XyDirection_1.EXyDirection.YDirection) {
|
|
493
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
this.x1 -= this.prevValue.x - xyValues.x;
|
|
497
|
+
this.y2 -= this.prevValue.y - xyValues.y;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
this.prevValue = xyValues;
|
|
501
|
+
};
|
|
502
|
+
/**
|
|
503
|
+
* @instance
|
|
504
|
+
*/
|
|
505
|
+
NativeTextAnnotation.prototype.onDpiChanged = function (args) {
|
|
506
|
+
_super.prototype.onDpiChanged.call(this, args);
|
|
507
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.STROKE);
|
|
508
|
+
};
|
|
509
|
+
NativeTextAnnotation.prototype.toJSON = function () {
|
|
510
|
+
var json = _super.prototype.toJSON.call(this);
|
|
511
|
+
var options = {
|
|
512
|
+
fontFamily: this.fontFamily,
|
|
513
|
+
fontSize: this.fontSize,
|
|
514
|
+
textColor: this.textColor,
|
|
515
|
+
rotation: this.rotation,
|
|
516
|
+
text: this.text
|
|
517
|
+
};
|
|
518
|
+
Object.assign(json.options, options);
|
|
519
|
+
return json;
|
|
520
|
+
};
|
|
521
|
+
NativeTextAnnotation.prototype.checkIsClickedOnAnnotationInternal = function (x, y) {
|
|
522
|
+
var _a = this.getAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
523
|
+
return (0, pointUtil_1.testIsInBounds)(x, y, x1, y2, x2, y1);
|
|
524
|
+
};
|
|
525
|
+
NativeTextAnnotation.prototype.updateAdornerInner = function () {
|
|
526
|
+
var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
|
|
527
|
+
this.deleteAdorner();
|
|
528
|
+
if (this.isSelected) {
|
|
529
|
+
var _a = this.getAdornerAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
530
|
+
var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
|
|
531
|
+
this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
return NativeTextAnnotation;
|
|
535
|
+
}(RenderContextAnnotationBase_1.RenderContextAnnotationBase));
|
|
536
|
+
exports.NativeTextAnnotation = NativeTextAnnotation;
|
|
@@ -75,8 +75,10 @@ export declare class OverviewCustomResizableAnnotation extends CustomAnnotation
|
|
|
75
75
|
* Updates the annotation position, with the {@link CoordinateCalculatorBase | Coordinate Calculators} passed in
|
|
76
76
|
* @param xCalc The XAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
|
|
77
77
|
* @param yCalc The YAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
|
|
78
|
+
* @param xCoordSvgTrans X-coordinate translation which is needed to use SVG canvas having the whole chart size
|
|
79
|
+
* @param yCoordSvgTrans Y-coordinate translation which is needed to use SVG canvas having the whole chart size
|
|
78
80
|
*/
|
|
79
|
-
update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
|
|
81
|
+
update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
|
|
80
82
|
/**
|
|
81
83
|
* Handles the dragging event. Updates the coordinates after dragging or resizing
|
|
82
84
|
* @param xyValues {@link Point}
|
|
@@ -85,7 +87,7 @@ export declare class OverviewCustomResizableAnnotation extends CustomAnnotation
|
|
|
85
87
|
/**
|
|
86
88
|
* @inheritDoc
|
|
87
89
|
*/
|
|
88
|
-
protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
|
|
90
|
+
protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
|
|
89
91
|
/**
|
|
90
92
|
* Creates or updates an adorner for the annotation
|
|
91
93
|
*/
|
|
@@ -32,8 +32,9 @@ var CustomAnnotation_1 = require("./CustomAnnotation");
|
|
|
32
32
|
var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
33
33
|
__extends(OverviewCustomResizableAnnotation, _super);
|
|
34
34
|
function OverviewCustomResizableAnnotation(options) {
|
|
35
|
+
var _this = this;
|
|
35
36
|
var _a, _b, _c;
|
|
36
|
-
|
|
37
|
+
_this = _super.call(this, options) || this;
|
|
37
38
|
_this.minWidthProperty = 10;
|
|
38
39
|
_this.minHeightProperty = 10;
|
|
39
40
|
_this.adornerSvgStringTemplateProperty =
|
|
@@ -191,24 +192,24 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
191
192
|
if (isResizableHorizontally) {
|
|
192
193
|
// Left
|
|
193
194
|
if ((0, pointUtil_1.testIsInBounds)(xMousePoint, yMousePoint, x1 - constants_1.ADORNER_GRIP_RADIUS, y2, x1 + constants_1.ADORNER_GRIP_RADIUS, y1)) {
|
|
194
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
195
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y1;
|
|
195
196
|
return true;
|
|
196
197
|
}
|
|
197
198
|
else if ((0, pointUtil_1.testIsInBounds)(xMousePoint, yMousePoint, x2 - constants_1.ADORNER_GRIP_RADIUS, y2, x2 + constants_1.ADORNER_GRIP_RADIUS, y1)) {
|
|
198
199
|
// Right
|
|
199
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
200
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x2y2;
|
|
200
201
|
return true;
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
204
|
// Top
|
|
204
205
|
if (isResizableVertically) {
|
|
205
206
|
if ((0, pointUtil_1.testIsInBounds)(xMousePoint, yMousePoint, x1, y1 + constants_1.ADORNER_GRIP_RADIUS, x2, y1 - constants_1.ADORNER_GRIP_RADIUS)) {
|
|
206
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
207
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x2y1;
|
|
207
208
|
return true;
|
|
208
209
|
}
|
|
209
210
|
else if ((0, pointUtil_1.testIsInBounds)(xMousePoint, yMousePoint, x1, y2 + constants_1.ADORNER_GRIP_RADIUS, x2, y2 - constants_1.ADORNER_GRIP_RADIUS)) {
|
|
210
211
|
// Bottom
|
|
211
|
-
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.
|
|
212
|
+
this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y2;
|
|
212
213
|
return true;
|
|
213
214
|
}
|
|
214
215
|
}
|
|
@@ -222,10 +223,12 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
222
223
|
* Updates the annotation position, with the {@link CoordinateCalculatorBase | Coordinate Calculators} passed in
|
|
223
224
|
* @param xCalc The XAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
|
|
224
225
|
* @param yCalc The YAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
|
|
226
|
+
* @param xCoordSvgTrans X-coordinate translation which is needed to use SVG canvas having the whole chart size
|
|
227
|
+
* @param yCoordSvgTrans Y-coordinate translation which is needed to use SVG canvas having the whole chart size
|
|
225
228
|
*/
|
|
226
|
-
OverviewCustomResizableAnnotation.prototype.update = function (xCalc, yCalc) {
|
|
229
|
+
OverviewCustomResizableAnnotation.prototype.update = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
|
|
227
230
|
// create svg if there is none
|
|
228
|
-
this.create(xCalc, yCalc);
|
|
231
|
+
this.create(xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
|
|
229
232
|
this.svg.style.display = this.isHidden ? "none" : "block";
|
|
230
233
|
this.svg.style.opacity = this.opacity.toString();
|
|
231
234
|
var x1Coord = this.getX1Coordinate(xCalc, yCalc);
|
|
@@ -247,8 +250,10 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
247
250
|
// calculate and adjust size accordingly to coordinates
|
|
248
251
|
var width = Math.abs(x2Coord - x1Coord);
|
|
249
252
|
var height = Math.abs(y2Coord - y1Coord);
|
|
250
|
-
|
|
251
|
-
|
|
253
|
+
var svgXCoord = (x1Coord < x2Coord ? x1Coord : x2Coord) + xCoordSvgTrans;
|
|
254
|
+
var svgYCoord = (y1Coord < y2Coord ? y1Coord : y2Coord) + yCoordSvgTrans;
|
|
255
|
+
this.setSvgAttribute("x", svgXCoord);
|
|
256
|
+
this.setSvgAttribute("y", svgYCoord);
|
|
252
257
|
this.setSvgAttribute("width", width);
|
|
253
258
|
this.setSvgAttribute("height", height);
|
|
254
259
|
this.svgDOMRect = this.svg.getBoundingClientRect();
|
|
@@ -324,7 +329,7 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
324
329
|
break;
|
|
325
330
|
}
|
|
326
331
|
// left grab point
|
|
327
|
-
case AnnotationBase_1.EDraggingGripPoint.
|
|
332
|
+
case AnnotationBase_1.EDraggingGripPoint.x1y1: {
|
|
328
333
|
if (isResizableHorizontally) {
|
|
329
334
|
if (horizontalCalc.hasFlippedCoordinates) {
|
|
330
335
|
this.adjustLeftSideToLimits(x2Coord, xyValues, horizontalCalc);
|
|
@@ -336,7 +341,7 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
336
341
|
break;
|
|
337
342
|
}
|
|
338
343
|
// Right grab point
|
|
339
|
-
case AnnotationBase_1.EDraggingGripPoint.
|
|
344
|
+
case AnnotationBase_1.EDraggingGripPoint.x2y2: {
|
|
340
345
|
if (isResizableHorizontally) {
|
|
341
346
|
if (horizontalCalc.hasFlippedCoordinates) {
|
|
342
347
|
this.adjustRightSideToLimits(x1Coord, xyValues, horizontalCalc);
|
|
@@ -348,7 +353,7 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
348
353
|
break;
|
|
349
354
|
}
|
|
350
355
|
// Top grab point
|
|
351
|
-
case AnnotationBase_1.EDraggingGripPoint.
|
|
356
|
+
case AnnotationBase_1.EDraggingGripPoint.x2y1: {
|
|
352
357
|
if (isResizableVertically) {
|
|
353
358
|
if (verticalCalc.hasFlippedCoordinates) {
|
|
354
359
|
this.adjustTopSideToLimits(y2Coord, xyValues, verticalCalc);
|
|
@@ -360,7 +365,7 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
360
365
|
break;
|
|
361
366
|
}
|
|
362
367
|
// Bottom grab point
|
|
363
|
-
case AnnotationBase_1.EDraggingGripPoint.
|
|
368
|
+
case AnnotationBase_1.EDraggingGripPoint.x1y2: {
|
|
364
369
|
if (isResizableVertically) {
|
|
365
370
|
if (verticalCalc.hasFlippedCoordinates) {
|
|
366
371
|
this.adjustBottomSideToLimits(y1Coord, xyValues, verticalCalc);
|
|
@@ -378,7 +383,7 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
|
|
|
378
383
|
/**
|
|
379
384
|
* @inheritDoc
|
|
380
385
|
*/
|
|
381
|
-
OverviewCustomResizableAnnotation.prototype.create = function (xCalc, yCalc) {
|
|
386
|
+
OverviewCustomResizableAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
|
|
382
387
|
if (this.svg) {
|
|
383
388
|
return;
|
|
384
389
|
}
|