scichart 2.0.0-alpha.1930 → 2.0.0-alpha.1991

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 (212) hide show
  1. package/Builder/buildAxis.d.ts +3 -3
  2. package/Builder/buildDataSeries.d.ts +44 -4
  3. package/Builder/buildDataSeries.js +66 -0
  4. package/Builder/buildSeries.d.ts +7 -5
  5. package/Builder/buildSeries.js +3 -4
  6. package/Builder/buildSurface.d.ts +14 -6
  7. package/Builder/buildSurface.js +13 -8
  8. package/Builder/chartBuilder.d.ts +14 -8
  9. package/Builder/chartBuilder.js +6 -6
  10. package/Charting/ChartModifiers/ChartModifierBase.d.ts +37 -81
  11. package/Charting/ChartModifiers/ChartModifierBase.js +28 -73
  12. package/Charting/ChartModifiers/ChartModifierBase2D.d.ts +5 -1
  13. package/Charting/ChartModifiers/ChartModifierBase2D.js +6 -17
  14. package/Charting/ChartModifiers/CursorModifier.d.ts +4 -2
  15. package/Charting/ChartModifiers/CursorModifier.js +1 -1
  16. package/Charting/ChartModifiers/DataPointSelectionModifier.d.ts +3 -1
  17. package/Charting/ChartModifiers/DataPointSelectionModifier.js +62 -27
  18. package/Charting/ChartModifiers/LegendModifier.d.ts +5 -1
  19. package/Charting/ChartModifiers/LegendModifier.js +2 -1
  20. package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +1 -1
  21. package/Charting/ChartModifiers/PinchZoomModifier.d.ts +1 -1
  22. package/Charting/ChartModifiers/RolloverModifier.d.ts +1 -1
  23. package/Charting/ChartModifiers/RolloverModifier.js +44 -58
  24. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +1 -1
  25. package/Charting/ChartModifiers/SeriesSelectionModifier.d.ts +15 -7
  26. package/Charting/ChartModifiers/SeriesSelectionModifier.js +10 -10
  27. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  28. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
  29. package/Charting/ChartModifiers/ZoomExtentsModifier.d.ts +14 -1
  30. package/Charting/ChartModifiers/ZoomExtentsModifier.js +16 -4
  31. package/Charting/Drawing/BrushCache.js +6 -8
  32. package/Charting/Drawing/Pen2DCache.d.ts +4 -6
  33. package/Charting/Drawing/Pen2DCache.js +14 -11
  34. package/Charting/Drawing/WebGlPen.d.ts +2 -1
  35. package/Charting/Drawing/WebGlPen.js +3 -2
  36. package/Charting/LayoutManager/BottomAlignedOuterAxisLayoutStrategy.js +1 -1
  37. package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +3 -2
  38. package/Charting/LayoutManager/LeftAlignedOuterAxisLayoutStrategy.js +1 -1
  39. package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +3 -2
  40. package/Charting/LayoutManager/RightAlignedOuterAxisLayoutStrategy.js +1 -1
  41. package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +3 -2
  42. package/Charting/LayoutManager/TopAlignedOuterAxisLayoutStrategy.js +1 -1
  43. package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +3 -2
  44. package/Charting/Model/BaseDataSeries.d.ts +64 -52
  45. package/Charting/Model/BaseDataSeries.js +158 -84
  46. package/Charting/Model/BaseHeatmapDataSeries.d.ts +2 -2
  47. package/Charting/Model/DataPointSelectionPaletteProvider.d.ts +22 -10
  48. package/Charting/Model/DataPointSelectionPaletteProvider.js +35 -5
  49. package/Charting/Model/Filters/OhlcScaleOffsetFilter.d.ts +106 -0
  50. package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +21 -0
  51. package/Charting/Model/Filters/XyLinearTrendFilter.d.ts +112 -1
  52. package/Charting/Model/Filters/XyLinearTrendFilter.js +21 -0
  53. package/Charting/Model/Filters/XyMovingAverageFilter.d.ts +110 -1
  54. package/Charting/Model/Filters/XyMovingAverageFilter.js +21 -0
  55. package/Charting/Model/Filters/XyRatioFilter.d.ts +111 -2
  56. package/Charting/Model/Filters/XyRatioFilter.js +34 -3
  57. package/Charting/Model/Filters/XyScaleOffsetFilter.d.ts +112 -1
  58. package/Charting/Model/Filters/XyScaleOffsetFilter.js +21 -0
  59. package/Charting/Model/Filters/XyyScaleOffsetFilter.d.ts +116 -0
  60. package/Charting/Model/Filters/XyyScaleOffsetFilter.js +21 -0
  61. package/Charting/Model/Filters/XyzScaleOffsetFilter.d.ts +116 -0
  62. package/Charting/Model/Filters/XyzScaleOffsetFilter.js +21 -0
  63. package/Charting/Model/IDataSeries.d.ts +18 -3
  64. package/Charting/Model/IDataSeries.js +12 -1
  65. package/Charting/Model/IPaletteProvider.d.ts +8 -8
  66. package/Charting/Model/OhlcDataSeries.d.ts +39 -10
  67. package/Charting/Model/OhlcDataSeries.js +106 -19
  68. package/Charting/Model/UniformHeatmapDataSeries.d.ts +2 -2
  69. package/Charting/Model/XyyDataSeries.d.ts +21 -12
  70. package/Charting/Model/XyyDataSeries.js +70 -16
  71. package/Charting/Model/XyzDataSeries.d.ts +20 -5
  72. package/Charting/Model/XyzDataSeries.js +63 -7
  73. package/Charting/Numerics/TickProviders/LogarithmicTickProvider.d.ts +24 -0
  74. package/Charting/Numerics/TickProviders/LogarithmicTickProvider.js +26 -4
  75. package/Charting/Services/SciChartRenderer.js +4 -2
  76. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +7 -21
  77. package/Charting/Visuals/Annotations/AnnotationBase.js +28 -42
  78. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -1
  79. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +2 -4
  80. package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -1
  81. package/Charting/Visuals/Annotations/BoxAnnotation.js +3 -2
  82. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
  83. package/Charting/Visuals/Annotations/CustomAnnotation.js +2 -2
  84. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +0 -3
  85. package/Charting/Visuals/Annotations/IAnnotation.d.ts +4 -0
  86. package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -1
  87. package/Charting/Visuals/Annotations/LineAnnotation.js +2 -4
  88. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +3 -2
  89. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +1 -1
  90. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +1 -1
  91. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +3 -2
  92. package/Charting/Visuals/Annotations/TextAnnotation.d.ts +1 -1
  93. package/Charting/Visuals/Annotations/TextAnnotation.js +1 -1
  94. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +0 -3
  95. package/Charting/Visuals/Annotations/annotationHelpers.d.ts +21 -0
  96. package/Charting/Visuals/Annotations/annotationHelpers.js +19 -0
  97. package/Charting/Visuals/Axis/AxisBase2D.d.ts +21 -0
  98. package/Charting/Visuals/Axis/AxisBase2D.js +81 -14
  99. package/Charting/Visuals/Axis/AxisCore.d.ts +5 -5
  100. package/Charting/Visuals/Axis/AxisCore.js +50 -55
  101. package/Charting/Visuals/Axis/AxisRenderer.js +1 -1
  102. package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +13 -0
  103. package/Charting/Visuals/Axis/LabelProvider/LabelProvider.d.ts +1 -1
  104. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +3 -2
  105. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +13 -0
  106. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +1 -1
  107. package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +53 -0
  108. package/Charting/Visuals/Axis/LogarithmicAxis.js +107 -3
  109. package/Charting/Visuals/Axis/constants.d.ts +2 -1
  110. package/Charting/Visuals/Axis/constants.js +1 -0
  111. package/Charting/Visuals/Legend/SciChartLegend.js +1 -1
  112. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +11 -0
  113. package/Charting/Visuals/Legend/SciChartLegendBase.js +45 -16
  114. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +4 -0
  115. package/Charting/Visuals/RenderableSeries/Animations/BaseAnimation.d.ts +1 -1
  116. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +1 -1
  117. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +1 -1
  118. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +9 -2
  119. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +65 -4
  120. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +0 -11
  121. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +0 -29
  122. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -1
  123. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +0 -37
  124. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +0 -120
  125. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +4 -24
  126. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +65 -91
  127. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +26 -2
  128. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +55 -3
  129. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +3 -1
  130. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -1
  131. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +7 -1
  132. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +66 -64
  133. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.d.ts +7 -0
  134. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +12 -0
  135. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.d.ts +2 -1
  136. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +6 -6
  137. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +6 -0
  138. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +12 -0
  139. package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.d.ts +0 -6
  140. package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +0 -42
  141. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +0 -17
  142. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +0 -71
  143. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +1 -1
  144. package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +1 -1
  145. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.d.ts +4 -0
  146. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +7 -0
  147. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +2 -1
  148. package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.d.ts +4 -0
  149. package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +7 -0
  150. package/Charting/Visuals/RenderableSeries/HitTest/IHitTestProvider.d.ts +13 -0
  151. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.d.ts +4 -0
  152. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +7 -0
  153. package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.d.ts +4 -0
  154. package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +7 -0
  155. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +17 -5
  156. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +2 -2
  157. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +3 -0
  158. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +10 -32
  159. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +4 -0
  160. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +11 -21
  161. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -0
  162. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +10 -21
  163. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.d.ts +18 -5
  164. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +16 -35
  165. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +4 -5
  166. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -5
  167. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +2 -35
  168. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +3 -1
  169. package/Charting/Visuals/SciChartOverview.d.ts +1 -1
  170. package/Charting/Visuals/SciChartOverview.js +1 -1
  171. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +3 -1
  172. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +9 -8
  173. package/Charting/Visuals/SciChartSurface.d.ts +20 -3
  174. package/Charting/Visuals/SciChartSurface.js +36 -8
  175. package/Charting/Visuals/SciChartSurfaceBase.d.ts +3 -3
  176. package/Charting/Visuals/SciChartSurfaceBase.js +2 -6
  177. package/Charting/Visuals/TextureManager/DpiHelper.d.ts +1 -1
  178. package/Charting/Visuals/TextureManager/DpiHelper.js +5 -3
  179. package/Charting/Visuals/TextureManager/TextureManager.d.ts +7 -1
  180. package/Charting/Visuals/TextureManager/TextureManager.js +14 -7
  181. package/Charting/Visuals/licenseManager2D.js +35 -28
  182. package/Charting/Visuals/loader.d.ts +3 -0
  183. package/Charting/Visuals/loader.js +3 -0
  184. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.d.ts +21 -45
  185. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.js +15 -36
  186. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +35 -73
  187. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +25 -66
  188. package/Charting3D/Visuals/SciChart3DRenderer.js +1 -1
  189. package/Charting3D/Visuals/SciChart3DSurface.d.ts +13 -1
  190. package/Charting3D/Visuals/SciChart3DSurface.js +13 -1
  191. package/Core/ObservableArray.d.ts +8 -1
  192. package/Core/ObservableArray.js +7 -0
  193. package/_wasm/scichart.browser.js +1 -1
  194. package/_wasm/scichart2d.js +95 -95
  195. package/_wasm/scichart2d.wasm +0 -0
  196. package/_wasm/scichart3d.js +1 -1
  197. package/_wasm/scichart3d.wasm +0 -0
  198. package/package.json +1 -1
  199. package/types/AnchorPoint.d.ts +0 -3
  200. package/types/AnchorPoint.js +0 -3
  201. package/types/BaseType.d.ts +3 -1
  202. package/types/BaseType.js +2 -0
  203. package/types/DataFilterType.d.ts +9 -0
  204. package/types/DataFilterType.js +13 -0
  205. package/types/HelperTypes.d.ts +5 -0
  206. package/types/HelperTypes.js +2 -0
  207. package/types/SeriesType.d.ts +17 -17
  208. package/types/SeriesType.js +17 -17
  209. package/utils/font.d.ts +8 -0
  210. package/utils/font.js +15 -0
  211. package/utils/imageUtil.d.ts +6 -0
  212. package/utils/imageUtil.js +11 -1
@@ -121,7 +121,9 @@ var SciChartRenderer = /** @class */ (function () {
121
121
  }
122
122
  a.showWarning = false;
123
123
  }
124
- a.drawWithContext(renderContext, xAxis.getCurrentCoordinateCalculator(), yAxis.getCurrentCoordinateCalculator(), seriesViewRect);
124
+ if (!a.isHidden) {
125
+ a.drawWithContext(renderContext, xAxis.getCurrentCoordinateCalculator(), yAxis.getCurrentCoordinateCalculator(), seriesViewRect);
126
+ }
125
127
  }
126
128
  });
127
129
  };
@@ -236,7 +238,7 @@ var SciChartRenderer = /** @class */ (function () {
236
238
  };
237
239
  SciChartRenderer.prototype.tryPerformAutoRangeOn = function (axis, sciChartSurface) {
238
240
  var shouldAutoRange = axis.autoRange === AutoRange_1.EAutoRange.Always ||
239
- (axis.autoRange === AutoRange_1.EAutoRange.Once && (!axis.hasValidVisibleRange || axis.hasDefaultVisibleRange));
241
+ (axis.autoRange === AutoRange_1.EAutoRange.Once && (!axis.hasValidVisibleRange() || axis.hasDefaultVisibleRange()));
240
242
  if (shouldAutoRange) {
241
243
  // Different implementation for YAxis and XAxis because of windowing
242
244
  var newRange = axis.getMaximumRange();
@@ -20,6 +20,10 @@ export declare enum EDraggingGripPoint {
20
20
  * Options passed to the constructor of an {@link AnnotationBase}, used to configure it at instantiation time
21
21
  */
22
22
  export interface IAnnotationBaseOptions {
23
+ /**
24
+ * A unique Id for the {@link IAnnotation}
25
+ */
26
+ id?: string;
23
27
  /**
24
28
  * @description The layer to place the annotation on. See {@link EAnnotationLayer} for a list of values
25
29
  * @remarks applicable only to WebGL annotations
@@ -198,6 +202,8 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
198
202
  dragDelta: EventHandler<AnnotationDragDeltaEventArgs>;
199
203
  showWarning: boolean;
200
204
  /** @inheritDoc */
205
+ readonly id: string;
206
+ /** @inheritDoc */
201
207
  abstract readonly type: EAnnotationType;
202
208
  /** @inheritDoc */
203
209
  readonly isSvgAnnotation: boolean;
@@ -321,7 +327,7 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
321
327
  onDpiChanged(args: TDpiChangedEventArgs): void;
322
328
  toJSON(): {
323
329
  type: EAnnotationType;
324
- options: IAnnotationBaseOptions;
330
+ options: Required<Pick<IAnnotationBaseOptions, "opacity" | "id" | "annotationLayer" | "isHidden" | "resizeDirections" | "isEditable" | "x1" | "x2" | "y1" | "y2" | "xAxisId" | "xCoordinateMode" | "yAxisId" | "yCoordinateMode" | "isSelected" | "onDragStarted" | "onDragEnded" | "onDrag">>;
325
331
  };
326
332
  /**
327
333
  * Returns annotationBorders
@@ -430,23 +436,3 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
430
436
  */
431
437
  protected setAnnotationBorders(x1: number, x2: number, y1: number, y2: number): void;
432
438
  }
433
- export declare const calcNewApex: (x1: number, y1: number, x2: number, y2: number) => {
434
- point1: {
435
- x: number;
436
- y: number;
437
- };
438
- point2: {
439
- x: number;
440
- y: number;
441
- };
442
- point3: {
443
- x: number;
444
- y: number;
445
- };
446
- point4: {
447
- x: number;
448
- y: number;
449
- };
450
- };
451
- /** @ignore */
452
- export declare const createSvg: (svgString: string, svgRoot: SVGSVGElement) => SVGElement;
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createSvg = exports.calcNewApex = exports.AnnotationBase = exports.ECoordinateMode = exports.EDraggingGripPoint = void 0;
3
+ exports.AnnotationBase = exports.ECoordinateMode = exports.EDraggingGripPoint = void 0;
4
+ var classFactory_1 = require("../../../Builder/classFactory");
4
5
  var EventHandler_1 = require("../../../Core/EventHandler");
5
6
  var Guard_1 = require("../../../Core/Guard");
6
7
  var Point_1 = require("../../../Core/Point");
8
+ var BaseType_1 = require("../../../types/BaseType");
7
9
  var XyDirection_1 = require("../../../types/XyDirection");
10
+ var guid_1 = require("../../../utils/guid");
8
11
  var translate_1 = require("../../../utils/translate");
9
12
  var AxisCore_1 = require("../Axis/AxisCore");
10
13
  var DpiHelper_1 = require("../TextureManager/DpiHelper");
@@ -56,7 +59,7 @@ var AnnotationBase = /** @class */ (function () {
56
59
  * @param options optional parameters of type {@link IAnnotationBaseOptions} used to configure the annotation at construct time
57
60
  */
58
61
  function AnnotationBase(options) {
59
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
62
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
60
63
  this.showWarning = true;
61
64
  this.prevIsSelected = true;
62
65
  /** the annotation absolute coordinates */
@@ -76,53 +79,48 @@ var AnnotationBase = /** @class */ (function () {
76
79
  this.yCoordinateModeProperty = ECoordinateMode.DataValue;
77
80
  this.isSelectedProperty = false;
78
81
  this.resizeDirectionsProperty = XyDirection_1.EXyDirection.XyDirection;
82
+ this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : guid_1.generateGuid();
79
83
  this.dragStarted = new EventHandler_1.EventHandler();
80
84
  this.dragEnded = new EventHandler_1.EventHandler();
81
85
  this.dragDelta = new EventHandler_1.EventHandler();
82
- this.annotationLayerProperty = (_a = options === null || options === void 0 ? void 0 : options.annotationLayer) !== null && _a !== void 0 ? _a : this.annotationLayerProperty;
83
- this.resizeDirectionsProperty = (_b = options === null || options === void 0 ? void 0 : options.resizeDirections) !== null && _b !== void 0 ? _b : this.resizeDirectionsProperty;
84
- this.isEditableProperty = (_c = options === null || options === void 0 ? void 0 : options.isEditable) !== null && _c !== void 0 ? _c : this.isEditableProperty;
85
- this.isHiddenProperty = (_d = options === null || options === void 0 ? void 0 : options.isHidden) !== null && _d !== void 0 ? _d : this.isHiddenProperty;
86
- this.x1Property = (_e = options === null || options === void 0 ? void 0 : options.x1) !== null && _e !== void 0 ? _e : this.x1Property;
87
- this.y1Property = (_f = options === null || options === void 0 ? void 0 : options.y1) !== null && _f !== void 0 ? _f : this.y1Property;
88
- this.x2Property = (_g = options === null || options === void 0 ? void 0 : options.x2) !== null && _g !== void 0 ? _g : this.x2Property;
89
- this.y2Property = (_h = options === null || options === void 0 ? void 0 : options.y2) !== null && _h !== void 0 ? _h : this.y2Property;
90
- this.xAxisIdProperty = (_j = options === null || options === void 0 ? void 0 : options.xAxisId) !== null && _j !== void 0 ? _j : this.xAxisIdProperty;
91
- this.yAxisIdProperty = (_k = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _k !== void 0 ? _k : this.yAxisIdProperty;
92
- this.xCoordinateModeProperty = (_l = options === null || options === void 0 ? void 0 : options.xCoordinateMode) !== null && _l !== void 0 ? _l : this.xCoordinateModeProperty;
93
- this.yCoordinateModeProperty = (_m = options === null || options === void 0 ? void 0 : options.yCoordinateMode) !== null && _m !== void 0 ? _m : this.yCoordinateModeProperty;
94
- this.isSelectedProperty = (_o = options === null || options === void 0 ? void 0 : options.isSelected) !== null && _o !== void 0 ? _o : this.isSelectedProperty;
95
- this.opacityProperty = (_p = options === null || options === void 0 ? void 0 : options.opacity) !== null && _p !== void 0 ? _p : 1.0;
86
+ this.annotationLayerProperty = (_b = options === null || options === void 0 ? void 0 : options.annotationLayer) !== null && _b !== void 0 ? _b : this.annotationLayerProperty;
87
+ this.resizeDirectionsProperty = (_c = options === null || options === void 0 ? void 0 : options.resizeDirections) !== null && _c !== void 0 ? _c : this.resizeDirectionsProperty;
88
+ this.isEditableProperty = (_d = options === null || options === void 0 ? void 0 : options.isEditable) !== null && _d !== void 0 ? _d : this.isEditableProperty;
89
+ this.isHiddenProperty = (_e = options === null || options === void 0 ? void 0 : options.isHidden) !== null && _e !== void 0 ? _e : this.isHiddenProperty;
90
+ this.x1Property = (_f = options === null || options === void 0 ? void 0 : options.x1) !== null && _f !== void 0 ? _f : this.x1Property;
91
+ this.y1Property = (_g = options === null || options === void 0 ? void 0 : options.y1) !== null && _g !== void 0 ? _g : this.y1Property;
92
+ this.x2Property = (_h = options === null || options === void 0 ? void 0 : options.x2) !== null && _h !== void 0 ? _h : this.x2Property;
93
+ this.y2Property = (_j = options === null || options === void 0 ? void 0 : options.y2) !== null && _j !== void 0 ? _j : this.y2Property;
94
+ this.xAxisIdProperty = (_k = options === null || options === void 0 ? void 0 : options.xAxisId) !== null && _k !== void 0 ? _k : this.xAxisIdProperty;
95
+ this.yAxisIdProperty = (_l = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _l !== void 0 ? _l : this.yAxisIdProperty;
96
+ this.xCoordinateModeProperty = (_m = options === null || options === void 0 ? void 0 : options.xCoordinateMode) !== null && _m !== void 0 ? _m : this.xCoordinateModeProperty;
97
+ this.yCoordinateModeProperty = (_o = options === null || options === void 0 ? void 0 : options.yCoordinateMode) !== null && _o !== void 0 ? _o : this.yCoordinateModeProperty;
98
+ this.isSelectedProperty = (_p = options === null || options === void 0 ? void 0 : options.isSelected) !== null && _p !== void 0 ? _p : this.isSelectedProperty;
99
+ this.opacityProperty = (_q = options === null || options === void 0 ? void 0 : options.opacity) !== null && _q !== void 0 ? _q : 1.0;
96
100
  if (options === null || options === void 0 ? void 0 : options.onDragStarted) {
97
101
  if (typeof options.onDragStarted === "string") {
98
102
  this.typeMap.set("onDragStarted", options.onDragStarted);
99
- // @ts-ignore
100
- this.dragStarted.subscribe(getFunction(EBaseType.OptionFunction, options.onDragStarted));
103
+ this.dragStarted.subscribe(classFactory_1.getFunction(BaseType_1.EBaseType.OptionFunction, options.onDragStarted));
101
104
  }
102
105
  else {
103
- // @ts-ignore
104
106
  this.dragStarted.subscribe(options.onDragStarted);
105
107
  }
106
108
  }
107
109
  if (options === null || options === void 0 ? void 0 : options.onDragEnded) {
108
110
  if (typeof options.onDragEnded === "string") {
109
111
  this.typeMap.set("onDragEnded", options.onDragEnded);
110
- // @ts-ignore
111
- this.dragEnded.subscribe(getFunction(EBaseType.OptionFunction, options.onDragEnded));
112
+ this.dragEnded.subscribe(classFactory_1.getFunction(BaseType_1.EBaseType.OptionFunction, options.onDragEnded));
112
113
  }
113
114
  else {
114
- // @ts-ignore
115
115
  this.dragEnded.subscribe(options.onDragEnded);
116
116
  }
117
117
  }
118
118
  if (options === null || options === void 0 ? void 0 : options.onDrag) {
119
119
  if (typeof options.onDrag === "string") {
120
120
  this.typeMap.set("onDrag", options.onDrag);
121
- // @ts-ignore
122
- this.dragDelta.subscribe(getFunction(EBaseType.OptionFunction, options.onDrag));
121
+ this.dragDelta.subscribe(classFactory_1.getFunction(BaseType_1.EBaseType.OptionFunction, options.onDrag));
123
122
  }
124
123
  else {
125
- // @ts-ignore
126
124
  this.dragDelta.subscribe(options.onDrag);
127
125
  }
128
126
  }
@@ -395,6 +393,7 @@ var AnnotationBase = /** @class */ (function () {
395
393
  AnnotationBase.prototype.onDpiChanged = function (args) { };
396
394
  AnnotationBase.prototype.toJSON = function () {
397
395
  var options = {
396
+ id: this.id,
398
397
  annotationLayer: this.annotationLayer,
399
398
  isEditable: this.isEditable,
400
399
  isHidden: this.isHidden,
@@ -404,10 +403,10 @@ var AnnotationBase = /** @class */ (function () {
404
403
  onDragStarted: this.typeMap.get("onDragStarted"),
405
404
  opacity: this.opacity,
406
405
  resizeDirections: this.resizeDirections,
407
- x1: this.x1,
408
- x2: this.x2,
409
- y1: this.y1,
410
- y2: this.y2,
406
+ x1: this.x1Property,
407
+ x2: this.x2Property,
408
+ y1: this.y1Property,
409
+ y2: this.y2Property,
411
410
  xAxisId: this.xAxisId,
412
411
  yAxisId: this.yAxisId,
413
412
  xCoordinateMode: this.xCoordinateMode,
@@ -668,16 +667,3 @@ var AnnotationBase = /** @class */ (function () {
668
667
  return AnnotationBase;
669
668
  }());
670
669
  exports.AnnotationBase = AnnotationBase;
671
- exports.calcNewApex = function (x1, y1, x2, y2) {
672
- var point1 = { x: x1, y: y2 };
673
- var point2 = { x: x2, y: y2 };
674
- var point3 = { x: x2, y: y1 };
675
- var point4 = { x: x1, y: y1 };
676
- return { point1: point1, point2: point2, point3: point3, point4: point4 };
677
- };
678
- /** @ignore */
679
- exports.createSvg = function (svgString, svgRoot) {
680
- var svgNode = document.createRange().createContextualFragment(svgString);
681
- svgRoot.appendChild(svgNode);
682
- return svgRoot.lastChild;
683
- };
@@ -170,7 +170,7 @@ export declare class AxisMarkerAnnotation extends RenderContextAnnotationBase {
170
170
  calcDragDistance(xyValues: Point): void;
171
171
  toJSON(): {
172
172
  type: EAnnotationType;
173
- options: IAnnotationBaseOptions;
173
+ options: Required<Pick<IAnnotationBaseOptions, "opacity" | "id" | "annotationLayer" | "isHidden" | "resizeDirections" | "isEditable" | "x1" | "x2" | "y1" | "y2" | "xAxisId" | "xCoordinateMode" | "yAxisId" | "yCoordinateMode" | "isSelected" | "onDragStarted" | "onDragEnded" | "onDrag">>;
174
174
  };
175
175
  protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
176
176
  private updateAdornerInner;
@@ -24,6 +24,7 @@ var AnnotationBase_1 = require("./AnnotationBase");
24
24
  var constants_1 = require("./constants");
25
25
  var IAnnotation_1 = require("./IAnnotation");
26
26
  var RenderContextAnnotationBase_1 = require("./RenderContextAnnotationBase");
27
+ var annotationHelpers_1 = require("./annotationHelpers");
27
28
  /**
28
29
  * @summary The {@link AxisMarkerAnnotation} provides an {@link AnnotationBase | Annotation} which draws a marker at
29
30
  * specified value on the axis over the {@link SciChartSurface}
@@ -298,9 +299,6 @@ var AxisMarkerAnnotation = /** @class */ (function (_super) {
298
299
  });
299
300
  /** @inheritDoc */
300
301
  AxisMarkerAnnotation.prototype.drawWithContext = function (renderContext, xCalc, yCalc, viewRect) {
301
- if (this.isHidden) {
302
- return;
303
- }
304
302
  Guard_1.Guard.notNull(renderContext, "renderContext");
305
303
  Guard_1.Guard.notNull(xCalc, "xCalc");
306
304
  Guard_1.Guard.notNull(yCalc, "yCalc");
@@ -406,7 +404,7 @@ var AxisMarkerAnnotation = /** @class */ (function (_super) {
406
404
  var _b = this.calculateAdornerCenter(), x = _b.x, y = _b.y;
407
405
  var svgString = svgStringAdornerTemplate(x1, y1, x2, y2, x, y);
408
406
  var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
409
- this.svgAdorner = AnnotationBase_1.createSvg(svgString, adornerSvgRoot);
407
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
410
408
  }
411
409
  };
412
410
  /**
@@ -90,7 +90,7 @@ export declare class BoxAnnotation extends RenderContextAnnotationBase {
90
90
  onDpiChanged(args: TDpiChangedEventArgs): void;
91
91
  toJSON(): {
92
92
  type: EAnnotationType;
93
- options: IAnnotationBaseOptions;
93
+ options: Required<Pick<IAnnotationBaseOptions, "opacity" | "id" | "annotationLayer" | "isHidden" | "resizeDirections" | "isEditable" | "x1" | "x2" | "y1" | "y2" | "xAxisId" | "xCoordinateMode" | "yAxisId" | "yCoordinateMode" | "isSelected" | "onDragStarted" | "onDragEnded" | "onDrag">>;
94
94
  };
95
95
  protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
96
96
  protected notifyPropertyChanged(propertyName: string): void;
@@ -25,6 +25,7 @@ var BrushCache_1 = require("../../Drawing/BrushCache");
25
25
  var Pen2DCache_1 = require("../../Drawing/Pen2DCache");
26
26
  var DpiHelper_1 = require("../TextureManager/DpiHelper");
27
27
  var AnnotationBase_1 = require("./AnnotationBase");
28
+ var annotationHelpers_1 = require("./annotationHelpers");
28
29
  var constants_1 = require("./constants");
29
30
  var constants_2 = require("./constants");
30
31
  var IAnnotation_1 = require("./IAnnotation");
@@ -149,7 +150,7 @@ var BoxAnnotation = /** @class */ (function (_super) {
149
150
  };
150
151
  BoxAnnotation.prototype.onDragStarted = function (args) {
151
152
  _super.prototype.onDragStarted.call(this, args);
152
- var _a = AnnotationBase_1.calcNewApex(this.x1, this.y1, this.x2, this.y2), point1 = _a.point1, point2 = _a.point2, point3 = _a.point3, point4 = _a.point4;
153
+ var _a = annotationHelpers_1.annotationHelpers.calcNewApex(this.x1, this.y1, this.x2, this.y2), point1 = _a.point1, point2 = _a.point2, point3 = _a.point3, point4 = _a.point4;
153
154
  var xyCoord1 = this.getXYCoordinatesFromValues(new Point_1.Point(point1.x, point1.y));
154
155
  var xyCoord2 = this.getXYCoordinatesFromValues(new Point_1.Point(point2.x, point2.y));
155
156
  var xyCoord3 = this.getXYCoordinatesFromValues(new Point_1.Point(point3.x, point3.y));
@@ -308,7 +309,7 @@ var BoxAnnotation = /** @class */ (function (_super) {
308
309
  if (this.isSelected) {
309
310
  var _a = this.getAdornerAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
310
311
  var svgString = svgStringAdornerTemplate(x1, y1, x2, y2);
311
- this.svgAdorner = AnnotationBase_1.createSvg(svgString, adornerSvgRoot);
312
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
312
313
  }
313
314
  };
314
315
  return BoxAnnotation;
@@ -28,7 +28,7 @@ export declare class CustomAnnotation extends SvgAnnotationBase {
28
28
  /** @inheritDoc */
29
29
  toJSON(): {
30
30
  type: EAnnotationType;
31
- options: import("./AnnotationBase").IAnnotationBaseOptions;
31
+ options: Required<Pick<import("./AnnotationBase").IAnnotationBaseOptions, "opacity" | "id" | "annotationLayer" | "isHidden" | "resizeDirections" | "isEditable" | "x1" | "x2" | "y1" | "y2" | "xAxisId" | "xCoordinateMode" | "yAxisId" | "yCoordinateMode" | "isSelected" | "onDragStarted" | "onDragEnded" | "onDrag">>;
32
32
  };
33
33
  /** @inheritDoc */
34
34
  protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  })();
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.CustomAnnotation = void 0;
17
- var AnnotationBase_1 = require("./AnnotationBase");
17
+ var annotationHelpers_1 = require("./annotationHelpers");
18
18
  var IAnnotation_1 = require("./IAnnotation");
19
19
  var SvgAnnotationBase_1 = require("./SvgAnnotationBase");
20
20
  /**
@@ -59,7 +59,7 @@ var CustomAnnotation = /** @class */ (function (_super) {
59
59
  if (this.svg) {
60
60
  this.delete();
61
61
  }
62
- this.setSvg(AnnotationBase_1.createSvg(this.svgString, this.svgRoot));
62
+ this.setSvg(annotationHelpers_1.annotationHelpers.createSvg(this.svgString, this.svgRoot));
63
63
  this.calcAndSetAnnotationBorders(xCalc, yCalc);
64
64
  this.updateAdornerInner();
65
65
  this.prevIsSelected = this.isSelected;
@@ -96,9 +96,6 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
96
96
  });
97
97
  /** @inheritDoc */
98
98
  HorizontalLineAnnotation.prototype.drawWithContext = function (renderContext, xCalc, yCalc, viewRect) {
99
- if (this.isHidden) {
100
- return;
101
- }
102
99
  Guard_1.Guard.notNull(renderContext, "renderContext");
103
100
  Guard_1.Guard.notNull(xCalc, "xCalc");
104
101
  Guard_1.Guard.notNull(yCalc, "yCalc");
@@ -106,6 +106,10 @@ export declare enum EAnnotationType {
106
106
  * Defines the interface to an Annotation - a type of marker, text label, line or custom UI overlay on a 2D Cartesian {@link SciChartSurface}
107
107
  */
108
108
  export interface IAnnotation extends IDeletable, INotifyOnDpiChanged {
109
+ /**
110
+ * A unique Id for the {@link IAnnotation}
111
+ */
112
+ readonly id: string;
109
113
  /**
110
114
  * @description annotation type. See {@link EAnnotationType} for a list of values
111
115
  */
@@ -183,7 +183,7 @@ export declare class LineAnnotation extends RenderContextAnnotationBase {
183
183
  onDpiChanged(args: TDpiChangedEventArgs): void;
184
184
  toJSON(): {
185
185
  type: EAnnotationType;
186
- options: IAnnotationBaseOptions;
186
+ options: Required<Pick<IAnnotationBaseOptions, "opacity" | "id" | "annotationLayer" | "isHidden" | "resizeDirections" | "isEditable" | "x1" | "x2" | "y1" | "y2" | "xAxisId" | "xCoordinateMode" | "yAxisId" | "yCoordinateMode" | "isSelected" | "onDragStarted" | "onDragEnded" | "onDrag">>;
187
187
  };
188
188
  protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
189
189
  protected notifyPropertyChanged(propertyName: string): void;
@@ -31,6 +31,7 @@ var Pen2DCache_1 = require("../../Drawing/Pen2DCache");
31
31
  var drawLabel_1 = require("../Helpers/drawLabel");
32
32
  var DpiHelper_1 = require("../TextureManager/DpiHelper");
33
33
  var AnnotationBase_1 = require("./AnnotationBase");
34
+ var annotationHelpers_1 = require("./annotationHelpers");
34
35
  var constants_1 = require("./constants");
35
36
  var IAnnotation_1 = require("./IAnnotation");
36
37
  var RenderContextAnnotationBase_1 = require("./RenderContextAnnotationBase");
@@ -266,9 +267,6 @@ var LineAnnotation = /** @class */ (function (_super) {
266
267
  /** @inheritDoc */
267
268
  LineAnnotation.prototype.drawWithContext = function (renderContext, xCalc, yCalc, viewRect) {
268
269
  var _this = this;
269
- if (this.isHidden) {
270
- return;
271
- }
272
270
  Guard_1.Guard.notNull(renderContext, "renderContext");
273
271
  Guard_1.Guard.notNull(xCalc, "xCalc");
274
272
  Guard_1.Guard.notNull(yCalc, "yCalc");
@@ -447,7 +445,7 @@ var LineAnnotation = /** @class */ (function (_super) {
447
445
  if (this.isSelected) {
448
446
  var _a = this.getAdornerAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
449
447
  var svgString = svgStringAdornerTemplate(x1, y1, x2, y2);
450
- this.svgAdorner = AnnotationBase_1.createSvg(svgString, adornerSvgRoot);
448
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
451
449
  }
452
450
  };
453
451
  return LineAnnotation;
@@ -19,6 +19,7 @@ var XyDirection_1 = require("../../../types/XyDirection");
19
19
  var pointUtil_1 = require("../../../utils/pointUtil");
20
20
  var translate_1 = require("../../../utils/translate");
21
21
  var AnnotationBase_1 = require("./AnnotationBase");
22
+ var annotationHelpers_1 = require("./annotationHelpers");
22
23
  var constants_1 = require("./constants");
23
24
  var CustomAnnotation_1 = require("./CustomAnnotation");
24
25
  /**
@@ -355,7 +356,7 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
355
356
  if (this.svg) {
356
357
  return;
357
358
  }
358
- this.setSvg(AnnotationBase_1.createSvg(this.svgString, this.svgRoot));
359
+ this.setSvg(annotationHelpers_1.annotationHelpers.createSvg(this.svgString, this.svgRoot));
359
360
  // @ts-ignore
360
361
  var svgRect = this.svg.getBBox();
361
362
  var x1Coord = this.getX1Coordinate(xCalc, yCalc);
@@ -414,7 +415,7 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
414
415
  var _a = this.getAdornerAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
415
416
  var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
416
417
  var svgString = this.adornerSvgStringTemplate(x1, y1, x2, y2);
417
- this.svgAdorner = AnnotationBase_1.createSvg(svgString, adornerSvgRoot);
418
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
418
419
  }
419
420
  };
420
421
  OverviewCustomResizableAnnotation.prototype.adjustLeftSideToLimits = function (x2Coord, expectedLeftPoint, horizontalCalc) {
@@ -183,7 +183,7 @@ var defaultTooltipTemplate = function (id, seriesInfo, rolloverTooltip) {
183
183
  valuesWithLabels.forEach(function (val, index) {
184
184
  valuesBlock += "<tspan x=\"8\" dy=\"1.2em\">" + val + "</tspan>";
185
185
  });
186
- return "<svg width=\"" + width + "\" height=\"" + height + "\">\n <defs>\n <filter id=\"" + id + "\" x=\"0\" y=\"0\" width=\"200%\" height=\"200%\">\n <feOffset result=\"offOut\" in=\"SourceAlpha\" dx=\"3\" dy=\"3\" />\n <feGaussianBlur result=\"blurOut\" in=\"offOut\" stdDeviation=\"3\" />\n <feBlend in=\"SourceGraphic\" in2=\"blurOut\" mode=\"normal\" />\n </filter>\n </defs>\n <rect rx=\"4\" ry=\"4\" width=\"95%\" height=\"90%\" fill=\"" + tooltipColor + "\" filter=\"url(#" + id + ")\" />\n <svg width=\"100%\">\n <text x=\"8\" y=\"3\" font-size=\"13\" font-family=\"Verdana\" dy=\"0\" fill=\"" + tooltipTextColor + "\">" + valuesBlock + "</text>\n </svg>\n </svg>";
186
+ return "<svg class=\"scichart__rollover-tooltip\" width=\"" + width + "\" height=\"" + height + "\">\n <defs>\n <filter id=\"" + id + "\" x=\"0\" y=\"0\" width=\"200%\" height=\"200%\">\n <feOffset result=\"offOut\" in=\"SourceAlpha\" dx=\"3\" dy=\"3\" />\n <feGaussianBlur result=\"blurOut\" in=\"offOut\" stdDeviation=\"3\" />\n <feBlend in=\"SourceGraphic\" in2=\"blurOut\" mode=\"normal\" />\n </filter>\n </defs>\n <rect rx=\"4\" ry=\"4\" width=\"95%\" height=\"90%\" fill=\"" + tooltipColor + "\" filter=\"url(#" + id + ")\" />\n <svg width=\"100%\">\n <text x=\"8\" y=\"3\" font-size=\"13\" font-family=\"Verdana\" dy=\"0\" fill=\"" + tooltipTextColor + "\">" + valuesBlock + "</text>\n </svg>\n </svg>";
187
187
  };
188
188
  /** @ignore */
189
189
  var calcTooltipWidth = function (textLength, fontSize) {
@@ -84,7 +84,7 @@ export declare abstract class SvgAnnotationBase extends AnnotationBase {
84
84
  delete(): void;
85
85
  toJSON(): {
86
86
  type: import("./IAnnotation").EAnnotationType;
87
- options: IAnnotationBaseOptions;
87
+ options: Required<Pick<IAnnotationBaseOptions, "opacity" | "id" | "annotationLayer" | "isHidden" | "resizeDirections" | "isEditable" | "x1" | "x2" | "y1" | "y2" | "xAxisId" | "xCoordinateMode" | "yAxisId" | "yCoordinateMode" | "isSelected" | "onDragStarted" | "onDragEnded" | "onDrag">>;
88
88
  };
89
89
  get svg(): SVGElement;
90
90
  protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
@@ -20,6 +20,7 @@ var pointUtil_1 = require("../../../utils/pointUtil");
20
20
  var translate_1 = require("../../../utils/translate");
21
21
  var DpiHelper_1 = require("../TextureManager/DpiHelper");
22
22
  var AnnotationBase_1 = require("./AnnotationBase");
23
+ var annotationHelpers_1 = require("./annotationHelpers");
23
24
  var constants_1 = require("./constants");
24
25
  /**
25
26
  * The Base class for an {@link AnnotationBase | Annotation} which draws using an HTML5 SVG canvas
@@ -149,7 +150,7 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
149
150
  else if (this.verticalAnchorPointProperty === AnchorPoint_1.EVerticalAnchorPoint.Bottom) {
150
151
  shiftY -= svgHeight;
151
152
  }
152
- this.svg.style.display = this.isHidden ? "none" : "block";
153
+ this.svg.style.visibility = this.isHidden ? "hidden" : "visible";
153
154
  this.svg.style.opacity = this.opacity.toString();
154
155
  var x1Coord = shiftX + this.getX1Coordinate(xCalc, yCalc);
155
156
  var y1Coord = shiftY + this.getY1Coordinate(xCalc, yCalc);
@@ -255,7 +256,7 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
255
256
  }
256
257
  if (this.isSelected) {
257
258
  var svgString = svgStringAdornerTemplate(x1, y1, x2, y2, this.verticalAnchorPoint, this.horizontalAnchorPoint);
258
- this.svgAdorner = AnnotationBase_1.createSvg(svgString, adornerSvgRoot);
259
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
259
260
  }
260
261
  };
261
262
  Object.defineProperty(SvgAnnotationBase.prototype, "svgRoot", {
@@ -70,7 +70,7 @@ export declare class TextAnnotation extends SvgAnnotationBase {
70
70
  set fontWeight(fontWeight: string);
71
71
  toJSON(): {
72
72
  type: EAnnotationType;
73
- options: import("./AnnotationBase").IAnnotationBaseOptions;
73
+ options: Required<Pick<import("./AnnotationBase").IAnnotationBaseOptions, "opacity" | "id" | "annotationLayer" | "isHidden" | "resizeDirections" | "isEditable" | "x1" | "x2" | "y1" | "y2" | "xAxisId" | "xCoordinateMode" | "yAxisId" | "yCoordinateMode" | "isSelected" | "onDragStarted" | "onDragEnded" | "onDrag">>;
74
74
  };
75
75
  /**
76
76
  * Notifies listeners of {@link invalidateParentCallback} that a property has changed