scichart 2.1.2294 → 2.2.2378

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 (184) hide show
  1. package/Builder/buildAxis.d.ts +7 -0
  2. package/Builder/buildAxis.js +6 -0
  3. package/Builder/buildDataSeries.d.ts +19 -1
  4. package/Builder/buildDataSeries.js +22 -1
  5. package/Builder/buildModifiers.d.ts +2 -1
  6. package/Builder/buildSeries.d.ts +7 -2
  7. package/Builder/buildSeries.js +5 -1
  8. package/Charting/ChartModifiers/CursorModifier.d.ts +5 -0
  9. package/Charting/ChartModifiers/CursorModifier.js +15 -10
  10. package/Charting/ChartModifiers/LegendModifier.d.ts +31 -0
  11. package/Charting/ChartModifiers/LegendModifier.js +22 -0
  12. package/Charting/ChartModifiers/RolloverModifier.d.ts +10 -0
  13. package/Charting/ChartModifiers/RolloverModifier.js +76 -19
  14. package/Charting/Drawing/WebGlRenderContext2D.js +26 -42
  15. package/Charting/LayoutManager/LayoutManager.js +6 -1
  16. package/Charting/Model/BaseHeatmapDataSeries.d.ts +3 -2
  17. package/Charting/Model/BaseHeatmapDataSeries.js +17 -5
  18. package/Charting/Model/ChartData/HlcSeriesInfo.d.ts +12 -0
  19. package/Charting/Model/ChartData/HlcSeriesInfo.js +52 -0
  20. package/Charting/Model/Filters/HlcCustomFilter.d.ts +41 -0
  21. package/Charting/Model/Filters/HlcCustomFilter.js +119 -0
  22. package/Charting/Model/Filters/HlcFilterBase.d.ts +30 -0
  23. package/Charting/Model/Filters/HlcFilterBase.js +141 -0
  24. package/Charting/Model/Filters/HlcScaleOffsetFilter.d.ts +18 -0
  25. package/Charting/Model/Filters/HlcScaleOffsetFilter.js +86 -0
  26. package/Charting/Model/Filters/XyFilterBase.d.ts +2 -0
  27. package/Charting/Model/Filters/XyFilterBase.js +6 -0
  28. package/Charting/Model/Filters/XyyFilterBase.js +9 -0
  29. package/Charting/Model/Filters/XyzFilterBase.js +12 -3
  30. package/Charting/Model/HlcDataSeries.d.ts +189 -0
  31. package/Charting/Model/HlcDataSeries.js +557 -0
  32. package/Charting/Model/IDataSeries.d.ts +5 -1
  33. package/Charting/Model/IDataSeries.js +4 -0
  34. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +1 -1
  35. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -2
  36. package/Charting/Model/PointSeries/HlcPointSeriesWrapped.d.ts +10 -0
  37. package/Charting/Model/PointSeries/HlcPointSeriesWrapped.js +31 -0
  38. package/Charting/Model/PointSeries/IPointSeries.d.ts +5 -0
  39. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +1 -1
  40. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +3 -3
  41. package/Charting/Numerics/CoordinateCalculators/LogarithmicCoordinateCalculator.d.ts +2 -2
  42. package/Charting/Numerics/CoordinateCalculators/LogarithmicCoordinateCalculator.js +15 -6
  43. package/Charting/Services/SciChartRenderer.d.ts +1 -0
  44. package/Charting/Services/SciChartRenderer.js +6 -0
  45. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -1
  46. package/Charting/Visuals/Annotations/AnnotationBase.js +23 -2
  47. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +6 -0
  48. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +46 -5
  49. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +3 -1
  50. package/Charting/Visuals/Annotations/CustomAnnotation.js +14 -3
  51. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.d.ts +4 -0
  52. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +3 -2
  53. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +1 -1
  54. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +13 -3
  55. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +13 -0
  56. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +71 -14
  57. package/Charting/Visuals/Annotations/VerticalLineAnnotation.d.ts +2 -0
  58. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +3 -2
  59. package/Charting/Visuals/Annotations/constants.d.ts +2 -1
  60. package/Charting/Visuals/Annotations/constants.js +1 -0
  61. package/Charting/Visuals/Axis/AxisBase2D.d.ts +11 -1
  62. package/Charting/Visuals/Axis/AxisBase2D.js +75 -17
  63. package/Charting/Visuals/Axis/AxisCore.d.ts +4 -0
  64. package/Charting/Visuals/Axis/AxisCore.js +6 -0
  65. package/Charting/Visuals/Axis/AxisRenderer.js +6 -10
  66. package/Charting/Visuals/Axis/DateTimeNumericAxis.d.ts +11 -0
  67. package/Charting/Visuals/Axis/DateTimeNumericAxis.js +36 -0
  68. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.d.ts +28 -0
  69. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +125 -0
  70. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +34 -0
  71. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +82 -0
  72. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +2 -2
  73. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +39 -6
  74. package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +1 -0
  75. package/Charting/Visuals/Axis/LogarithmicAxis.js +5 -3
  76. package/Charting/Visuals/Helpers/NativeObject.d.ts +13 -0
  77. package/Charting/Visuals/Helpers/NativeObject.js +101 -0
  78. package/Charting/Visuals/Helpers/createNativeRect.d.ts +2 -2
  79. package/Charting/Visuals/Helpers/createNativeRect.js +3 -1
  80. package/Charting/Visuals/Helpers/drawBorder.js +2 -2
  81. package/Charting/Visuals/Helpers/drawLabel.d.ts +3 -3
  82. package/Charting/Visuals/Helpers/drawLabel.js +38 -18
  83. package/Charting/Visuals/I2DSurfaceOptions.d.ts +6 -0
  84. package/Charting/Visuals/Legend/SciChartLegend.d.ts +4 -0
  85. package/Charting/Visuals/Legend/SciChartLegend.js +7 -1
  86. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +24 -8
  87. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +109 -31
  88. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +3 -0
  89. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -0
  90. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +17 -166
  91. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +35 -328
  92. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +5 -2
  93. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +5 -3
  94. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +14 -11
  95. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +46 -0
  96. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +252 -0
  97. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +1 -1
  98. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.d.ts +188 -0
  99. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +357 -0
  100. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +3 -10
  101. package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.d.ts +20 -0
  102. package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.js +120 -0
  103. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -0
  104. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +36 -0
  105. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +8 -0
  106. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +6 -0
  107. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.d.ts +6 -0
  108. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.js +11 -0
  109. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +1 -2
  110. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +22 -0
  111. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +38 -1
  112. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -2
  113. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +26 -45
  114. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +77 -18
  115. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +139 -42
  116. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +13 -0
  117. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +23 -3
  118. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  119. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +21 -1
  120. package/Charting/Visuals/RenderableSeries/constants.d.ts +8 -0
  121. package/Charting/Visuals/RenderableSeries/constants.js +8 -0
  122. package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +25 -2
  123. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +9 -1
  124. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +128 -2
  125. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +202 -21
  126. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +6 -1
  127. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +5 -0
  128. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +77 -3
  129. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +373 -81
  130. package/Charting/Visuals/SciChartPieSurface/constants.d.ts +7 -1
  131. package/Charting/Visuals/SciChartPieSurface/constants.js +6 -0
  132. package/Charting/Visuals/SciChartSurface.d.ts +13 -2
  133. package/Charting/Visuals/SciChartSurface.js +39 -3
  134. package/Charting/Visuals/createMaster.js +17 -13
  135. package/Charting/Visuals/createSingle.js +5 -3
  136. package/Charting/Visuals/licenseManager2D.d.ts +6 -0
  137. package/Charting/Visuals/licenseManager2D.js +83 -8
  138. package/Charting/Visuals/licenseManager2dState.d.ts +11 -0
  139. package/Charting/Visuals/licenseManager2dState.js +37 -1
  140. package/Charting/Visuals/loader.js +4 -1
  141. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  142. package/Charting/Visuals/sciChartInitCommon.js +13 -9
  143. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +6 -2
  144. package/Charting3D/Visuals/SciChart3DRenderer.js +1 -1
  145. package/Charting3D/Visuals/createMaster3d.js +20 -14
  146. package/Charting3D/Visuals/createSingle3d.js +3 -4
  147. package/Charting3D/Visuals/licenseManager3D.js +3 -1
  148. package/Core/BuildStamp.d.ts +1 -1
  149. package/Core/BuildStamp.js +2 -2
  150. package/Core/Telemetry.d.ts +7 -0
  151. package/Core/Telemetry.js +106 -0
  152. package/Core/storage/localStorageApi.d.ts +4 -0
  153. package/Core/storage/localStorageApi.js +12 -0
  154. package/_wasm/scichart.browser.js +1 -1
  155. package/_wasm/scichart2d.js +95 -95
  156. package/_wasm/scichart2d.wasm +0 -0
  157. package/_wasm/scichart3d.js +14 -14
  158. package/_wasm/scichart3d.wasm +0 -0
  159. package/package.json +1 -1
  160. package/types/AxisType.d.ts +5 -1
  161. package/types/AxisType.js +4 -0
  162. package/types/Color.d.ts +1 -0
  163. package/types/Color.js +1 -0
  164. package/types/DataFilterType.d.ts +1 -0
  165. package/types/DataFilterType.js +1 -0
  166. package/types/DataPointWidthMode.d.ts +13 -0
  167. package/types/DataPointWidthMode.js +17 -0
  168. package/types/ErrorDirection.d.ts +13 -0
  169. package/types/ErrorDirection.js +17 -0
  170. package/types/ErrorMode.d.ts +17 -0
  171. package/types/ErrorMode.js +21 -0
  172. package/types/LabelPlacement.d.ts +8 -0
  173. package/types/LabelPlacement.js +11 -1
  174. package/types/LabelProviderType.d.ts +5 -1
  175. package/types/LabelProviderType.js +4 -0
  176. package/types/SeriesType.d.ts +3 -1
  177. package/types/SeriesType.js +2 -0
  178. package/types/TSciChart.d.ts +8 -2
  179. package/types/TSciChart3D.d.ts +5 -2
  180. package/types/TSciChartSurfaceCanvases.d.ts +1 -0
  181. package/utils/date.d.ts +1 -0
  182. package/utils/date.js +15 -1
  183. package/utils/guid.d.ts +6 -0
  184. package/utils/guid.js +17 -1
@@ -19,9 +19,9 @@ exports.XyyPointSeriesWrapped = void 0;
19
19
  var BasePointSeriesWrapped_1 = require("./BasePointSeriesWrapped");
20
20
  var XyyPointSeriesWrapped = /** @class */ (function (_super) {
21
21
  __extends(XyyPointSeriesWrapped, _super);
22
- function XyyPointSeriesWrapped(dataSeries) {
23
- var _this = _super.call(this, dataSeries) || this;
24
- _this.y1Values = dataSeries.getNativeY1Values();
22
+ function XyyPointSeriesWrapped(dataSeries, yValues, y1Values) {
23
+ var _this = _super.call(this, dataSeries, yValues) || this;
24
+ _this.y1Values = y1Values !== null && y1Values !== void 0 ? y1Values : dataSeries.getNativeY1Values();
25
25
  return _this;
26
26
  }
27
27
  return XyyPointSeriesWrapped;
@@ -1,8 +1,8 @@
1
+ import { NumberRange } from "../../../Core/NumberRange";
1
2
  import { TSciChart } from "../../../types/TSciChart";
2
3
  import { TSciChart3D } from "../../../types/TSciChart3D";
3
- import { CoordinateCalculatorBase } from "./CoordinateCalculatorBase";
4
4
  import { EXyDirection } from "../../../types/XyDirection";
5
- import { NumberRange } from "../../../Core/NumberRange";
5
+ import { CoordinateCalculatorBase } from "./CoordinateCalculatorBase";
6
6
  /**
7
7
  * Provides an implementation of Numeric {@link CoordinateCalculatorBase | Coordinate Calculator} which transforms
8
8
  * numeric data-values to pixel coordinates using logarithmic scaling and vice versa.
@@ -16,9 +16,9 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.LogarithmicCoordinateCalculator = void 0;
19
- var CoordinateCalculatorBase_1 = require("./CoordinateCalculatorBase");
20
- var XyDirection_1 = require("../../../types/XyDirection");
21
19
  var NumberRange_1 = require("../../../Core/NumberRange");
20
+ var XyDirection_1 = require("../../../types/XyDirection");
21
+ var CoordinateCalculatorBase_1 = require("./CoordinateCalculatorBase");
22
22
  /**
23
23
  * Provides an implementation of Numeric {@link CoordinateCalculatorBase | Coordinate Calculator} which transforms
24
24
  * numeric data-values to pixel coordinates using logarithmic scaling and vice versa.
@@ -73,18 +73,27 @@ var LogarithmicCoordinateCalculator = /** @class */ (function (_super) {
73
73
  configurable: true
74
74
  });
75
75
  LogarithmicCoordinateCalculator.prototype.translateBy = function (pixels, range) {
76
+ if (pixels === 0) {
77
+ return range;
78
+ }
76
79
  var zeroPoint = Math.abs(this.nativeCalculator.GetDataValue(0));
77
80
  var toScrollPoint = Math.abs(this.nativeCalculator.GetDataValue(pixels));
78
81
  var numberUtil = this.webAssemblyContext.NumberUtil;
82
+ var isNegative = range.min < 0;
83
+ if (isNegative) {
84
+ range = new NumberRange_1.NumberRange(Math.abs(range.max), Math.abs(range.min));
85
+ }
79
86
  var expDelta = numberUtil.Log(toScrollPoint, this.logBase) - numberUtil.Log(zeroPoint, this.logBase);
80
87
  if (this.hasFlippedCoordinates)
81
88
  expDelta = -expDelta;
82
89
  var expMin = numberUtil.Log(range.min, this.logBase);
83
90
  var expMax = numberUtil.Log(range.max, this.logBase);
84
- var _mult = this.visibleMin < 0 ? -1.0 : 1.0;
85
- var newMin = _mult * Math.pow(this.logBase, expMin + expDelta);
86
- var newMax = _mult * Math.pow(this.logBase, expMax + expDelta);
87
- return new NumberRange_1.NumberRange(newMin, newMax);
91
+ var newMin = Math.pow(this.logBase, expMin + expDelta);
92
+ var newMax = Math.pow(this.logBase, expMax + expDelta);
93
+ if (isNegative)
94
+ return new NumberRange_1.NumberRange(-newMax, -newMin);
95
+ else
96
+ return new NumberRange_1.NumberRange(newMin, newMax);
88
97
  };
89
98
  LogarithmicCoordinateCalculator.prototype.zoomTranslateBy = function (minFraction, maxFraction, inputRange) {
90
99
  return inputRange.growByLog(new NumberRange_1.NumberRange(minFraction, maxFraction), this.logBase);
@@ -31,6 +31,7 @@ export declare class SciChartRenderer {
31
31
  private drawRenderContextAnnotations;
32
32
  private drawSvgAnnotations;
33
33
  private validate;
34
+ private prevRect;
34
35
  private updateSvgCanvasSize;
35
36
  private prepareAxesRenderData;
36
37
  private prepareSeriesRenderData;
@@ -223,6 +223,12 @@ var SciChartRenderer = /** @class */ (function () {
223
223
  // Convert seriesViewRect back to device pixels
224
224
  // e.g. at Retina display canvas size may be 400x300 but seriesViewRect size would be 800x600
225
225
  var viewRectInDevicePixels = new Rect_1.Rect(seriesViewRect.x / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.y / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.width / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.height / DpiHelper_1.DpiHelper.PIXEL_RATIO);
226
+ if (!this.prevRect) {
227
+ this.prevRect = viewRectInDevicePixels;
228
+ }
229
+ else if (Rect_1.Rect.isEqual(this.prevRect, viewRectInDevicePixels)) {
230
+ return;
231
+ }
226
232
  var svgRootElement = this.sciChartSurface.domSvgContainer;
227
233
  if (svgRootElement) {
228
234
  svgRootElement.style.marginLeft = "".concat(viewRectInDevicePixels.x, "px");
@@ -224,10 +224,10 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
224
224
  y: number;
225
225
  };
226
226
  protected typeMap: Map<string, string>;
227
+ protected isHiddenProperty: boolean;
227
228
  private opacityProperty;
228
229
  private annotationLayerProperty;
229
230
  private isEditableProperty;
230
- protected isHiddenProperty: boolean;
231
231
  private parentSurfaceProperty;
232
232
  private x1Property;
233
233
  private x2Property;
@@ -240,6 +240,7 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
240
240
  private isSelectedProperty;
241
241
  private resizeDirectionsProperty;
242
242
  private svgAdornerRootProperty;
243
+ private invalidateState;
243
244
  /** @inheritDoc */
244
245
  get annotationLayer(): EAnnotationLayer;
245
246
  /** @inheritDoc */
@@ -325,6 +326,10 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
325
326
  * @inheritDoc
326
327
  */
327
328
  onDpiChanged(args: TDpiChangedEventArgs): void;
329
+ /** Internal use. Captures the state of isHidden,x1,y1 and prevents invalidateParent being called on change to these properties */
330
+ suspendInvalidate(): void;
331
+ /** Internal use. If isHidden,x1,y1 have change since suspendInvalidate was called, call invalidateParent */
332
+ resumeInvalidate(): void;
328
333
  toJSON(): {
329
334
  type: EAnnotationType;
330
335
  options: Required<Omit<IAnnotationBaseOptions, never>>;
@@ -70,9 +70,9 @@ var AnnotationBase = /** @class */ (function () {
70
70
  y2: 0
71
71
  };
72
72
  this.typeMap = new Map();
73
+ this.isHiddenProperty = false;
73
74
  this.annotationLayerProperty = IAnnotation_1.EAnnotationLayer.AboveChart;
74
75
  this.isEditableProperty = false;
75
- this.isHiddenProperty = false;
76
76
  this.xAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
77
77
  this.yAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
78
78
  this.xCoordinateModeProperty = ECoordinateMode.DataValue;
@@ -425,6 +425,27 @@ var AnnotationBase = /** @class */ (function () {
425
425
  * @inheritDoc
426
426
  */
427
427
  AnnotationBase.prototype.onDpiChanged = function (args) { };
428
+ /** Internal use. Captures the state of isHidden,x1,y1 and prevents invalidateParent being called on change to these properties */
429
+ AnnotationBase.prototype.suspendInvalidate = function () {
430
+ this.invalidateState = {
431
+ isHidden: this.isHidden,
432
+ x1: this.x1,
433
+ y1: this.y1
434
+ };
435
+ };
436
+ /** Internal use. If isHidden,x1,y1 have change since suspendInvalidate was called, call invalidateParent */
437
+ AnnotationBase.prototype.resumeInvalidate = function () {
438
+ if (!this.invalidateState)
439
+ return;
440
+ if (this.isHidden !== this.invalidateState.isHidden ||
441
+ this.x1 !== this.invalidateState.x1 ||
442
+ this.y1 !== this.invalidateState.y1) {
443
+ if (this.invalidateParentCallback) {
444
+ this.invalidateParentCallback();
445
+ }
446
+ }
447
+ this.invalidateState = undefined;
448
+ };
428
449
  AnnotationBase.prototype.toJSON = function () {
429
450
  var options = {
430
451
  id: this.id,
@@ -497,7 +518,7 @@ var AnnotationBase = /** @class */ (function () {
497
518
  * @param propertyName The name of the property which has changed
498
519
  */
499
520
  AnnotationBase.prototype.notifyPropertyChanged = function (propertyName) {
500
- if (this.invalidateParentCallback) {
521
+ if (this.invalidateParentCallback && !this.invalidateState) {
501
522
  this.invalidateParentCallback();
502
523
  }
503
524
  };
@@ -13,6 +13,7 @@ export interface ICursorTooltipSvgAnnotationOptions extends ISvgAnnotationBaseOp
13
13
  tooltipLegendOffsetX?: number;
14
14
  tooltipLegendOffsetY?: number;
15
15
  cursorModifier: CursorModifier;
16
+ placementDivId?: string;
16
17
  }
17
18
  /**
18
19
  * A Tooltip Annotation which provides an SVG tooltip over the chart. Used by the {@link CursorModifier}
@@ -31,6 +32,8 @@ export declare class CursorTooltipSvgAnnotation extends SvgAnnotationBase {
31
32
  private tooltipLegendOffsetYProperty;
32
33
  private svgLegend;
33
34
  private previousMousePosition;
35
+ private placementDivId?;
36
+ private svgDivRoot?;
34
37
  /**
35
38
  * Creates an instance of the {@link CursorTooltipSvgAnnotation}
36
39
  * @param options
@@ -62,10 +65,13 @@ export declare class CursorTooltipSvgAnnotation extends SvgAnnotationBase {
62
65
  * @inheritDoc
63
66
  */
64
67
  update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
68
+ /** @inheritDoc */
69
+ delete(): void;
65
70
  /**
66
71
  * @inheritDoc
67
72
  */
68
73
  protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
69
74
  private updateTooltip;
70
75
  private updateLegendTooltip;
76
+ private updateExternalLegendTooltip;
71
77
  }
@@ -30,7 +30,7 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
30
30
  * @param options
31
31
  */
32
32
  function CursorTooltipSvgAnnotation(options) {
33
- var _a, _b, _c, _d, _e, _f, _g, _h;
33
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
34
34
  var _this = _super.call(this, options) || this;
35
35
  /** @inheritDoc */
36
36
  _this.type = IAnnotation_1.EAnnotationType.SVG;
@@ -45,6 +45,11 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
45
45
  _this.tooltipLegendOffsetXProperty = (_g = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetX) !== null && _g !== void 0 ? _g : _this.tooltipLegendOffsetXProperty;
46
46
  _this.tooltipLegendOffsetYProperty = (_h = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetY) !== null && _h !== void 0 ? _h : _this.tooltipLegendOffsetYProperty;
47
47
  _this.cursorModifier = options.cursorModifier;
48
+ _this.placementDivId = (_j = options === null || options === void 0 ? void 0 : options.placementDivId) !== null && _j !== void 0 ? _j : _this.placementDivId;
49
+ if (_this.placementDivId) {
50
+ var svgRoot = document.getElementById(_this.placementDivId);
51
+ _this.svgDivRoot = svgRoot;
52
+ }
48
53
  return _this;
49
54
  }
50
55
  Object.defineProperty(CursorTooltipSvgAnnotation.prototype, "seriesInfos", {
@@ -174,8 +179,25 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
174
179
  this.delete();
175
180
  }
176
181
  this.create(xCalc, yCalc);
177
- this.updateTooltip();
178
- this.updateLegendTooltip();
182
+ if (this.placementDivId) {
183
+ this.updateExternalLegendTooltip();
184
+ }
185
+ else {
186
+ this.updateTooltip();
187
+ this.updateLegendTooltip();
188
+ }
189
+ };
190
+ /** @inheritDoc */
191
+ CursorTooltipSvgAnnotation.prototype.delete = function () {
192
+ if (!this.parentSurface || this.parentSurface.isDeleted || !this.svg)
193
+ return;
194
+ if (this.placementDivId) {
195
+ this.svgDivRoot.removeChild(this.svg);
196
+ }
197
+ else {
198
+ this.svgRoot.removeChild(this.svg);
199
+ }
200
+ this.setSvg(undefined);
179
201
  };
180
202
  /**
181
203
  * @inheritDoc
@@ -185,8 +207,14 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
185
207
  throw Error("Please provide a tooltipSvgTemplate for CursorTooltipSvgAnnotation");
186
208
  var svgString = this.tooltipSvgTemplate(this.seriesInfos, this);
187
209
  var svgNode = document.createRange().createContextualFragment(svgString);
188
- this.svgRoot.appendChild(svgNode);
189
- this.setSvg(this.svgRoot.lastChild);
210
+ if (this.placementDivId) {
211
+ this.svgDivRoot.appendChild(svgNode);
212
+ this.setSvg(this.svgDivRoot.lastChild);
213
+ }
214
+ else {
215
+ this.svgRoot.appendChild(svgNode);
216
+ this.setSvg(this.svgRoot.lastChild);
217
+ }
190
218
  };
191
219
  CursorTooltipSvgAnnotation.prototype.updateTooltip = function () {
192
220
  var _a, _b, _c, _d;
@@ -218,6 +246,19 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
218
246
  this.svgLegend.setAttribute("y", this.tooltipLegendOffsetY.toString());
219
247
  }
220
248
  };
249
+ CursorTooltipSvgAnnotation.prototype.updateExternalLegendTooltip = function () {
250
+ if (this.tooltipLegendTemplate) {
251
+ var svgString = this.seriesInfos
252
+ ? this.tooltipLegendTemplate(this.seriesInfos, this)
253
+ : "<svg style='display: none'></svg>";
254
+ var svgNode = document.createRange().createContextualFragment(svgString);
255
+ if (this.svgLegend) {
256
+ this.svgLegend.removeChild(this.svgLegend);
257
+ }
258
+ this.svgDivRoot.appendChild(svgNode);
259
+ this.svgLegend = this.svgDivRoot.lastChild;
260
+ }
261
+ };
221
262
  return CursorTooltipSvgAnnotation;
222
263
  }(SvgAnnotationBase_1.SvgAnnotationBase));
223
264
  exports.CursorTooltipSvgAnnotation = CursorTooltipSvgAnnotation;
@@ -19,7 +19,7 @@ export declare class CustomAnnotation extends SvgAnnotationBase {
19
19
  /**
20
20
  * SVG dom element string provided by the user
21
21
  */
22
- svgString: string;
22
+ svgStringProperty: string;
23
23
  /**
24
24
  * Creates an instance of the {@link CustomAnnotation}
25
25
  * @param options The {@link ICustomAnnotationOptions} which contain optional parameters
@@ -32,4 +32,6 @@ export declare class CustomAnnotation extends SvgAnnotationBase {
32
32
  };
33
33
  /** @inheritDoc */
34
34
  protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
35
+ get svgString(): string;
36
+ set svgString(value: string);
35
37
  }
@@ -33,14 +33,14 @@ var CustomAnnotation = /** @class */ (function (_super) {
33
33
  var _this = _super.call(this, options) || this;
34
34
  /** @inheritDoc */
35
35
  _this.type = IAnnotation_1.EAnnotationType.SVGCustomAnnotation;
36
- _this.svgString = (_a = options === null || options === void 0 ? void 0 : options.svgString) !== null && _a !== void 0 ? _a : undefined;
36
+ _this.svgStringProperty = (_a = options === null || options === void 0 ? void 0 : options.svgString) !== null && _a !== void 0 ? _a : undefined;
37
37
  return _this;
38
38
  }
39
39
  /** @inheritDoc */
40
40
  CustomAnnotation.prototype.toJSON = function () {
41
41
  var json = _super.prototype.toJSON.call(this);
42
42
  var options = {
43
- svgString: this.svgString
43
+ svgString: this.svgStringProperty
44
44
  };
45
45
  Object.assign(json.options, options);
46
46
  return json;
@@ -61,7 +61,7 @@ var CustomAnnotation = /** @class */ (function (_super) {
61
61
  if (this.svg) {
62
62
  this.delete();
63
63
  }
64
- this.setSvg(annotationHelpers_1.annotationHelpers.createSvg(this.svgString, this.svgRoot));
64
+ this.setSvg(annotationHelpers_1.annotationHelpers.createSvg(this.svgStringProperty, this.svgRoot));
65
65
  this.calcAndSetAnnotationBorders(xCalc, yCalc);
66
66
  this.updateAdornerInner();
67
67
  this.prevIsSelected = this.isSelected;
@@ -74,6 +74,17 @@ var CustomAnnotation = /** @class */ (function (_super) {
74
74
  this.prevIsSelected = this.isSelected;
75
75
  }
76
76
  };
77
+ Object.defineProperty(CustomAnnotation.prototype, "svgString", {
78
+ get: function () {
79
+ return this.svgStringProperty;
80
+ },
81
+ set: function (value) {
82
+ this.delete();
83
+ this.svgStringProperty = value;
84
+ },
85
+ enumerable: false,
86
+ configurable: true
87
+ });
77
88
  return CustomAnnotation;
78
89
  }(SvgAnnotationBase_1.SvgAnnotationBase));
79
90
  exports.CustomAnnotation = CustomAnnotation;
@@ -1,4 +1,5 @@
1
1
  import { Rect } from "../../../Core/Rect";
2
+ import { EHorizontalAlignment, EVerticalAlignment } from "../../../types/LabelPlacement";
2
3
  import { ModifierMouseArgs } from "../../ChartModifiers/ModifierMouseArgs";
3
4
  import { WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
4
5
  import { CoordinateCalculatorBase } from "../../Numerics/CoordinateCalculators/CoordinateCalculatorBase";
@@ -7,6 +8,8 @@ import { ILineAnnotationOptions, LineAnnotation } from "./LineAnnotation";
7
8
  export interface IHVLineAnnotationOptions extends ILineAnnotationOptions {
8
9
  dragOnLine?: boolean;
9
10
  dragOnLabel?: boolean;
11
+ horizontalAlignment?: EHorizontalAlignment;
12
+ verticalAlignment?: EVerticalAlignment;
10
13
  }
11
14
  /**
12
15
  * @summary The {@link HorizontalLineAnnotation} provides an {@link AnnotationBase | Annotation} which draws a horizontal line at
@@ -25,6 +28,7 @@ export declare class HorizontalLineAnnotation extends LineAnnotation {
25
28
  readonly type: EAnnotationType;
26
29
  dragOnLine: boolean;
27
30
  dragOnLabel: boolean;
31
+ horizontalAlignment: EHorizontalAlignment;
28
32
  private labelRect;
29
33
  /**
30
34
  * Create an instance of a HorizontalLineAnnotation
@@ -58,7 +58,7 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
58
58
  * @param options Optional parameters of type {@link ILineAnnotationOptions} which configure the annotation upon construction
59
59
  */
60
60
  function HorizontalLineAnnotation(options) {
61
- var _a, _b;
61
+ var _a, _b, _c;
62
62
  var _this = _super.call(this, options) || this;
63
63
  /** @inheritDoc */
64
64
  _this.type = IAnnotation_1.EAnnotationType.RenderContextHorizontalLineAnnotation;
@@ -72,6 +72,7 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
72
72
  }
73
73
  _this.dragOnLine = (_a = options === null || options === void 0 ? void 0 : options.dragOnLine) !== null && _a !== void 0 ? _a : _this.dragOnLine;
74
74
  _this.dragOnLabel = (_b = options === null || options === void 0 ? void 0 : options.dragOnLabel) !== null && _b !== void 0 ? _b : _this.dragOnLabel;
75
+ _this.horizontalAlignment = (_c = options === null || options === void 0 ? void 0 : options.horizontalAlignment) !== null && _c !== void 0 ? _c : _this.horizontalAlignment;
75
76
  return _this;
76
77
  }
77
78
  Object.defineProperty(HorizontalLineAnnotation.prototype, "y2", {
@@ -136,7 +137,7 @@ var HorizontalLineAnnotation = /** @class */ (function (_super) {
136
137
  var isLineAnnotationEdgeVisible = !isPartialLine || isLineAnnotationInHorizontalVisibleRange;
137
138
  if (isAxisLabelInVerticalVisibleRange && isLineAnnotationEdgeVisible) {
138
139
  var textStyle = __assign(__assign({}, verticalAxis.labelStyle), { color: this.axisLabelStroke, fontSize: this.axisFontSize * DpiHelper_1.DpiHelper.PIXEL_RATIO, fontFamily: this.axisFontFamily });
139
- var labelRect = (0, drawLabel_1.drawLineAnnotation)(verticalAxis, renderContext, this.labelPlacement, this.labelValue, borderX1, borderX2, borderY1, borderY2, textStyle, this.axisLabelFill, strokePen, viewRect, this.showLabel, this.opacity);
140
+ var labelRect = (0, drawLabel_1.drawLineAnnotation)(verticalAxis, renderContext, this.labelPlacement, this.labelValue, borderX1, borderX2, borderY1, borderY2, textStyle, this.axisLabelFill, strokePen, viewRect, this.showLabel, this.opacity, this.horizontalAlignment);
140
141
  if (labelRect) {
141
142
  var point1 = (0, translate_1.translateFromCanvasToSeriesViewRect)(new Point_1.Point(labelRect.left, labelRect.top), viewRect, true);
142
143
  var point2 = (0, translate_1.translateFromCanvasToSeriesViewRect)(new Point_1.Point(labelRect.right, labelRect.bottom), viewRect, true);
@@ -31,7 +31,7 @@ export declare class RolloverLegendSvgAnnotation extends SvgAnnotationBase {
31
31
  /**
32
32
  * Gets or sets seriesInfos {@link SeriesInfo} value on the tooltip
33
33
  */
34
- set seriesInfos(value: SeriesInfo[]);
34
+ set seriesInfos(newSeriesInfos: SeriesInfo[]);
35
35
  get tooltipLegendTemplate(): TRolloverLegendSvgTemplate;
36
36
  set tooltipLegendTemplate(value: TRolloverLegendSvgTemplate);
37
37
  get tooltipLegendOffsetX(): number;
@@ -50,9 +50,19 @@ var RolloverLegendSvgAnnotation = /** @class */ (function (_super) {
50
50
  /**
51
51
  * Gets or sets seriesInfos {@link SeriesInfo} value on the tooltip
52
52
  */
53
- set: function (value) {
54
- this.seriesInfosProperty = value;
55
- this.notifyPropertyChanged(constants_1.PROPERTY.SERIES_INFOS);
53
+ set: function (newSeriesInfos) {
54
+ if (this.seriesInfosProperty && newSeriesInfos) {
55
+ // Compare infos against the ones for the matching series. See if any are different
56
+ if (newSeriesInfos.length !== this.seriesInfosProperty.length ||
57
+ this.seriesInfosProperty
58
+ .map(function (seriesInfo) {
59
+ return seriesInfo.equals(newSeriesInfos.find(function (newSeriesInfo) { return newSeriesInfo.renderableSeries.id === seriesInfo.renderableSeries.id; }));
60
+ })
61
+ .some(function (sameSeriesInfo) { return sameSeriesInfo === false; })) {
62
+ this.seriesInfosProperty = newSeriesInfos;
63
+ this.notifyPropertyChanged(constants_1.PROPERTY.SERIES_INFOS);
64
+ }
65
+ }
56
66
  },
57
67
  enumerable: false,
58
68
  configurable: true
@@ -7,6 +7,7 @@ import { ISvgAnnotationBaseOptions, SvgAnnotationBase } from "./SvgAnnotationBas
7
7
  export interface IRolloverTooltipSvgAnnotationOptions extends ISvgAnnotationBaseOptions {
8
8
  height?: number;
9
9
  seriesType?: ESeriesType;
10
+ placementDivId?: string;
10
11
  }
11
12
  /**
12
13
  * A Tooltip Annotation which provides an SVG tooltip over the chart. Used by the {@link RolloverModifier}
@@ -20,6 +21,8 @@ export declare class RolloverTooltipSvgAnnotation extends SvgAnnotationBase {
20
21
  private svgLegend;
21
22
  private seriesInfoProperty;
22
23
  private previousMousePosition;
24
+ private placementDivIdProperty;
25
+ private svgDivRoot;
23
26
  /**
24
27
  * Creates an instance of the {@link RolloverTooltipSvgAnnotation}
25
28
  * @param renderableSeriesProps The {@link RolloverModifierRenderableSeriesProps | props} pass
@@ -44,5 +47,15 @@ export declare class RolloverTooltipSvgAnnotation extends SvgAnnotationBase {
44
47
  updateSize(width: number, height: number): void;
45
48
  /** @inheritDoc */
46
49
  protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
50
+ private generateSvgString;
47
51
  private updateLegendTooltip;
52
+ private updateExternalLegendTooltip;
53
+ /**
54
+ * Gets or sets the parent div element reference or id for the Tooltip
55
+ */
56
+ get placementDivId(): string;
57
+ /**
58
+ * Gets or sets the parent div element reference or id for the Tooltip
59
+ */
60
+ set placementDivId(value: string);
48
61
  }
@@ -34,7 +34,7 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
34
34
  * @param options
35
35
  */
36
36
  function RolloverTooltipSvgAnnotation(renderableSeriesProps, options) {
37
- var _a;
37
+ var _a, _b;
38
38
  var _this = _super.call(this, options) || this;
39
39
  /** @inheritDoc */
40
40
  _this.type = IAnnotation_1.EAnnotationType.SVG;
@@ -46,6 +46,7 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
46
46
  _this.yCoordinateMode = AnnotationBase_1.ECoordinateMode.DataValue;
47
47
  _this.isHidden = true;
48
48
  _this.updateSize = _this.updateSize.bind(_this);
49
+ _this.placementDivIdProperty = (_b = options === null || options === void 0 ? void 0 : options.placementDivId) !== null && _b !== void 0 ? _b : _this.placementDivIdProperty;
49
50
  return _this;
50
51
  }
51
52
  Object.defineProperty(RolloverTooltipSvgAnnotation.prototype, "seriesInfo", {
@@ -59,20 +60,28 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
59
60
  * Gets or sets seriesInfo {@link SeriesInfo} value on the tooltip
60
61
  */
61
62
  set: function (value) {
62
- this.seriesInfoProperty = value;
63
- this.notifyPropertyChanged(constants_1.PROPERTY.SERIES_INFO);
63
+ if ((value && !this.seriesInfoProperty) || !this.seriesInfoProperty.equals(value)) {
64
+ this.seriesInfoProperty = value;
65
+ this.notifyPropertyChanged(constants_1.PROPERTY.SERIES_INFO);
66
+ }
64
67
  },
65
68
  enumerable: false,
66
69
  configurable: true
67
70
  });
68
71
  /** @inheritDoc */
69
72
  RolloverTooltipSvgAnnotation.prototype.delete = function () {
70
- var _a;
73
+ var _a, _b, _c, _d;
71
74
  if (!this.parentSurface || this.parentSurface.isDeleted)
72
75
  return;
73
- (_a = this.svgRoot) === null || _a === void 0 ? void 0 : _a.removeChild(this.svg);
76
+ if (this.svg) {
77
+ if (this.placementDivId) {
78
+ (_b = (_a = this.svg) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.svg);
79
+ return;
80
+ }
81
+ (_c = this.svgRoot) === null || _c === void 0 ? void 0 : _c.removeChild(this.svg);
82
+ }
74
83
  if (this.svgLegend) {
75
- this.svgRoot.removeChild(this.svgLegend);
84
+ (_d = this.svgLegend.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.svgLegend);
76
85
  }
77
86
  };
78
87
  /** @inheritDoc */
@@ -85,8 +94,13 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
85
94
  if (this.svg) {
86
95
  this.delete();
87
96
  }
88
- _super.prototype.update.call(this, xCalc, yCalc);
89
- this.updateLegendTooltip();
97
+ if (this.placementDivId) {
98
+ this.updateExternalLegendTooltip();
99
+ }
100
+ else {
101
+ _super.prototype.update.call(this, xCalc, yCalc);
102
+ this.updateLegendTooltip();
103
+ }
90
104
  };
91
105
  /**
92
106
  * Updates size of the tooltip
@@ -97,22 +111,25 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
97
111
  };
98
112
  /** @inheritDoc */
99
113
  RolloverTooltipSvgAnnotation.prototype.create = function (xCalc, yCalc) {
100
- var _a;
101
114
  var svgString;
102
115
  if (!this.seriesInfo) {
103
116
  svgString = "<svg></svg>";
104
117
  }
105
118
  else {
106
- var tooltipTitle = this.tooltipProps.tooltipTitle;
107
- var idTitle = ("" + tooltipTitle).replace(/\s/g, "");
108
- var id = "id".concat(Math.floor(this.y1), "_").concat(idTitle, "_").concat(Date.now());
109
- var tooltipTemplate = (_a = this.tooltipProps.tooltipTemplate) !== null && _a !== void 0 ? _a : defaultTooltipTemplate;
110
- svgString = tooltipTemplate(id, this.seriesInfo, this);
119
+ svgString = this.generateSvgString();
111
120
  }
112
121
  var svgNode = document.createRange().createContextualFragment(svgString);
113
122
  this.svgRoot.appendChild(svgNode);
114
123
  this.setSvg(this.svgRoot.lastChild);
115
124
  };
125
+ RolloverTooltipSvgAnnotation.prototype.generateSvgString = function () {
126
+ var _a;
127
+ var tooltipTitle = this.tooltipProps.tooltipTitle;
128
+ var idTitle = ("" + tooltipTitle).replace(/\s/g, "");
129
+ var id = "id".concat(Math.floor(this.y1), "_").concat(idTitle, "_").concat(Date.now());
130
+ var tooltipTemplate = (_a = this.tooltipProps.tooltipTemplate) !== null && _a !== void 0 ? _a : defaultTooltipTemplate;
131
+ return tooltipTemplate(id, this.seriesInfo, this);
132
+ };
116
133
  RolloverTooltipSvgAnnotation.prototype.updateLegendTooltip = function () {
117
134
  if (this.tooltipProps.tooltipLegendTemplate) {
118
135
  var svgString = this.seriesInfo
@@ -125,6 +142,38 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
125
142
  this.svgLegend.setAttribute("y", this.tooltipProps.tooltipLegendOffsetY.toString());
126
143
  }
127
144
  };
145
+ RolloverTooltipSvgAnnotation.prototype.updateExternalLegendTooltip = function () {
146
+ var svgString;
147
+ if (!this.seriesInfo) {
148
+ svgString = "<svg style='display: none;'></svg>";
149
+ }
150
+ else {
151
+ svgString = this.generateSvgString();
152
+ }
153
+ var svgNode = document.createRange().createContextualFragment(svgString);
154
+ this.svgDivRoot = document.getElementById(this.placementDivId);
155
+ this.svgDivRoot.appendChild(svgNode);
156
+ this.setSvg(this.svgDivRoot.lastChild);
157
+ };
158
+ Object.defineProperty(RolloverTooltipSvgAnnotation.prototype, "placementDivId", {
159
+ /**
160
+ * Gets or sets the parent div element reference or id for the Tooltip
161
+ */
162
+ get: function () {
163
+ return this.placementDivIdProperty;
164
+ },
165
+ /**
166
+ * Gets or sets the parent div element reference or id for the Tooltip
167
+ */
168
+ set: function (value) {
169
+ if (this.placementDivIdProperty !== value) {
170
+ this.placementDivIdProperty = value;
171
+ this.notifyPropertyChanged(constants_1.PROPERTY.PLACEMENT_DIV_ID);
172
+ }
173
+ },
174
+ enumerable: false,
175
+ configurable: true
176
+ });
128
177
  return RolloverTooltipSvgAnnotation;
129
178
  }(SvgAnnotationBase_1.SvgAnnotationBase));
130
179
  exports.RolloverTooltipSvgAnnotation = RolloverTooltipSvgAnnotation;
@@ -144,6 +193,14 @@ var defaultTooltipDataTemplate = function (seriesInfo, tooltipTitle, tooltipLabe
144
193
  valuesWithLabels.push("Lowest: ".concat(ohlcSeriesInfo.formattedLowValue));
145
194
  valuesWithLabels.push("Close: ".concat(ohlcSeriesInfo.formattedCloseValue));
146
195
  }
196
+ else if (seriesInfo.dataSeriesType === IDataSeries_1.EDataSeriesType.Hlc) {
197
+ var hlcSeriesInfo = seriesInfo;
198
+ if (tooltipLabelX) {
199
+ valuesWithLabels.push("".concat(tooltipLabelX, ": ").concat(hlcSeriesInfo.formattedXValue));
200
+ }
201
+ valuesWithLabels.push("High: ".concat(hlcSeriesInfo.formattedHighValue));
202
+ valuesWithLabels.push("Low: ".concat(hlcSeriesInfo.formattedLowValue));
203
+ }
147
204
  else if (seriesInfo.dataSeriesType === IDataSeries_1.EDataSeriesType.Xyy) {
148
205
  // Band Series
149
206
  var xyySeriesInfo = seriesInfo;
@@ -1,4 +1,5 @@
1
1
  import { Rect } from "../../../Core/Rect";
2
+ import { EVerticalAlignment } from "../../../types/LabelPlacement";
2
3
  import { ModifierMouseArgs } from "../../ChartModifiers/ModifierMouseArgs";
3
4
  import { WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
4
5
  import { CoordinateCalculatorBase } from "../../Numerics/CoordinateCalculators/CoordinateCalculatorBase";
@@ -22,6 +23,7 @@ export declare class VerticalLineAnnotation extends LineAnnotation {
22
23
  readonly type: EAnnotationType;
23
24
  dragOnLine: boolean;
24
25
  dragOnLabel: boolean;
26
+ verticalAlignment: EVerticalAlignment;
25
27
  private labelRect;
26
28
  /**
27
29
  * Create an instance of a LineAnnotation