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.
Files changed (394) hide show
  1. package/Builder/buildDataSeries.d.ts +16 -1
  2. package/Builder/buildDataSeries.js +24 -1
  3. package/Builder/buildSeries.d.ts +60 -3
  4. package/Builder/buildSeries.js +28 -1
  5. package/Builder/buildSurface.d.ts +28 -2
  6. package/Builder/buildSurface.js +53 -31
  7. package/Builder/chartBuilder.d.ts +20 -7
  8. package/Builder/chartBuilder.js +37 -3
  9. package/Charting/ChartModifiers/ChartModifierBase.d.ts +21 -0
  10. package/Charting/ChartModifiers/ChartModifierBase.js +12 -0
  11. package/Charting/ChartModifiers/ChartModifierBase2D.js +2 -1
  12. package/Charting/ChartModifiers/CursorModifier.d.ts +83 -10
  13. package/Charting/ChartModifiers/CursorModifier.js +147 -58
  14. package/Charting/ChartModifiers/DataPointSelectionModifier.js +2 -1
  15. package/Charting/ChartModifiers/LegendModifier.js +2 -1
  16. package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +6 -1
  17. package/Charting/ChartModifiers/ModifierMouseArgs.js +13 -3
  18. package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +2 -2
  19. package/Charting/ChartModifiers/MouseWheelZoomModifier.js +16 -4
  20. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +2 -1
  21. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +8 -4
  22. package/Charting/ChartModifiers/PinchZoomModifier.js +2 -1
  23. package/Charting/ChartModifiers/RolloverModifier.d.ts +40 -0
  24. package/Charting/ChartModifiers/RolloverModifier.js +40 -3
  25. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +2 -1
  26. package/Charting/ChartModifiers/SeriesSelectionModifier.js +2 -1
  27. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  28. package/Charting/ChartModifiers/XAxisDragModifier.js +2 -1
  29. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
  30. package/Charting/ChartModifiers/YAxisDragModifier.js +2 -1
  31. package/Charting/ChartModifiers/ZoomExtentsModifier.js +2 -1
  32. package/Charting/ChartModifiers/ZoomPanModifier.js +2 -1
  33. package/Charting/ChartModifiers/constants.d.ts +3 -1
  34. package/Charting/ChartModifiers/constants.js +2 -0
  35. package/Charting/Drawing/BatchRenderContext.d.ts +6 -0
  36. package/Charting/Drawing/BatchRenderContext.js +40 -0
  37. package/Charting/Drawing/RenderSurface.d.ts +2 -1
  38. package/Charting/Drawing/RenderSurface.js +3 -2
  39. package/Charting/Drawing/WebGlRenderContext2D.d.ts +19 -4
  40. package/Charting/Drawing/WebGlRenderContext2D.js +70 -41
  41. package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.js +2 -1
  42. package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +1 -1
  43. package/Charting/LayoutManager/CentralAxesLayoutManager.js +2 -1
  44. package/Charting/LayoutManager/LayoutManager.d.ts +2 -1
  45. package/Charting/LayoutManager/LayoutManager.js +6 -5
  46. package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +1 -1
  47. package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +1 -1
  48. package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +1 -1
  49. package/Charting/Model/BaseDataSeries.d.ts +10 -1
  50. package/Charting/Model/BaseDataSeries.js +9 -8
  51. package/Charting/Model/BaseHeatmapDataSeries.d.ts +18 -5
  52. package/Charting/Model/BaseHeatmapDataSeries.js +21 -13
  53. package/Charting/Model/ChartData/SeriesInfo.d.ts +6 -0
  54. package/Charting/Model/ChartData/SeriesInfo.js +5 -0
  55. package/Charting/Model/ChartData/XyySeriesInfo.d.ts +2 -0
  56. package/Charting/Model/ChartData/XyySeriesInfo.js +2 -0
  57. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +4 -3
  58. package/Charting/Model/Filters/HlcCustomFilter.js +12 -9
  59. package/Charting/Model/Filters/HlcFilterBase.js +2 -1
  60. package/Charting/Model/Filters/HlcScaleOffsetFilter.js +2 -1
  61. package/Charting/Model/Filters/OhlcCustomFilter.js +12 -9
  62. package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +2 -1
  63. package/Charting/Model/Filters/XyCustomFilter.js +12 -9
  64. package/Charting/Model/Filters/XyFilterBase.d.ts +14 -5
  65. package/Charting/Model/Filters/XyFilterBase.js +47 -15
  66. package/Charting/Model/Filters/XyMovingAverageFilter.js +2 -1
  67. package/Charting/Model/Filters/XyRatioFilter.js +2 -1
  68. package/Charting/Model/Filters/XyScaleOffsetFilter.js +2 -1
  69. package/Charting/Model/Filters/XyyCustomFilter.js +12 -9
  70. package/Charting/Model/Filters/XyyFilterBase.js +2 -1
  71. package/Charting/Model/Filters/XyyScaleOffsetFilter.js +2 -1
  72. package/Charting/Model/Filters/XyzCustomFilter.js +12 -9
  73. package/Charting/Model/Filters/XyzFilterBase.js +2 -1
  74. package/Charting/Model/Filters/XyzScaleOffsetFilter.js +2 -1
  75. package/Charting/Model/IDataSeries.d.ts +9 -1
  76. package/Charting/Model/IDataSeries.js +8 -0
  77. package/Charting/Model/NonUniformHeatmapDataSeries.d.ts +112 -0
  78. package/Charting/Model/NonUniformHeatmapDataSeries.js +261 -0
  79. package/Charting/Model/PaletteFactory.d.ts +40 -4
  80. package/Charting/Model/PaletteFactory.js +37 -11
  81. package/Charting/Model/XyTextDataSeries.d.ts +121 -0
  82. package/Charting/Model/XyTextDataSeries.js +274 -0
  83. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +1 -1
  84. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +1 -1
  85. package/Charting/Services/RenderPassData.d.ts +15 -5
  86. package/Charting/Services/RenderPassData.js +27 -5
  87. package/Charting/Services/SciChartRenderer.d.ts +2 -1
  88. package/Charting/Services/SciChartRenderer.js +92 -29
  89. package/Charting/Themes/IThemeProvider.d.ts +61 -0
  90. package/Charting/Themes/IThemeProvider.js +67 -1
  91. package/Charting/Themes/SciChartJSDarkTheme.d.ts +4 -0
  92. package/Charting/Themes/SciChartJSDarkTheme.js +6 -2
  93. package/Charting/Themes/SciChartJSDarkv2Theme.js +3 -0
  94. package/Charting/Themes/SciChartJSLightTheme.d.ts +8 -0
  95. package/Charting/Themes/SciChartJSLightTheme.js +8 -0
  96. package/Charting/Themes/SciChartJsNavyTheme.d.ts +10 -0
  97. package/Charting/Themes/SciChartJsNavyTheme.js +49 -0
  98. package/Charting/Visuals/Annotations/AdornerLayer.js +4 -8
  99. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +80 -7
  100. package/Charting/Visuals/Annotations/AnnotationBase.js +238 -28
  101. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.d.ts +11 -0
  102. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.js +12 -0
  103. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -0
  104. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +18 -19
  105. package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -0
  106. package/Charting/Visuals/Annotations/BoxAnnotation.js +69 -67
  107. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +2 -2
  108. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +20 -20
  109. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
  110. package/Charting/Visuals/Annotations/CustomAnnotation.js +3 -2
  111. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +6 -3
  112. package/Charting/Visuals/Annotations/IAdornerProvider.d.ts +12 -0
  113. package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -0
  114. package/Charting/Visuals/Annotations/IAnnotation.js +9 -0
  115. package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -0
  116. package/Charting/Visuals/Annotations/LineAnnotation.js +29 -35
  117. package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +193 -0
  118. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +536 -0
  119. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.d.ts +4 -2
  120. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +19 -14
  121. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +2 -2
  122. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +9 -8
  123. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +2 -2
  124. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +6 -6
  125. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +2 -2
  126. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +16 -17
  127. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +13 -2
  128. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +34 -42
  129. package/Charting/Visuals/Annotations/TextAnnotation.d.ts +2 -2
  130. package/Charting/Visuals/Annotations/TextAnnotation.js +41 -22
  131. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +6 -3
  132. package/Charting/Visuals/Annotations/annotationHelpers.d.ts +6 -6
  133. package/Charting/Visuals/Annotations/annotationHelpers.js +7 -6
  134. package/Charting/Visuals/Annotations/constants.d.ts +13 -1
  135. package/Charting/Visuals/Annotations/constants.js +12 -0
  136. package/Charting/Visuals/Axis/AxisBase2D.d.ts +24 -4
  137. package/Charting/Visuals/Axis/AxisBase2D.js +115 -38
  138. package/Charting/Visuals/Axis/AxisCore.d.ts +10 -5
  139. package/Charting/Visuals/Axis/AxisCore.js +11 -10
  140. package/Charting/Visuals/Axis/AxisRenderer.js +114 -20
  141. package/Charting/Visuals/Axis/CategoryAxis.js +2 -1
  142. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +15 -15
  143. package/Charting/Visuals/Axis/CategoryAxisBase.js +14 -12
  144. package/Charting/Visuals/Axis/DateTimeNumericAxis.js +2 -1
  145. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +2 -1
  146. package/Charting/Visuals/Axis/LabelProvider/DateLabelProvider.js +2 -1
  147. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -0
  148. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +14 -0
  149. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +140 -33
  150. package/Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider.js +2 -1
  151. package/Charting/Visuals/Axis/LabelProvider/NumericLabelProvider.js +2 -1
  152. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +2 -1
  153. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +31 -1
  154. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +64 -42
  155. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +2 -2
  156. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.js +16 -19
  157. package/Charting/Visuals/Axis/LogarithmicAxis.js +9 -6
  158. package/Charting/Visuals/Axis/NumericAxis.js +3 -3
  159. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  160. package/Charting/Visuals/Axis/constants.js +1 -0
  161. package/Charting/Visuals/HeatmapLegend.d.ts +95 -0
  162. package/Charting/Visuals/HeatmapLegend.js +192 -0
  163. package/Charting/Visuals/Helpers/NativeObject.d.ts +15 -2
  164. package/Charting/Visuals/Helpers/NativeObject.js +72 -6
  165. package/Charting/Visuals/I2DSurfaceOptions.d.ts +46 -0
  166. package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +5 -0
  167. package/Charting/Visuals/PointMarkers/BasePointMarker.js +28 -0
  168. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +8 -0
  169. package/Charting/Visuals/RenderableSeries/Animations/BandAnimation.js +2 -1
  170. package/Charting/Visuals/RenderableSeries/Animations/BandAnimationStyle.js +2 -1
  171. package/Charting/Visuals/RenderableSeries/Animations/BubbleAnimation.js +2 -1
  172. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimation.js +2 -1
  173. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimationStyle.js +2 -1
  174. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimation.js +2 -1
  175. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimationStyle.js +2 -1
  176. package/Charting/Visuals/RenderableSeries/Animations/CustomPointMarkerStyle.js +2 -1
  177. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.js +2 -1
  178. package/Charting/Visuals/RenderableSeries/Animations/LineAnimation.js +2 -1
  179. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimation.js +2 -1
  180. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimationStyle.js +2 -1
  181. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimation.js +2 -1
  182. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimationStyle.js +2 -1
  183. package/Charting/Visuals/RenderableSeries/Animations/PointMarkerStyle.js +2 -1
  184. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.js +2 -1
  185. package/Charting/Visuals/RenderableSeries/Animations/ScatterAnimation.js +2 -1
  186. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +8 -2
  187. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +3 -3
  188. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.js +2 -1
  189. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +7 -0
  190. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +42 -10
  191. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +128 -0
  192. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +201 -0
  193. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +26 -0
  194. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +39 -3
  195. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +7 -0
  196. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +17 -2
  197. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +2 -0
  198. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +15 -2
  199. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +10 -0
  200. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +93 -17
  201. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +8 -1
  202. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +21 -1
  203. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +1 -0
  204. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +4 -0
  205. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +43 -0
  206. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.js +142 -0
  207. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +92 -0
  208. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +129 -0
  209. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.d.ts +17 -0
  210. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.js +62 -0
  211. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +47 -0
  212. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.js +125 -0
  213. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +71 -0
  214. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.js +221 -0
  215. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.d.ts +5 -0
  216. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.js +2 -0
  217. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +208 -0
  218. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +410 -0
  219. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +40 -0
  220. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +141 -0
  221. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +63 -0
  222. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.js +198 -0
  223. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +35 -0
  224. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.js +92 -0
  225. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.d.ts +12 -0
  226. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +134 -0
  227. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.d.ts +56 -0
  228. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +167 -0
  229. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +0 -1
  230. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -2
  231. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -2
  232. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +47 -40
  233. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +1 -1
  234. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  235. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +18 -5
  236. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +0 -1
  237. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +14 -27
  238. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +17 -4
  239. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +34 -11
  240. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.d.ts +36 -0
  241. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +493 -0
  242. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +5 -2
  243. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +8 -5
  244. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +4 -4
  245. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +3 -0
  246. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +15 -4
  247. package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +2 -1
  248. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +21 -0
  249. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +40 -4
  250. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +2 -0
  251. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +18 -3
  252. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +36 -2
  253. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +77 -8
  254. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +2 -1
  255. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +7 -0
  256. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +16 -4
  257. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +2 -1
  258. package/Charting/Visuals/RenderableSeries/FastMountainRenderableSeries.js +2 -1
  259. package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +2 -1
  260. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +17 -0
  261. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +45 -0
  262. package/Charting/Visuals/RenderableSeries/HeatmapColorMap.js +3 -2
  263. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +35 -5
  264. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +17 -1
  265. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +8 -0
  266. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +7 -1
  267. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.d.ts +20 -0
  268. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.js +86 -0
  269. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.d.ts +6 -0
  270. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.js +56 -0
  271. package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +1 -1
  272. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +7 -1
  273. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +34 -2
  274. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +6 -1
  275. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +12 -0
  276. package/Charting/Visuals/RenderableSeries/ISpline.d.ts +2 -0
  277. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.d.ts +74 -0
  278. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.js +99 -0
  279. package/Charting/Visuals/RenderableSeries/ShaderEffect.js +2 -2
  280. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +5 -0
  281. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +29 -10
  282. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +7 -3
  283. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +28 -8
  284. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +5 -0
  285. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +28 -8
  286. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +2 -1
  287. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +3 -0
  288. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +13 -2
  289. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -1
  290. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +7 -0
  291. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +33 -9
  292. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  293. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +7 -1
  294. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +2 -75
  295. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +8 -130
  296. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  297. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +7 -1
  298. package/Charting/Visuals/RenderableSeries/constants.d.ts +5 -1
  299. package/Charting/Visuals/RenderableSeries/constants.js +4 -0
  300. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +3 -3
  301. package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
  302. package/Charting/Visuals/SciChartDefaults.js +4 -0
  303. package/Charting/Visuals/SciChartOverview.js +5 -3
  304. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -0
  305. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -0
  306. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +22 -4
  307. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +2 -1
  308. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +1 -0
  309. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +5 -0
  310. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +17 -19
  311. package/Charting/Visuals/SciChartSurface.d.ts +225 -7
  312. package/Charting/Visuals/SciChartSurface.js +782 -28
  313. package/Charting/Visuals/SciChartSurfaceBase.d.ts +16 -1
  314. package/Charting/Visuals/SciChartSurfaceBase.js +34 -2
  315. package/Charting/Visuals/TextureManager/CanvasTexture.js +1 -1
  316. package/Charting/Visuals/TextureManager/DpiHelper.js +3 -7
  317. package/Charting/Visuals/TextureManager/TextureManager.d.ts +11 -0
  318. package/Charting/Visuals/TextureManager/TextureManager.js +37 -1
  319. package/Charting/Visuals/createMaster.js +7 -10
  320. package/Charting/Visuals/createSingle.js +2 -0
  321. package/Charting/Visuals/licenseManager2D.js +9 -9
  322. package/Charting/Visuals/sciChartInitCommon.js +16 -12
  323. package/Charting3D/CameraController.d.ts +5 -0
  324. package/Charting3D/CameraController.js +6 -0
  325. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +2 -1
  326. package/Charting3D/Visuals/Axis/AxisBase3D.js +7 -5
  327. package/Charting3D/Visuals/Axis/NumericAxis3D.js +2 -1
  328. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +4 -0
  329. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +7 -0
  330. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +6 -4
  331. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +7 -2
  332. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +3 -2
  333. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.d.ts +0 -5
  334. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.js +12 -11
  335. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  336. package/Charting3D/Visuals/SciChart3DSurface.js +18 -11
  337. package/Charting3D/Visuals/createMaster3d.js +10 -18
  338. package/Charting3D/Visuals/createSingle3d.js +12 -10
  339. package/Core/Animations/GenericAnimation.d.ts +2 -0
  340. package/Core/Animations/GenericAnimation.js +3 -0
  341. package/Core/Animations/NumberRangeAnimator.js +7 -2
  342. package/Core/BuildStamp.d.ts +1 -1
  343. package/Core/BuildStamp.js +2 -2
  344. package/Core/Mouse/MouseManager.d.ts +20 -0
  345. package/Core/Mouse/MouseManager.js +199 -30
  346. package/README.md +91 -403
  347. package/_wasm/scichart.browser.js +1 -1
  348. package/_wasm/scichart2d.data +0 -0
  349. package/_wasm/scichart2d.js +280 -267
  350. package/_wasm/scichart2d.wasm +0 -0
  351. package/_wasm/scichart3d.data +0 -0
  352. package/_wasm/scichart3d.js +280 -268
  353. package/_wasm/scichart3d.wasm +0 -0
  354. package/constants/performanceWarnings.d.ts +2 -0
  355. package/constants/performanceWarnings.js +3 -1
  356. package/package.json +2 -2
  357. package/types/AutoColorMode.d.ts +9 -0
  358. package/types/AutoColorMode.js +13 -0
  359. package/types/BaseType.d.ts +3 -1
  360. package/types/BaseType.js +2 -0
  361. package/types/DataLabelProviderType.d.ts +15 -0
  362. package/types/DataLabelProviderType.js +19 -0
  363. package/types/DataLabelSkipMode.d.ts +21 -0
  364. package/types/DataLabelSkipMode.js +25 -0
  365. package/types/DefaultRenderLayer.d.ts +10 -0
  366. package/types/DefaultRenderLayer.js +14 -0
  367. package/types/SeriesType.d.ts +7 -1
  368. package/types/SeriesType.js +6 -0
  369. package/types/SvgClippingMode.d.ts +17 -0
  370. package/types/SvgClippingMode.js +21 -0
  371. package/types/TDataLabelStyle.d.ts +16 -0
  372. package/types/TDataLabelStyle.js +2 -0
  373. package/types/TSciChart.d.ts +214 -118
  374. package/types/TSciChart3D.d.ts +104 -70
  375. package/types/TextPosition.d.ts +17 -0
  376. package/types/TextPosition.js +39 -0
  377. package/types/ThemeProviderType.d.ts +3 -1
  378. package/types/ThemeProviderType.js +2 -0
  379. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +10 -1
  380. package/utils/ccall/appendDoubleVectorFromJsArray.js +24 -1
  381. package/utils/copyVector.d.ts +2 -0
  382. package/utils/copyVector.js +10 -0
  383. package/utils/memoize.d.ts +1 -0
  384. package/utils/memoize.js +26 -0
  385. package/utils/number.d.ts +1 -0
  386. package/utils/number.js +5 -1
  387. package/utils/parseColor.d.ts +2 -0
  388. package/utils/parseColor.js +3 -3
  389. package/utils/text.d.ts +5 -0
  390. package/utils/text.js +48 -0
  391. package/utils/translate.d.ts +8 -0
  392. package/utils/translate.js +27 -5
  393. package/utils/zeroArray2D.d.ts +5 -0
  394. package/utils/zeroArray2D.js +5 -0
@@ -41,9 +41,9 @@ export declare class RolloverLegendSvgAnnotation extends SvgAnnotationBase {
41
41
  /**
42
42
  * @inheritDoc
43
43
  */
44
- update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
44
+ update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
45
45
  /**
46
46
  * @inheritDoc
47
47
  */
48
- protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
48
+ protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
49
49
  }
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.RolloverLegendSvgAnnotation = void 0;
19
+ var annotationHelpers_1 = require("./annotationHelpers");
19
20
  var constants_1 = require("./constants");
20
21
  var IAnnotation_1 = require("./IAnnotation");
21
22
  var SvgAnnotationBase_1 = require("./SvgAnnotationBase");
@@ -29,8 +30,9 @@ var RolloverLegendSvgAnnotation = /** @class */ (function (_super) {
29
30
  * @param options
30
31
  */
31
32
  function RolloverLegendSvgAnnotation(options) {
33
+ var _this = this;
32
34
  var _a, _b, _c;
33
- var _this = _super.call(this, options) || this;
35
+ _this = _super.call(this, options) || this;
34
36
  /** @inheritDoc */
35
37
  _this.type = IAnnotation_1.EAnnotationType.SVG;
36
38
  _this.seriesInfosProperty = [];
@@ -103,25 +105,24 @@ var RolloverLegendSvgAnnotation = /** @class */ (function (_super) {
103
105
  /**
104
106
  * @inheritDoc
105
107
  */
106
- RolloverLegendSvgAnnotation.prototype.update = function (xCalc, yCalc) {
108
+ RolloverLegendSvgAnnotation.prototype.update = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
107
109
  if (!this.tooltipLegendTemplate) {
108
110
  return;
109
111
  }
110
112
  if (this.svg) {
111
113
  this.delete();
112
114
  }
113
- this.create(xCalc, yCalc);
115
+ this.create(xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
114
116
  };
115
117
  /**
116
118
  * @inheritDoc
117
119
  */
118
- RolloverLegendSvgAnnotation.prototype.create = function (xCalc, yCalc) {
120
+ RolloverLegendSvgAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
119
121
  var svgString = this.tooltipLegendTemplate(this.seriesInfos, this);
120
- var svgNode = document.createRange().createContextualFragment(svgString);
121
- this.svgRoot.appendChild(svgNode);
122
+ var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
122
123
  this.setSvg(this.svgRoot.lastChild);
123
- this.setSvgAttribute("x", this.tooltipLegendOffsetX);
124
- this.setSvgAttribute("y", this.tooltipLegendOffsetY);
124
+ this.setSvgAttribute("x", this.tooltipLegendOffsetX + xCoordSvgTrans);
125
+ this.setSvgAttribute("y", this.tooltipLegendOffsetY + yCoordSvgTrans);
125
126
  };
126
127
  return RolloverLegendSvgAnnotation;
127
128
  }(SvgAnnotationBase_1.SvgAnnotationBase));
@@ -9,7 +9,7 @@ export declare class RolloverMarkerSvgAnnotation extends SvgAnnotationBase {
9
9
  private previousMousePosition;
10
10
  constructor(renderableSeriesProps: RolloverModifierRenderableSeriesProps);
11
11
  /** @inheritDoc */
12
- update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
12
+ update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
13
13
  /** @inheritDoc */
14
- protected create(): void;
14
+ protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
15
15
  }
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.RolloverMarkerSvgAnnotation = void 0;
19
19
  var MousePosition_1 = require("../../../types/MousePosition");
20
+ var annotationHelpers_1 = require("./annotationHelpers");
20
21
  var IAnnotation_1 = require("./IAnnotation");
21
22
  var SvgAnnotationBase_1 = require("./SvgAnnotationBase");
22
23
  var RolloverMarkerSvgAnnotation = /** @class */ (function (_super) {
@@ -34,24 +35,23 @@ var RolloverMarkerSvgAnnotation = /** @class */ (function (_super) {
34
35
  return _this;
35
36
  }
36
37
  /** @inheritDoc */
37
- RolloverMarkerSvgAnnotation.prototype.update = function (xCalc, yCalc) {
38
+ RolloverMarkerSvgAnnotation.prototype.update = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
38
39
  var currentMousePosition = this.tooltipProps.rolloverModifier.getMousePosition();
39
40
  if (this.previousMousePosition === currentMousePosition && currentMousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
40
41
  return;
41
42
  }
42
43
  this.previousMousePosition = this.tooltipProps.rolloverModifier.getMousePosition();
43
- _super.prototype.update.call(this, xCalc, yCalc);
44
+ _super.prototype.update.call(this, xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
44
45
  };
45
46
  /** @inheritDoc */
46
- RolloverMarkerSvgAnnotation.prototype.create = function () {
47
+ RolloverMarkerSvgAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
47
48
  if (this.svg) {
48
49
  this.delete();
49
50
  }
50
51
  var _a = this.tooltipProps, tooltipColor = _a.tooltipColor, markerColor = _a.markerColor;
51
52
  var svgString = tooltipSvgTemplate(markerColor !== null && markerColor !== void 0 ? markerColor : tooltipColor);
52
- var svgNode = document.createRange().createContextualFragment(svgString);
53
- this.svgRoot.appendChild(svgNode);
54
- this.setSvg(this.svgRoot.lastChild);
53
+ var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
54
+ this.setSvg(svgNode);
55
55
  };
56
56
  return RolloverMarkerSvgAnnotation;
57
57
  }(SvgAnnotationBase_1.SvgAnnotationBase));
@@ -40,13 +40,13 @@ export declare class RolloverTooltipSvgAnnotation extends SvgAnnotationBase {
40
40
  /** @inheritDoc */
41
41
  delete(): void;
42
42
  /** @inheritDoc */
43
- update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
43
+ update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
44
44
  /**
45
45
  * Updates size of the tooltip
46
46
  */
47
47
  updateSize(width: number, height: number): void;
48
48
  /** @inheritDoc */
49
- protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
49
+ protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
50
50
  private generateSvgString;
51
51
  private updateLegendTooltip;
52
52
  private updateExternalLegendTooltip;
@@ -19,6 +19,7 @@ exports.RolloverTooltipSvgAnnotation = void 0;
19
19
  var MousePosition_1 = require("../../../types/MousePosition");
20
20
  var IDataSeries_1 = require("../../Model/IDataSeries");
21
21
  var AnnotationBase_1 = require("./AnnotationBase");
22
+ var annotationHelpers_1 = require("./annotationHelpers");
22
23
  var constants_1 = require("./constants");
23
24
  var IAnnotation_1 = require("./IAnnotation");
24
25
  var SvgAnnotationBase_1 = require("./SvgAnnotationBase");
@@ -34,8 +35,9 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
34
35
  * @param options
35
36
  */
36
37
  function RolloverTooltipSvgAnnotation(renderableSeriesProps, options) {
38
+ var _this = this;
37
39
  var _a, _b;
38
- var _this = _super.call(this, options) || this;
40
+ _this = _super.call(this, options) || this;
39
41
  /** @inheritDoc */
40
42
  _this.type = IAnnotation_1.EAnnotationType.SVG;
41
43
  _this.width = 0;
@@ -85,7 +87,7 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
85
87
  }
86
88
  };
87
89
  /** @inheritDoc */
88
- RolloverTooltipSvgAnnotation.prototype.update = function (xCalc, yCalc) {
90
+ RolloverTooltipSvgAnnotation.prototype.update = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
89
91
  var currentMousePosition = this.tooltipProps.rolloverModifier.getMousePosition();
90
92
  if (this.previousMousePosition === currentMousePosition && currentMousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
91
93
  return;
@@ -98,8 +100,8 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
98
100
  this.updateExternalLegendTooltip();
99
101
  }
100
102
  else {
101
- _super.prototype.update.call(this, xCalc, yCalc);
102
- this.updateLegendTooltip();
103
+ _super.prototype.update.call(this, xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
104
+ this.updateLegendTooltip(xCoordSvgTrans, yCoordSvgTrans);
103
105
  }
104
106
  };
105
107
  /**
@@ -110,7 +112,7 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
110
112
  this.height = height;
111
113
  };
112
114
  /** @inheritDoc */
113
- RolloverTooltipSvgAnnotation.prototype.create = function (xCalc, yCalc) {
115
+ RolloverTooltipSvgAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
114
116
  var svgString;
115
117
  if (!this.seriesInfo) {
116
118
  svgString = "<svg></svg>";
@@ -118,9 +120,8 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
118
120
  else {
119
121
  svgString = this.generateSvgString();
120
122
  }
121
- var svgNode = document.createRange().createContextualFragment(svgString);
122
- this.svgRoot.appendChild(svgNode);
123
- this.setSvg(this.svgRoot.lastChild);
123
+ var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
124
+ this.setSvg(svgNode);
124
125
  };
125
126
  RolloverTooltipSvgAnnotation.prototype.generateSvgString = function () {
126
127
  var _a;
@@ -130,16 +131,15 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
130
131
  var tooltipTemplate = (_a = this.tooltipProps.tooltipTemplate) !== null && _a !== void 0 ? _a : defaultTooltipTemplate;
131
132
  return tooltipTemplate(id, this.seriesInfo, this);
132
133
  };
133
- RolloverTooltipSvgAnnotation.prototype.updateLegendTooltip = function () {
134
+ RolloverTooltipSvgAnnotation.prototype.updateLegendTooltip = function (xCoordSvgTrans, yCoordSvgTrans) {
134
135
  if (this.tooltipProps.tooltipLegendTemplate) {
135
136
  var svgString = this.seriesInfo
136
137
  ? this.tooltipProps.tooltipLegendTemplate(this.tooltipProps, this.seriesInfo)
137
138
  : "<svg></svg>";
138
- var svgNode = document.createRange().createContextualFragment(svgString);
139
- this.svgRoot.appendChild(svgNode);
140
- this.svgLegend = this.svgRoot.lastChild;
141
- this.svgLegend.setAttribute("x", this.tooltipProps.tooltipLegendOffsetX.toString());
142
- this.svgLegend.setAttribute("y", this.tooltipProps.tooltipLegendOffsetY.toString());
139
+ var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
140
+ this.svgLegend = svgNode;
141
+ this.svgLegend.setAttribute("x", this.tooltipProps.tooltipLegendOffsetX.toString() + xCoordSvgTrans);
142
+ this.svgLegend.setAttribute("y", this.tooltipProps.tooltipLegendOffsetY.toString() + yCoordSvgTrans);
143
143
  }
144
144
  };
145
145
  RolloverTooltipSvgAnnotation.prototype.updateExternalLegendTooltip = function () {
@@ -150,10 +150,9 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
150
150
  else {
151
151
  svgString = this.generateSvgString();
152
152
  }
153
- var svgNode = document.createRange().createContextualFragment(svgString);
154
153
  this.svgDivRoot = document.getElementById(this.placementDivId);
155
- this.svgDivRoot.appendChild(svgNode);
156
- this.setSvg(this.svgDivRoot.lastChild);
154
+ var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgDivRoot);
155
+ this.setSvg(svgNode);
157
156
  };
158
157
  Object.defineProperty(RolloverTooltipSvgAnnotation.prototype, "placementDivId", {
159
158
  /**
@@ -10,7 +10,13 @@ import { AnnotationBase, IAnnotationBaseOptions } from "./AnnotationBase";
10
10
  export interface ISvgAnnotationBaseOptions extends IAnnotationBaseOptions {
11
11
  xCoordShift?: number;
12
12
  yCoordShift?: number;
13
+ /**
14
+ * Sets vertical anchor point
15
+ */
13
16
  verticalAnchorPoint?: EVerticalAnchorPoint;
17
+ /**
18
+ * Sets horizontal anchor point
19
+ */
14
20
  horizontalAnchorPoint?: EHorizontalAnchorPoint;
15
21
  }
16
22
  /**
@@ -76,8 +82,10 @@ export declare abstract class SvgAnnotationBase extends AnnotationBase {
76
82
  * Updates the annotation position, with the {@link CoordinateCalculatorBase | Coordinate Calculators} passed in
77
83
  * @param xCalc The XAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
78
84
  * @param yCalc The YAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
85
+ * @param xCoordSvgTrans X-coordinate translation which is needed to use SVG canvas having the whole chart size
86
+ * @param yCoordSvgTrans Y-coordinate translation which is needed to use SVG canvas having the whole chart size
79
87
  */
80
- update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
88
+ update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
81
89
  calcDragDistance(xyValues: Point): void;
82
90
  onDragStarted(args: ModifierMouseArgs): boolean;
83
91
  /** @inheritDoc */
@@ -93,8 +101,10 @@ export declare abstract class SvgAnnotationBase extends AnnotationBase {
93
101
  * Called to create the SVG Dom Element right before it is added to the parent chart
94
102
  * @param xCalc The XAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
95
103
  * @param yCalc The YAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
104
+ * @param xCoordSvgTrans X-coordinate translation which is needed to use SVG canvas having the whole chart size
105
+ * @param yCoordSvgTrans Y-coordinate translation which is needed to use SVG canvas having the whole chart size
96
106
  */
97
- protected abstract create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
107
+ protected abstract create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
98
108
  /**
99
109
  * Gets the {@link SVGSVGElement | SVG Element} at the root of this annotation
100
110
  */
@@ -106,4 +116,5 @@ export declare abstract class SvgAnnotationBase extends AnnotationBase {
106
116
  * @protected
107
117
  */
108
118
  protected calcAndSetAnnotationBorders(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
119
+ protected svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string;
109
120
  }
@@ -34,8 +34,9 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
34
34
  * @param options Optional parameters of type {@link ISvgAnnotationBaseOptions} used to configure the annotation on construction
35
35
  */
36
36
  function SvgAnnotationBase(options) {
37
+ var _this = this;
37
38
  var _a, _b, _c, _d;
38
- var _this = _super.call(this, options) || this;
39
+ _this = _super.call(this, options) || this;
39
40
  /** @inheritDoc */
40
41
  _this.isSvgAnnotation = true;
41
42
  /**
@@ -144,10 +145,12 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
144
145
  * Updates the annotation position, with the {@link CoordinateCalculatorBase | Coordinate Calculators} passed in
145
146
  * @param xCalc The XAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
146
147
  * @param yCalc The YAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
148
+ * @param xCoordSvgTrans X-coordinate translation which is needed to use SVG canvas having the whole chart size
149
+ * @param yCoordSvgTrans Y-coordinate translation which is needed to use SVG canvas having the whole chart size
147
150
  */
148
- SvgAnnotationBase.prototype.update = function (xCalc, yCalc) {
151
+ SvgAnnotationBase.prototype.update = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
149
152
  var _a, _b;
150
- this.create(xCalc, yCalc);
153
+ this.create(xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
151
154
  var shiftX = (_a = this.xCoordShift) !== null && _a !== void 0 ? _a : 0;
152
155
  var shiftY = (_b = this.yCoordShift) !== null && _b !== void 0 ? _b : 0;
153
156
  // @ts-ignore
@@ -168,8 +171,8 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
168
171
  }
169
172
  this.svg.style.visibility = this.isHidden ? "hidden" : "visible";
170
173
  this.svg.style.opacity = this.opacity.toString();
171
- var x1Coord = shiftX + this.getX1Coordinate(xCalc, yCalc);
172
- var y1Coord = shiftY + this.getY1Coordinate(xCalc, yCalc);
174
+ var x1Coord = shiftX + this.getX1Coordinate(xCalc, yCalc) + xCoordSvgTrans;
175
+ var y1Coord = shiftY + this.getY1Coordinate(xCalc, yCalc) + yCoordSvgTrans;
173
176
  if (isNaN(x1Coord) || isNaN(y1Coord) || !isFinite(x1Coord) || !isFinite(y1Coord)) {
174
177
  this.svg.style.display = "none";
175
178
  }
@@ -179,26 +182,21 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
179
182
  }
180
183
  };
181
184
  SvgAnnotationBase.prototype.calcDragDistance = function (xyValues) {
185
+ if (!this.prevValue) {
186
+ this.prevValue = xyValues;
187
+ return;
188
+ }
182
189
  var _a = this.getAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
183
- if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.Body) {
184
- if (!this.prevValue) {
185
- this.prevValue = xyValues;
186
- return;
187
- }
190
+ if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.Body ||
191
+ this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.x1y1) {
188
192
  x1 = this.x1 - (this.prevValue.x - xyValues.x);
189
193
  y1 = this.y1 - (this.prevValue.y - xyValues.y);
190
194
  this.x1 = x1;
191
195
  this.y1 = y1;
192
196
  x2 = x2 - (this.prevValue.x - xyValues.x);
193
197
  y2 = y2 - (this.prevValue.y - xyValues.y);
194
- this.prevValue = xyValues;
195
- }
196
- else if (this.adornerDraggingPoint === AnnotationBase_1.EDraggingGripPoint.Point1) {
197
- x1 = xyValues.x;
198
- y1 = xyValues.y;
199
- this.x1 = xyValues.x;
200
- this.y1 = xyValues.y;
201
198
  }
199
+ this.prevValue = xyValues;
202
200
  this.setAnnotationBorders(x1, x2, y1, y2);
203
201
  };
204
202
  SvgAnnotationBase.prototype.onDragStarted = function (args) {
@@ -219,14 +217,14 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
219
217
  if (!xyMousePoint) {
220
218
  return false;
221
219
  }
222
- if (xyCoord1) {
220
+ if (xyCoord1 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
223
221
  var dist = (0, pointUtil_1.calcDistance)(circleCenterX, circleCenterY, (0, translate_1.translateToNotScaled)(xyMousePoint.x), (0, translate_1.translateToNotScaled)(xyMousePoint.y));
224
- if (dist < constants_1.ADORNER_GRIP_RADIUS) {
225
- this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.Point1;
222
+ if (dist < this.annotationsGripsRadius) {
223
+ this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.x1y1;
226
224
  return true;
227
225
  }
228
226
  }
229
- if (this.clickToSelect(args)) {
227
+ if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.Body) && this.clickToSelect(args)) {
230
228
  this.adornerDraggingPoint = AnnotationBase_1.EDraggingGripPoint.Body;
231
229
  return true;
232
230
  }
@@ -265,11 +263,11 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
265
263
  return (0, pointUtil_1.testIsInBounds)(notScaledX, notScaledY, x1, y2, x2, y1);
266
264
  };
267
265
  SvgAnnotationBase.prototype.updateAdornerInner = function () {
268
- var _a = this.getAdornerAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
266
+ var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
269
267
  var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
270
268
  this.deleteAdorner();
271
269
  if (this.isSelected) {
272
- var svgString = svgStringAdornerTemplate(x1, y1, x2, y2, this.verticalAnchorPoint, this.horizontalAnchorPoint);
270
+ var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
273
271
  this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
274
272
  }
275
273
  };
@@ -318,25 +316,19 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
318
316
  }
319
317
  this.setAnnotationBorders(borderX1, borderX2, borderY1, borderY2);
320
318
  };
319
+ SvgAnnotationBase.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
320
+ var circleCenterX = x1;
321
+ var circleCenterY = y1;
322
+ var height = Math.abs((y1 - y2) / 2);
323
+ var width = Math.abs((x1 - x2) / 2);
324
+ if (this.verticalAnchorPoint === AnchorPoint_1.EVerticalAnchorPoint.Center) {
325
+ circleCenterY = circleCenterY + height;
326
+ }
327
+ if (this.horizontalAnchorPoint === AnchorPoint_1.EHorizontalAnchorPoint.Center) {
328
+ circleCenterX = circleCenterX + width;
329
+ }
330
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(Math.abs(x1 - x2), "\" height=\"").concat(Math.abs(y1 - y2), "\" stroke=\"").concat(this.selectionBoxStroke, "\" stroke-width=\"").concat(this.selectionBoxThickness, "px\" fill=\"none\" />\n ").concat(this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1) ? this.getAnnotationGripSvg(circleCenterX, circleCenterY) : "", "\n </svg>");
331
+ };
321
332
  return SvgAnnotationBase;
322
333
  }(AnnotationBase_1.AnnotationBase));
323
334
  exports.SvgAnnotationBase = SvgAnnotationBase;
324
- /** @ignore */
325
- var svgStringAdornerTemplate = function (x1, y1, x2, y2, verticalAnchorPoint, horizontalAnchorPoint) {
326
- // TODO add theme
327
- var colorLine = "#f00e0e66";
328
- var adornerFill = "#CDCDCD22";
329
- var adornerStroke = "#CDCDCD99";
330
- var delta = 1;
331
- var circleCenterX = x1;
332
- var circleCenterY = y1;
333
- var height = Math.abs((y1 - y2) / 2);
334
- var width = Math.abs((x1 - x2) / 2);
335
- if (verticalAnchorPoint === AnchorPoint_1.EVerticalAnchorPoint.Center) {
336
- circleCenterY = circleCenterY + height;
337
- }
338
- if (horizontalAnchorPoint === AnchorPoint_1.EHorizontalAnchorPoint.Center) {
339
- circleCenterX = circleCenterX + width;
340
- }
341
- 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(circleCenterX, "\" cy=\"").concat(circleCenterY, "\" r=\"").concat(constants_1.ADORNER_GRIP_RADIUS, "\" fill=\"").concat(adornerFill, "\" stroke=\"").concat(adornerStroke, "\"/>\n </svg>");
342
- };
@@ -75,9 +75,9 @@ export declare class TextAnnotation extends SvgAnnotationBase {
75
75
  /**
76
76
  * Notifies listeners of {@link invalidateParentCallback} that a property has changed
77
77
  */
78
- protected notifyPropertyChanged(): void;
78
+ protected notifyPropertyChanged(p: string): void;
79
79
  /**
80
80
  * @inheritDoc
81
81
  */
82
- protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
82
+ protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
83
83
  }
@@ -16,6 +16,8 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.TextAnnotation = void 0;
19
+ var annotationHelpers_1 = require("./annotationHelpers");
20
+ var constants_1 = require("./constants");
19
21
  var IAnnotation_1 = require("./IAnnotation");
20
22
  var SvgAnnotationBase_1 = require("./SvgAnnotationBase");
21
23
  /**
@@ -28,8 +30,9 @@ var TextAnnotation = /** @class */ (function (_super) {
28
30
  * @param options The {@link ITextAnnotationOptions} which contain optional parameters
29
31
  */
30
32
  function TextAnnotation(options) {
33
+ var _this = this;
31
34
  var _a, _b, _c, _d, _e;
32
- var _this = _super.call(this, options) || this;
35
+ _this = _super.call(this, options) || this;
33
36
  /** @inheritDoc */
34
37
  _this.type = IAnnotation_1.EAnnotationType.SVGTextAnnotation;
35
38
  _this.textProperty = "DEFAULT TEXT";
@@ -53,8 +56,10 @@ var TextAnnotation = /** @class */ (function (_super) {
53
56
  return this.textProperty;
54
57
  },
55
58
  set: function (text) {
56
- this.textProperty = text;
57
- this.notifyPropertyChanged();
59
+ if (this.textProperty !== text) {
60
+ this.textProperty = text;
61
+ this.notifyPropertyChanged(constants_1.PROPERTY.TEXT);
62
+ }
58
63
  },
59
64
  enumerable: false,
60
65
  configurable: true
@@ -67,8 +72,10 @@ var TextAnnotation = /** @class */ (function (_super) {
67
72
  return this.textColorProperty;
68
73
  },
69
74
  set: function (textColor) {
70
- this.textColorProperty = textColor;
71
- this.notifyPropertyChanged();
75
+ if (this.textColorProperty !== textColor) {
76
+ this.textColorProperty = textColor;
77
+ this.notifyPropertyChanged(constants_1.PROPERTY.TEXT_STROKE);
78
+ }
72
79
  },
73
80
  enumerable: false,
74
81
  configurable: true
@@ -81,8 +88,10 @@ var TextAnnotation = /** @class */ (function (_super) {
81
88
  return this.fontSizeProperty;
82
89
  },
83
90
  set: function (fontSize) {
84
- this.fontSizeProperty = fontSize;
85
- this.notifyPropertyChanged();
91
+ if (this.fontSizeProperty !== fontSize) {
92
+ this.fontSizeProperty = fontSize;
93
+ this.notifyPropertyChanged(constants_1.PROPERTY.FONT_SIZE);
94
+ }
86
95
  },
87
96
  enumerable: false,
88
97
  configurable: true
@@ -95,8 +104,10 @@ var TextAnnotation = /** @class */ (function (_super) {
95
104
  return this.fontFamilyProperty;
96
105
  },
97
106
  set: function (fontFamily) {
98
- this.fontFamilyProperty = fontFamily;
99
- this.notifyPropertyChanged();
107
+ if (this.fontFamilyProperty !== fontFamily) {
108
+ this.fontFamilyProperty = fontFamily;
109
+ this.notifyPropertyChanged(constants_1.PROPERTY.FONT_FAMILY);
110
+ }
100
111
  },
101
112
  enumerable: false,
102
113
  configurable: true
@@ -109,8 +120,10 @@ var TextAnnotation = /** @class */ (function (_super) {
109
120
  return this.fontWeightProperty;
110
121
  },
111
122
  set: function (fontWeight) {
112
- this.fontWeightProperty = fontWeight;
113
- this.notifyPropertyChanged();
123
+ if (this.fontWeightProperty !== fontWeight) {
124
+ this.fontWeightProperty = fontWeight;
125
+ this.notifyPropertyChanged(constants_1.PROPERTY.FONT_WEIGHT);
126
+ }
114
127
  },
115
128
  enumerable: false,
116
129
  configurable: true
@@ -130,8 +143,19 @@ var TextAnnotation = /** @class */ (function (_super) {
130
143
  /**
131
144
  * Notifies listeners of {@link invalidateParentCallback} that a property has changed
132
145
  */
133
- TextAnnotation.prototype.notifyPropertyChanged = function () {
134
- this.isDirty = true;
146
+ TextAnnotation.prototype.notifyPropertyChanged = function (p) {
147
+ if (p !== constants_1.PROPERTY.IS_HIDDEN &&
148
+ p !== constants_1.PROPERTY.X_COORD_SHIFT &&
149
+ p !== constants_1.PROPERTY.Y_COORD_SHIFT &&
150
+ p !== constants_1.PROPERTY.HORIZONTAL_ANCHOR_POINT &&
151
+ p !== constants_1.PROPERTY.VERTICAL_ANCHOR_POINT &&
152
+ p !== constants_1.PROPERTY.IS_HIDDEN &&
153
+ p !== constants_1.PROPERTY.X1 &&
154
+ p !== constants_1.PROPERTY.X2 &&
155
+ p !== constants_1.PROPERTY.Y1 &&
156
+ p !== constants_1.PROPERTY.Y2) {
157
+ this.isDirty = true;
158
+ }
135
159
  if (this.invalidateParentCallback) {
136
160
  this.invalidateParentCallback();
137
161
  }
@@ -139,15 +163,11 @@ var TextAnnotation = /** @class */ (function (_super) {
139
163
  /**
140
164
  * @inheritDoc
141
165
  */
142
- TextAnnotation.prototype.create = function (xCalc, yCalc) {
143
- var isChangedCoordinate = this.prevX1Coordinate !== this.getX1Coordinate(xCalc, yCalc) ||
144
- this.prevY1Coordinate !== this.getY1Coordinate(xCalc, yCalc);
145
- if ((!this.isDirty && !this.isSelected && !isChangedCoordinate) || (this.svg && !this.isEditable)) {
166
+ TextAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
167
+ if (!this.isDirty && !this.isSelected) {
146
168
  this.calcAndSetAnnotationBorders(xCalc, yCalc);
147
169
  return;
148
170
  }
149
- this.prevX1Coordinate = this.getX1Coordinate(xCalc, yCalc);
150
- this.prevY1Coordinate = this.getY1Coordinate(xCalc, yCalc);
151
171
  if (this.svg) {
152
172
  this.delete();
153
173
  }
@@ -163,7 +183,6 @@ exports.TextAnnotation = TextAnnotation;
163
183
  /** @ignore */
164
184
  var createSvg = function (svgRoot, text, color, fontSize, fontFamily, fontWeight) {
165
185
  var svgString = "<svg class=\"scichart__text-annotation\">\n <text x=\"0\" y=\"".concat(fontSize, "\" fill=\"").concat(color, "\" font-size=\"").concat(fontSize, "\" font-family=\"").concat(fontFamily, "\" font-weight=\"").concat(fontWeight, "\">").concat(text, "</text>\n </svg>");
166
- var svgNode = document.createRange().createContextualFragment(svgString);
167
- svgRoot.appendChild(svgNode);
168
- return svgRoot.lastChild;
186
+ var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, svgRoot);
187
+ return svgNode;
169
188
  };
@@ -58,8 +58,9 @@ var VerticalLineAnnotation = /** @class */ (function (_super) {
58
58
  * @param options Optional parameters of type {@link ILineAnnotationOptions} which configure the annotation upon construction
59
59
  */
60
60
  function VerticalLineAnnotation(options) {
61
+ var _this = this;
61
62
  var _a, _b, _c;
62
- var _this = _super.call(this, options) || this;
63
+ _this = _super.call(this, options) || this;
63
64
  /** @inheritDoc */
64
65
  _this.type = IAnnotation_1.EAnnotationType.RenderContextVerticalLineAnnotation;
65
66
  _this.dragOnLine = true;
@@ -114,6 +115,8 @@ var VerticalLineAnnotation = /** @class */ (function (_super) {
114
115
  Guard_1.Guard.notNull(yCalc, "yCalc");
115
116
  var strokePen = (0, Pen2DCache_1.getWebGlPenFromCache)(this.strokePenCache);
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, isAlignmentTop = _a.isAlignmentTop;
118
+ if (!horizontalAxis || !verticalAxis)
119
+ return;
117
120
  var borderY1 = viewRect.height;
118
121
  var borderY2 = 0;
119
122
  if (isAlignmentTop) {
@@ -194,7 +197,7 @@ var VerticalLineAnnotation = /** @class */ (function (_super) {
194
197
  verticalAxisCoordinateMode: this.yCoordinateMode,
195
198
  horizontalCoordinateCalculator: xCalc,
196
199
  verticalCoordinateCalculator: yCalc,
197
- isAlignmentTop: xAxis.axisAlignment === AxisAlignment_1.EAxisAlignment.Top
200
+ isAlignmentTop: (xAxis === null || xAxis === void 0 ? void 0 : xAxis.axisAlignment) === AxisAlignment_1.EAxisAlignment.Top
198
201
  };
199
202
  var verticalChartCoordinateConfig = {
200
203
  annotationCoord: this.y1,
@@ -205,7 +208,7 @@ var VerticalLineAnnotation = /** @class */ (function (_super) {
205
208
  verticalAxisCoordinateMode: this.xCoordinateMode,
206
209
  horizontalCoordinateCalculator: yCalc,
207
210
  verticalCoordinateCalculator: xCalc,
208
- isAlignmentTop: yAxis.axisAlignment === AxisAlignment_1.EAxisAlignment.Top
211
+ isAlignmentTop: (yAxis === null || yAxis === void 0 ? void 0 : yAxis.axisAlignment) === AxisAlignment_1.EAxisAlignment.Top
209
212
  };
210
213
  return this.isVerticalChart ? verticalChartCoordinateConfig : defaultChartCoordinateConfig;
211
214
  };
@@ -1,19 +1,19 @@
1
1
  export declare const annotationHelpers: {
2
- createSvg: (svgString: string, svgRoot: SVGSVGElement) => SVGElement;
3
- calcNewApex: (x1: number, y1: number, x2: number, y2: number) => {
4
- point1: {
2
+ createSvg: (svgString: string, svgRoot: Node) => SVGElement;
3
+ calcNewApex: (x1: number, y1: number, x2: number, y2: number, isVertical: boolean) => {
4
+ x1y1: {
5
5
  x: number;
6
6
  y: number;
7
7
  };
8
- point2: {
8
+ x2y1: {
9
9
  x: number;
10
10
  y: number;
11
11
  };
12
- point3: {
12
+ x1y2: {
13
13
  x: number;
14
14
  y: number;
15
15
  };
16
- point4: {
16
+ x2y2: {
17
17
  x: number;
18
18
  y: number;
19
19
  };
@@ -1,17 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.annotationHelpers = void 0;
4
+ /** All svg creation is run through this funciton so it can be mocked for tests */
4
5
  var createSvg = function (svgString, svgRoot) {
5
6
  var svgNode = document.createRange().createContextualFragment(svgString);
6
7
  svgRoot.appendChild(svgNode);
7
8
  return svgRoot.lastChild;
8
9
  };
9
- var calcNewApex = function (x1, y1, x2, y2) {
10
- var point1 = { x: x1, y: y2 };
11
- var point2 = { x: x2, y: y2 };
12
- var point3 = { x: x2, y: y1 };
13
- var point4 = { x: x1, y: y1 };
14
- return { point1: point1, point2: point2, point3: point3, point4: point4 };
10
+ var calcNewApex = function (x1, y1, x2, y2, isVertical) {
11
+ var x1y1 = { x: x1, y: y1 };
12
+ var x2y1 = isVertical ? { x: x1, y: y2 } : { x: x2, y: y1 };
13
+ var x1y2 = isVertical ? { x: x2, y: y1 } : { x: x1, y: y2 };
14
+ var x2y2 = { x: x2, y: y2 };
15
+ return { x1y1: x1y1, x2y1: x2y1, x1y2: x1y2, x2y2: x2y2 };
15
16
  };
16
17
  exports.annotationHelpers = {
17
18
  createSvg: createSvg,