scichart 2.0.2204 → 2.1.2267

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 (233) hide show
  1. package/Charting/ChartModifiers/DataPointSelectionModifier.js +0 -1
  2. package/Charting/ChartModifiers/LegendModifier.d.ts +2 -2
  3. package/Charting/ChartModifiers/RolloverModifier.d.ts +5 -3
  4. package/Charting/ChartModifiers/RolloverModifier.js +38 -80
  5. package/Charting/Drawing/BrushCache.d.ts +8 -2
  6. package/Charting/Drawing/BrushCache.js +16 -8
  7. package/Charting/Drawing/WebGlRenderContext2D.d.ts +1 -0
  8. package/Charting/Drawing/WebGlRenderContext2D.js +4 -1
  9. package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +2 -0
  10. package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +33 -0
  11. package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  12. package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +19 -2
  13. package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +18 -2
  14. package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  15. package/Charting/Model/BaseDataSeries.d.ts +42 -15
  16. package/Charting/Model/BaseDataSeries.js +77 -28
  17. package/Charting/Model/BaseHeatmapDataSeries.d.ts +31 -23
  18. package/Charting/Model/BaseHeatmapDataSeries.js +45 -18
  19. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.d.ts +23 -0
  20. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +122 -0
  21. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.d.ts +57 -0
  22. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.js +2 -0
  23. package/Charting/Model/Filters/OhlcFilterBase.d.ts +2 -2
  24. package/Charting/Model/Filters/XyFilterBase.d.ts +3 -3
  25. package/Charting/Model/Filters/XyMovingAverageFilter.js +1 -1
  26. package/Charting/Model/Filters/XyyFilterBase.d.ts +4 -4
  27. package/Charting/Model/Filters/XyzFilterBase.d.ts +4 -4
  28. package/Charting/Model/IDataSeries.d.ts +37 -5
  29. package/Charting/Model/OhlcDataSeries.d.ts +12 -11
  30. package/Charting/Model/OhlcDataSeries.js +47 -44
  31. package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +21 -0
  32. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +56 -0
  33. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +14 -0
  34. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +23 -0
  35. package/Charting/Model/PointSeries/IPointSeries.d.ts +31 -0
  36. package/Charting/Model/PointSeries/IPointSeries.js +2 -0
  37. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.d.ts +13 -0
  38. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +59 -0
  39. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.d.ts +11 -0
  40. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.js +32 -0
  41. package/Charting/Model/PointSeries/XyPointSeriesResampled.d.ts +7 -0
  42. package/Charting/Model/PointSeries/XyPointSeriesResampled.js +27 -0
  43. package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +6 -0
  44. package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +27 -0
  45. package/Charting/Model/PointSeries/XyyPointSeriesResampled.d.ts +10 -0
  46. package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +48 -0
  47. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +8 -0
  48. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +29 -0
  49. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.d.ts +8 -0
  50. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.js +29 -0
  51. package/Charting/Model/XyDataSeries.d.ts +3 -2
  52. package/Charting/Model/XyDataSeries.js +26 -26
  53. package/Charting/Model/XyyDataSeries.d.ts +5 -5
  54. package/Charting/Model/XyyDataSeries.js +30 -27
  55. package/Charting/Model/XyzDataSeries.d.ts +5 -5
  56. package/Charting/Model/XyzDataSeries.js +30 -27
  57. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +2 -2
  58. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +2 -2
  59. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.d.ts +2 -1
  60. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.js +6 -2
  61. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.d.ts +2 -1
  62. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.js +6 -2
  63. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +54 -0
  64. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +234 -0
  65. package/Charting/Numerics/Resamplers/ResamplingMode.d.ts +37 -0
  66. package/Charting/Numerics/Resamplers/ResamplingMode.js +41 -0
  67. package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +39 -0
  68. package/Charting/Numerics/Resamplers/ResamplingParams.js +52 -0
  69. package/Charting/Services/RenderPassData.d.ts +6 -1
  70. package/Charting/Services/RenderPassData.js +5 -1
  71. package/Charting/Services/RenderPassInfo.d.ts +18 -0
  72. package/Charting/Services/RenderPassInfo.js +14 -0
  73. package/Charting/Services/SciChartRenderer.d.ts +14 -1
  74. package/Charting/Services/SciChartRenderer.js +125 -31
  75. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +1 -1
  76. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +1 -1
  77. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +7 -2
  78. package/Charting/Visuals/Axis/AxisBase2D.d.ts +23 -0
  79. package/Charting/Visuals/Axis/AxisBase2D.js +71 -24
  80. package/Charting/Visuals/Axis/AxisCore.d.ts +11 -0
  81. package/Charting/Visuals/Axis/AxisCore.js +39 -18
  82. package/Charting/Visuals/Axis/AxisRenderer.d.ts +1 -0
  83. package/Charting/Visuals/Axis/AxisRenderer.js +37 -10
  84. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +51 -0
  85. package/Charting/Visuals/Axis/CategoryAxisBase.js +85 -20
  86. package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +5 -0
  87. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +7 -4
  88. package/Charting/Visuals/Axis/NumericAxis.js +2 -2
  89. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  90. package/Charting/Visuals/Axis/constants.js +1 -0
  91. package/Charting/Visuals/Legend/SciChartLegend.d.ts +6 -0
  92. package/Charting/Visuals/Legend/SciChartLegend.js +30 -13
  93. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +20 -6
  94. package/Charting/Visuals/Legend/SciChartLegendBase.js +22 -4
  95. package/Charting/Visuals/Legend/SciChartPieLegend.d.ts +2 -0
  96. package/Charting/Visuals/Legend/SciChartPieLegend.js +17 -6
  97. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.d.ts +2 -2
  98. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +2 -2
  99. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +3 -3
  100. package/Charting/Visuals/RenderableSeries/Animations/SweepAnimation.d.ts +2 -2
  101. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +2 -2
  102. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +6 -6
  103. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +2 -2
  104. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +9 -2
  105. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +45 -1
  106. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -0
  107. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +1 -0
  108. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -0
  109. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -0
  110. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +12 -5
  111. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +113 -0
  112. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +42 -6
  113. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +129 -21
  114. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +36 -4
  115. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +51 -3
  116. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +38 -4
  117. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +54 -3
  118. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -1
  119. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +8 -14
  120. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +4 -3
  121. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +5 -11
  122. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  123. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +31 -19
  124. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +2 -1
  125. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +17 -21
  126. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +16 -15
  127. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +9 -15
  128. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +4 -3
  129. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +16 -21
  130. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +2 -9
  131. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +0 -7
  132. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +11 -2
  133. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +17 -0
  134. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -0
  135. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +1 -0
  136. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.d.ts +1 -0
  137. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +6 -0
  138. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -2
  139. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -1
  140. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +1 -1
  141. package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +2 -2
  142. package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -2
  143. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -1
  144. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +2 -2
  145. package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +1 -1
  146. package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +2 -2
  147. package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +2 -2
  148. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -6
  149. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +1 -1
  150. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +12 -1
  151. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +38 -2
  152. package/Charting/Visuals/RenderableSeries/ISpline.d.ts +3 -3
  153. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +4 -4
  154. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +5 -5
  155. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +3 -3
  156. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +3 -3
  157. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -3
  158. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +3 -3
  159. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +0 -6
  160. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +1 -1
  161. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +1 -7
  162. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  163. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +6 -0
  164. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +5 -0
  165. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +6 -0
  166. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -3
  167. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +6 -3
  168. package/Charting/Visuals/RenderableSeries/constants.d.ts +3 -0
  169. package/Charting/Visuals/RenderableSeries/constants.js +3 -0
  170. package/Charting/Visuals/SciChartDefaults.d.ts +9 -1
  171. package/Charting/Visuals/SciChartDefaults.js +9 -1
  172. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +4 -2
  173. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +46 -32
  174. package/Charting/Visuals/SciChartSurface.d.ts +4 -4
  175. package/Charting/Visuals/SciChartSurface.js +18 -11
  176. package/Charting/Visuals/SciChartSurfaceBase.d.ts +3 -2
  177. package/Charting/Visuals/SciChartSurfaceBase.js +4 -4
  178. package/Charting/Visuals/createMaster.d.ts +1 -1
  179. package/Charting/Visuals/createMaster.js +11 -6
  180. package/Charting/Visuals/createSingle.d.ts +1 -1
  181. package/Charting/Visuals/createSingle.js +2 -2
  182. package/Charting/Visuals/licenseManager2D.js +21 -20
  183. package/Charting/Visuals/licenseManager2dState.d.ts +4 -0
  184. package/Charting/Visuals/licenseManager2dState.js +12 -0
  185. package/Charting/Visuals/loader.js +2 -0
  186. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  187. package/Charting/Visuals/sciChartInitCommon.js +22 -12
  188. package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +7 -7
  189. package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +3 -3
  190. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  191. package/Charting3D/Visuals/SciChart3DSurface.js +3 -3
  192. package/Charting3D/Visuals/createMaster3d.d.ts +1 -1
  193. package/Charting3D/Visuals/createMaster3d.js +11 -6
  194. package/Charting3D/Visuals/createSingle3d.d.ts +1 -1
  195. package/Charting3D/Visuals/createSingle3d.js +2 -2
  196. package/Core/BuildStamp.d.ts +1 -1
  197. package/Core/BuildStamp.js +2 -2
  198. package/Core/NumberRange.d.ts +1 -0
  199. package/Core/NumberRange.js +8 -0
  200. package/Core/OneTimePerformanceWarning.d.ts +6 -0
  201. package/Core/OneTimePerformanceWarning.js +19 -0
  202. package/Core/storage/localStorageApi.d.ts +9 -0
  203. package/Core/storage/localStorageApi.js +32 -0
  204. package/README.md +223 -1
  205. package/_wasm/scichart.browser.js +1 -1
  206. package/_wasm/scichart2d.js +95 -95
  207. package/_wasm/scichart2d.wasm +0 -0
  208. package/_wasm/scichart3d.js +13 -13
  209. package/_wasm/scichart3d.wasm +0 -0
  210. package/constants/performanceWarnings.d.ts +5 -0
  211. package/constants/performanceWarnings.js +8 -0
  212. package/package.json +1 -1
  213. package/types/NumberArray.d.ts +1 -0
  214. package/types/NumberArray.js +5 -1
  215. package/types/SearchMode.d.ts +21 -0
  216. package/types/SearchMode.js +25 -0
  217. package/types/TSciChart.d.ts +144 -40
  218. package/types/TSciChart3D.d.ts +66 -28
  219. package/types/TStackedAxisLength.d.ts +4 -0
  220. package/types/TStackedAxisLength.js +4 -0
  221. package/utils/array.d.ts +7 -0
  222. package/utils/array.js +19 -1
  223. package/utils/calcAverage.d.ts +2 -2
  224. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +19 -0
  225. package/utils/ccall/appendDoubleVectorFromJsArray.js +91 -0
  226. package/utils/hash.d.ts +7 -0
  227. package/utils/hash.js +35 -0
  228. package/utils/tooltip.d.ts +42 -0
  229. package/utils/tooltip.js +119 -0
  230. package/utils/ccall/fillDoubleVectorFromJsArray.d.ts +0 -3
  231. package/utils/ccall/fillDoubleVectorFromJsArray.js +0 -33
  232. package/utils/performance.d.ts +0 -5
  233. package/utils/performance.js +0 -11
@@ -11,15 +11,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.SciChartRenderer = void 0;
13
13
  var Dictionary_1 = require("../../Core/Dictionary");
14
- var NumberRange_1 = require("../../Core/NumberRange");
15
14
  var Rect_1 = require("../../Core/Rect");
16
15
  var AutoRange_1 = require("../../types/AutoRange");
17
16
  var AxisAlignment_1 = require("../../types/AxisAlignment");
18
17
  var RenderLayer_1 = require("../../types/RenderLayer");
18
+ var hash_1 = require("../../utils/hash");
19
+ var ResamplingParams_1 = require("../Numerics/Resamplers/ResamplingParams");
19
20
  var IAnnotation_1 = require("../Visuals/Annotations/IAnnotation");
20
21
  var SciChartSurfaceBase_1 = require("../Visuals/SciChartSurfaceBase");
21
22
  var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
22
23
  var RenderPassData_1 = require("./RenderPassData");
24
+ var RenderPassInfo_1 = require("./RenderPassInfo");
23
25
  /**
24
26
  * A class used internally in SciChart to perform layout, arrangement, data-preparation and rendering on the Cartesian 2D {@link SciChartSurface}
25
27
  */
@@ -31,6 +33,66 @@ var SciChartRenderer = /** @class */ (function () {
31
33
  function SciChartRenderer(sciChartSurface) {
32
34
  this.sciChartSurface = sciChartSurface;
33
35
  }
36
+ /**
37
+ * Used internally
38
+ * @param xAxis
39
+ * @param rs
40
+ * @param seriesViewRect
41
+ */
42
+ SciChartRenderer.resampleSeries = function (xAxis, rs, seriesViewRect) {
43
+ /**
44
+ * Stacked series and Heatmap do not support resampling
45
+ * If a series does not support resampling, the pointSeries is not used in the drawing provider.
46
+ * For example, UniformHeatmapDrawingProvider does not use renderPassData.pointSeries,
47
+ * but LineSeriesDrawingProvider use renderPassData.pointSeries in the draw() method!
48
+ */
49
+ if (!rs.supportsResampling)
50
+ return {
51
+ pointSeries: rs.toPointSeries(),
52
+ renderableSeries: rs,
53
+ indicesRange: undefined,
54
+ resamplingHash: undefined
55
+ };
56
+ var rp = new ResamplingParams_1.ResamplingParams(seriesViewRect, rs, xAxis);
57
+ if (!rs.needsResampling(rp))
58
+ return {
59
+ pointSeries: rs.toPointSeries(),
60
+ renderableSeries: rs,
61
+ indicesRange: undefined,
62
+ resamplingHash: undefined
63
+ };
64
+ var resamplingHash = SciChartRenderer.calculateResamplingHash(rs, rp);
65
+ var prevRPD = rs.getCurrentRenderPassData();
66
+ var useFromCache = Boolean(prevRPD && prevRPD.resamplingHash === resamplingHash);
67
+ // console.log("resampling ...");
68
+ // console.log("useFromCache", useFromCache);
69
+ var pointSeries = useFromCache ? prevRPD.pointSeries : rs.toPointSeries(rp);
70
+ return {
71
+ pointSeries: pointSeries,
72
+ renderableSeries: rs,
73
+ indicesRange: rp.indexesRange,
74
+ resamplingHash: resamplingHash
75
+ };
76
+ };
77
+ SciChartRenderer.calculateResamplingHash = function (rs, rp) {
78
+ var hashes = [];
79
+ var enableDrawingOptimizationsHash = hash_1.hashUtils.generateBooleanHash(rs.enableDrawingOptimisations);
80
+ hashes.push(enableDrawingOptimizationsHash);
81
+ var dataSeries = rs.dataSeries;
82
+ if (dataSeries) {
83
+ var dataSeriesHash = hash_1.hashUtils.generateHash(dataSeries.id);
84
+ hashes.push(dataSeriesHash);
85
+ var dataSeriesCountHash = hash_1.hashUtils.generateNumberHash(dataSeries.count());
86
+ hashes.push(dataSeriesCountHash);
87
+ var dataSeriesSortedHash = hash_1.hashUtils.generateBooleanHash(dataSeries.dataDistributionCalculator.isSortedAscending);
88
+ hashes.push(dataSeriesSortedHash);
89
+ var dataSeriesChangeCountHash = hash_1.hashUtils.generateNumberHash(dataSeries.changeCount);
90
+ hashes.push(dataSeriesChangeCountHash);
91
+ }
92
+ var resamplingParamsHash = hash_1.hashUtils.generateObjectHash(rp);
93
+ hashes.push(resamplingParamsHash);
94
+ return hash_1.hashUtils.generateCombinedHash(hashes);
95
+ };
34
96
  /**
35
97
  * Render loop for the current {@SciChartSurface}
36
98
  * @param renderContext the {@WebGLRenderContext2D} used for drawing
@@ -61,7 +123,8 @@ var SciChartRenderer = /** @class */ (function () {
61
123
  var seriesViewRect = this.sciChartSurface.layoutManager.layoutChart(renderContext.viewportSize);
62
124
  this.updateSvgCanvasSize(seriesViewRect);
63
125
  // Step 4 prepare render data
64
- var xyAxesById = this.prepareRenderData();
126
+ var _a = this.prepareAxesRenderData(), xAxesById = _a.xAxesById, yAxesById = _a.yAxesById;
127
+ var renderPassInfo = this.prepareSeriesRenderData(seriesViewRect, xAxesById);
65
128
  // Draw seriesViewRect border
66
129
  this.sciChartSurface.drawBorder(renderContext);
67
130
  // Step 5 Draw X, Y axis and gridlines
@@ -81,22 +144,21 @@ var SciChartRenderer = /** @class */ (function () {
81
144
  el.type === IAnnotation_1.EAnnotationType.RenderContextAxisMarkerAnnotation);
82
145
  });
83
146
  renderContext.enqueueLayeredDraw(function () {
84
- _this.drawRenderContextAnnotations(renderContextAnnotations, xyAxesById[0], xyAxesById[1], IAnnotation_1.EAnnotationLayer.BelowChart, renderContext, seriesViewRect);
147
+ _this.drawRenderContextAnnotations(renderContextAnnotations, xAxesById, yAxesById, IAnnotation_1.EAnnotationLayer.BelowChart, renderContext, seriesViewRect);
85
148
  }, RenderLayer_1.ERenderLayer.Third);
86
- // queue series rendering after grid lines and bands, but before the axes
87
- renderContext.enqueueLayeredDraw(function () { return _this.drawSeries(_this.sciChartSurface, _this.sciChartSurface.renderableSeries.asArray(), renderContext); }, RenderLayer_1.ERenderLayer.Third);
149
+ // Step 7 Draw series. Queue series rendering after grid lines and bands, but before the axes
150
+ renderContext.enqueueLayeredDraw(function () { return _this.drawSeries(_this.sciChartSurface, renderPassInfo, renderContext); }, RenderLayer_1.ERenderLayer.Third);
88
151
  // Execute rendering of queued elements
89
152
  renderContext.drawLayers();
90
- // Step 7 Draw series
91
153
  // Step 8 Draw annotations above the series
92
- this.drawRenderContextAnnotations(renderContextAnnotations, xyAxesById[0], xyAxesById[1], IAnnotation_1.EAnnotationLayer.AboveChart, renderContext, seriesViewRect);
154
+ this.drawRenderContextAnnotations(renderContextAnnotations, xAxesById, yAxesById, IAnnotation_1.EAnnotationLayer.AboveChart, renderContext, seriesViewRect);
93
155
  // Step 9 Draw SVG or Html Overlays
94
156
  var svgAnnotations = annotations.filter(function (el) {
95
157
  return el.type === IAnnotation_1.EAnnotationType.SVG ||
96
158
  el.type === IAnnotation_1.EAnnotationType.SVGTextAnnotation ||
97
159
  el.type === IAnnotation_1.EAnnotationType.SVGCustomAnnotation;
98
160
  });
99
- this.drawSvgAnnotations(svgAnnotations, xyAxesById[0], xyAxesById[1]);
161
+ this.drawSvgAnnotations(svgAnnotations, xAxesById, yAxesById);
100
162
  // Update watermark
101
163
  this.updateWatermark(renderContext, seriesViewRect);
102
164
  // Step 10 Call OnParentSurfaceRendered
@@ -175,7 +237,7 @@ var SciChartRenderer = /** @class */ (function () {
175
237
  svgRootElement.currentScale = 1;
176
238
  }
177
239
  };
178
- SciChartRenderer.prototype.prepareRenderData = function () {
240
+ SciChartRenderer.prototype.prepareAxesRenderData = function () {
179
241
  var xAxesById = new Dictionary_1.Dictionary();
180
242
  var yAxesById = new Dictionary_1.Dictionary();
181
243
  // Prepare XAxes
@@ -188,7 +250,26 @@ var SciChartRenderer = /** @class */ (function () {
188
250
  yAxesById.add(yAxis.id, yAxis);
189
251
  yAxis.prepareRenderData();
190
252
  });
191
- return [xAxesById, yAxesById];
253
+ return { xAxesById: xAxesById, yAxesById: yAxesById };
254
+ };
255
+ SciChartRenderer.prototype.prepareSeriesRenderData = function (seriesViewRect, xAxesById) {
256
+ var seriesCount = this.sciChartSurface.renderableSeries.size();
257
+ var renderPassInfo = new RenderPassInfo_1.RenderPassInfo(seriesCount, seriesViewRect);
258
+ // TODO: Calculate XRange before resample but YRange after resample for faster autorange on large datasets
259
+ for (var i = 0; i < this.sciChartSurface.renderableSeries.size(); i++) {
260
+ var series = this.sciChartSurface.renderableSeries.get(i);
261
+ // don't try and draw series with no data
262
+ if (!series.isStacked && !series.dataSeries)
263
+ continue;
264
+ // TODO: Do resampling, store result for use in drawing
265
+ var xAxis = xAxesById.item(series.xAxisId);
266
+ var seriesRenderPassInfo = SciChartRenderer.resampleSeries(xAxis, series, seriesViewRect);
267
+ renderPassInfo.renderableSeriesArray.push(seriesRenderPassInfo.renderableSeries);
268
+ renderPassInfo.pointSeriesArray.push(seriesRenderPassInfo.pointSeries);
269
+ renderPassInfo.indicesRanges.push(seriesRenderPassInfo.indicesRange);
270
+ renderPassInfo.resamplingHashes.push(seriesRenderPassInfo.resamplingHash);
271
+ }
272
+ return renderPassInfo;
192
273
  };
193
274
  SciChartRenderer.prototype.drawAxes = function (scs, renderContext) {
194
275
  scs.xAxes.asArray().forEach(function (xAxis) {
@@ -198,31 +279,30 @@ var SciChartRenderer = /** @class */ (function () {
198
279
  yAxis.draw(renderContext);
199
280
  });
200
281
  };
201
- SciChartRenderer.prototype.drawSeries = function (scs, renderableSeries, renderContext) {
202
- var drawSeriesImpl = function (series) {
203
- var indexRange = new NumberRange_1.NumberRange(0, 0);
204
- var xAxis = scs.xAxes.asArray().find(function (a) { return a.id === series.xAxisId; });
205
- if (!xAxis) {
206
- throw Error("Cannot find an X Axis with ID = " + series.xAxisId);
207
- }
208
- var yAxis = scs.yAxes.asArray().find(function (a) { return a.id === series.yAxisId; });
209
- if (!yAxis) {
210
- throw Error("Cannot find a Y Axis with ID = " + series.yAxisId);
211
- }
212
- if (xAxis.isVerticalChart && ![AxisAlignment_1.EAxisAlignment.Top, AxisAlignment_1.EAxisAlignment.Bottom].includes(yAxis.axisAlignment)) {
282
+ SciChartRenderer.prototype.drawSeries = function (scs, renderPassInfo, renderContext) {
283
+ var renderableSeriesArray = renderPassInfo.renderableSeriesArray, pointSeriesArray = renderPassInfo.pointSeriesArray, resamplingHashes = renderPassInfo.resamplingHashes, indicesRanges = renderPassInfo.indicesRanges;
284
+ var drawSeriesImpl = function (index) {
285
+ var renderableSeries = renderableSeriesArray[index];
286
+ var pointSeries = pointSeriesArray[index];
287
+ var resamplingHash = resamplingHashes[index];
288
+ var indexRange = indicesRanges[index];
289
+ var xAxis = scs.xAxes.asArray().find(function (a) { return a.id === renderableSeries.xAxisId; });
290
+ if (!xAxis)
291
+ throw Error("Cannot find an X Axis with ID = " + renderableSeries.xAxisId);
292
+ var yAxis = scs.yAxes.asArray().find(function (a) { return a.id === renderableSeries.yAxisId; });
293
+ if (!yAxis)
294
+ throw Error("Cannot find a Y Axis with ID = " + renderableSeries.yAxisId);
295
+ if (xAxis.isVerticalChart && ![AxisAlignment_1.EAxisAlignment.Top, AxisAlignment_1.EAxisAlignment.Bottom].includes(yAxis.axisAlignment))
213
296
  throw Error("For vertical chart (chart with X Axis alignment Left or Right) Y Axis alignment should be Top or Bottom, X Axis ID = ".concat(xAxis.id));
214
- }
215
- if ((0, AxisAlignment_1.getIsVertical)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsVertical)(yAxis.axisAlignment)) {
297
+ if ((0, AxisAlignment_1.getIsVertical)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsVertical)(yAxis.axisAlignment))
216
298
  throw Error("Both x and y axes can't have vertical alignment");
217
- }
218
- if ((0, AxisAlignment_1.getIsHorizontal)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsHorizontal)(yAxis.axisAlignment)) {
299
+ if ((0, AxisAlignment_1.getIsHorizontal)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsHorizontal)(yAxis.axisAlignment))
219
300
  throw Error("Both x and y axes can't have horizontal alignment");
220
- }
221
301
  var xCalc = xAxis.getCurrentCoordinateCalculator();
222
302
  var yCalc = yAxis.getCurrentCoordinateCalculator();
223
303
  try {
224
- var renderPassData = new RenderPassData_1.RenderPassData(indexRange, xCalc, yCalc, xAxis.isVerticalChart);
225
- series.draw(renderContext, renderPassData);
304
+ var renderPassData = new RenderPassData_1.RenderPassData(indexRange, xCalc, yCalc, xAxis.isVerticalChart, pointSeries, resamplingHash);
305
+ renderableSeries.draw(renderContext, renderPassData);
226
306
  }
227
307
  finally {
228
308
  // We can not delete calculators because we use them in Hit Test
@@ -230,10 +310,24 @@ var SciChartRenderer = /** @class */ (function () {
230
310
  // yCalc.delete();
231
311
  }
232
312
  };
313
+ var nativeContext = renderContext.getNativeContext();
314
+ var viewRect = this.sciChartSurface.seriesViewRect;
315
+ nativeContext.PushMatrix();
316
+ nativeContext.PushState();
317
+ nativeContext.Translate(viewRect.x, viewRect.y);
318
+ nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
233
319
  // Draw unselected series first
234
- renderableSeries.filter(function (rs) { return rs.isVisible && !rs.isSelected; }).forEach(drawSeriesImpl);
320
+ renderableSeriesArray.forEach(function (rs, index) {
321
+ if (rs.isVisible && !rs.isSelected)
322
+ drawSeriesImpl(index);
323
+ });
235
324
  // Draw selected series at higher z-index
236
- renderableSeries.filter(function (rs) { return rs.isVisible && rs.isSelected; }).forEach(drawSeriesImpl);
325
+ renderableSeriesArray.forEach(function (rs, index) {
326
+ if (rs.isVisible && rs.isSelected)
327
+ drawSeriesImpl(index);
328
+ });
329
+ nativeContext.PopMatrix();
330
+ nativeContext.PopState();
237
331
  };
238
332
  SciChartRenderer.prototype.drawDebugAxes = function (scs, renderContext) {
239
333
  scs.xAxes.asArray().forEach(function (xAxis) {
@@ -227,7 +227,7 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
227
227
  private opacityProperty;
228
228
  private annotationLayerProperty;
229
229
  private isEditableProperty;
230
- private isHiddenProperty;
230
+ protected isHiddenProperty: boolean;
231
231
  private parentSurfaceProperty;
232
232
  private x1Property;
233
233
  private x2Property;
@@ -26,7 +26,7 @@ var RolloverMarkerSvgAnnotation = /** @class */ (function (_super) {
26
26
  /** @inheritDoc */
27
27
  _this.type = IAnnotation_1.EAnnotationType.SVG;
28
28
  _this.tooltipProps = renderableSeriesProps;
29
- _this.isHidden = true;
29
+ _this.isHiddenProperty = true;
30
30
  _this.x1 = 0;
31
31
  _this.y1 = 0;
32
32
  _this.xCoordShift = -4;
@@ -38,6 +38,11 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
38
38
  var _this = _super.call(this, options) || this;
39
39
  /** @inheritDoc */
40
40
  _this.isSvgAnnotation = true;
41
+ /**
42
+ * The {@link SVGElement} which will be added to the chart
43
+ */
44
+ _this.xCoordShiftProperty = 0;
45
+ _this.yCoordShiftProperty = 0;
41
46
  _this.verticalAnchorPointProperty = AnchorPoint_1.EVerticalAnchorPoint.Top;
42
47
  _this.horizontalAnchorPointProperty = AnchorPoint_1.EHorizontalAnchorPoint.Left;
43
48
  _this.prevX1Coordinate = 0;
@@ -292,8 +297,8 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
292
297
  SvgAnnotationBase.prototype.calcAndSetAnnotationBorders = function (xCalc, yCalc) {
293
298
  if (!this.svg)
294
299
  return;
295
- var borderX1 = this.getX1Coordinate(xCalc, yCalc);
296
- var borderY1 = this.getY1Coordinate(xCalc, yCalc);
300
+ var borderX1 = this.getX1Coordinate(xCalc, yCalc) + this.xCoordShift;
301
+ var borderY1 = this.getY1Coordinate(xCalc, yCalc) + this.yCoordShift;
297
302
  this.svgDOMRect = this.svg.getBoundingClientRect();
298
303
  var borderX2 = borderX1 + this.svgDOMRect.width;
299
304
  var borderY2 = borderY1 + this.svgDOMRect.height;
@@ -7,6 +7,7 @@ import { EAxisAlignment } from "../../../types/AxisAlignment";
7
7
  import { EAxisType } from "../../../types/AxisType";
8
8
  import { TBorder } from "../../../types/TBorder";
9
9
  import { SCRTPen, SCRTSolidBrush, TSciChart } from "../../../types/TSciChart";
10
+ import { TStackedAxisLength } from "../../../types/TStackedAxisLength";
10
11
  import { WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
11
12
  import { IThemeable } from "../../Themes/IThemeable";
12
13
  import { IThemeProvider } from "../../Themes/IThemeProvider";
@@ -112,6 +113,13 @@ export interface IAxisBase2dOptions extends IAxisCoreOptions {
112
113
  * @remarks Center axis uses inner layout strategy
113
114
  */
114
115
  isInnerAxis?: boolean;
116
+ /** Gets or sets the length of a stacked axis as an absolute number or percentage, e.g. 100, or "30%".
117
+ * A plain number will be interpreted as a number of pixels.
118
+ * A number with % will take that percentage of the total length.
119
+ * Stacked axes without a defined length will have the remaining unreserved spaced split between them.
120
+ * @remarks The axis length doesn't include border sizes
121
+ */
122
+ stackedAxisLength?: TStackedAxisLength;
115
123
  /**
116
124
  * Sets a {@link LabelProvider} - a class which is responsible for formatting axis labels and cursor labels from numeric values
117
125
  */
@@ -230,6 +238,20 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
230
238
  * This is only used to allow multiple primary axes, so that all stacked axes can draw gridlines
231
239
  */
232
240
  set isStackedAxis(value: boolean);
241
+ /** Gets or sets the length of a stacked axis as an absolute number or percentage, e.g. 100, or "30%".
242
+ * A plain number will be interpreted as a number of pixels.
243
+ * A number with % will take that percentage of the total length.
244
+ * Stacked axes without a defined length will have the remaining unreserved spaced split between them.
245
+ * @remarks The axis length doesn't include border sizes
246
+ */
247
+ get stackedAxisLength(): TStackedAxisLength;
248
+ /** Gets or sets the length of a stacked axis as an absolute number or percentage, e.g. 100, or "30%".
249
+ * A plain number will be interpreted as a number of pixels.
250
+ * A number with % will take that percentage of the total length.
251
+ * Stacked axes without a defined length will have the remaining unreserved spaced split between them.
252
+ * @remarks The axis length doesn't include border sizes
253
+ */
254
+ set stackedAxisLength(value: TStackedAxisLength);
233
255
  /**
234
256
  * Called internally - Gets or sets the length the current Axis. E.g. width of horizontal axis or height of vertical axis.
235
257
  */
@@ -308,6 +330,7 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
308
330
  private zoomExtentsRangeProperty;
309
331
  private isPrimaryAxisProperty;
310
332
  private isStackedAxisProperty;
333
+ private stackedAxisLengthProperty;
311
334
  private penCacheForMajorGridLines;
312
335
  private penCacheForMinorGridLines;
313
336
  private penCacheForMajorTickLines;
@@ -100,7 +100,7 @@ var AxisBase2D = /** @class */ (function (_super) {
100
100
  * @param options Optional parameters of type {@link IAxisBase2dOptions} used to configure the axis at instantiation time
101
101
  */
102
102
  function AxisBase2D(webAssemblyContext, options) {
103
- var _a, _b, _c, _d, _e, _f, _g;
103
+ var _a, _b, _c, _d, _e, _f, _g, _h;
104
104
  var _this = _super.call(this, options) || this;
105
105
  /**
106
106
  * Gets the {@link AxisLayoutState} class which manages layout
@@ -149,6 +149,7 @@ var AxisBase2D = /** @class */ (function (_super) {
149
149
  _this.labelStyle = __assign(__assign({}, _this.labelStyle), options === null || options === void 0 ? void 0 : options.labelStyle);
150
150
  _this.axisBorder = __assign(__assign({}, _this.axisBorder), options === null || options === void 0 ? void 0 : options.axisBorder);
151
151
  _this.isInnerAxis = (_g = options === null || options === void 0 ? void 0 : options.isInnerAxis) !== null && _g !== void 0 ? _g : _this.isInnerAxis;
152
+ _this.stackedAxisLength = (_h = options === null || options === void 0 ? void 0 : options.stackedAxisLength) !== null && _h !== void 0 ? _h : _this.stackedAxisLength;
152
153
  _this.solidBrushCacheBorder = new SolidBrushCache_1.SolidBrushCache(webAssemblyContext);
153
154
  if (options === null || options === void 0 ? void 0 : options.labelProvider) {
154
155
  if (!("getLabels" in (options === null || options === void 0 ? void 0 : options.labelProvider))) {
@@ -232,8 +233,10 @@ var AxisBase2D = /** @class */ (function (_super) {
232
233
  * SciChart also supports XAxis on the left and YAxis on the top to rotate / create vertical charts.
233
234
  */
234
235
  set: function (axisAlignment) {
235
- this.axisAlignmentProperty = axisAlignment;
236
- this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_ALIGNMENT);
236
+ if (this.axisAlignmentProperty !== axisAlignment) {
237
+ this.axisAlignmentProperty = axisAlignment;
238
+ this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_ALIGNMENT);
239
+ }
237
240
  },
238
241
  enumerable: false,
239
242
  configurable: true
@@ -249,8 +252,10 @@ var AxisBase2D = /** @class */ (function (_super) {
249
252
  * Gets or sets a property which limits {@link AxisCore.visibleRange}, meaning the chart cannot autorange outside that range
250
253
  */
251
254
  set: function (visibleRangeLimit) {
252
- this.visibleRangeLimitProperty = visibleRangeLimit;
253
- this.notifyPropertyChanged(constants_1.PROPERTY.VISIBLE_RANGE_LIMIT);
255
+ if (!NumberRange_1.NumberRange.areEqual(this.visibleRangeLimitProperty, visibleRangeLimit)) {
256
+ this.visibleRangeLimitProperty = visibleRangeLimit;
257
+ this.notifyPropertyChanged(constants_1.PROPERTY.VISIBLE_RANGE_LIMIT);
258
+ }
254
259
  },
255
260
  enumerable: false,
256
261
  configurable: true
@@ -266,8 +271,10 @@ var AxisBase2D = /** @class */ (function (_super) {
266
271
  * Gets or sets a property which, if it is set, will be used as the range when zooming extents, rather than the data max range
267
272
  */
268
273
  set: function (zoomExtentsRange) {
269
- this.zoomExtentsRangeProperty = zoomExtentsRange;
270
- this.notifyPropertyChanged(constants_1.PROPERTY.ZOOMEXTENTS_RANGE);
274
+ if (!NumberRange_1.NumberRange.areEqual(this.zoomExtentsRangeProperty, zoomExtentsRange)) {
275
+ this.zoomExtentsRangeProperty = zoomExtentsRange;
276
+ this.notifyPropertyChanged(constants_1.PROPERTY.ZOOMEXTENTS_RANGE);
277
+ }
271
278
  },
272
279
  enumerable: false,
273
280
  configurable: true
@@ -285,8 +292,10 @@ var AxisBase2D = /** @class */ (function (_super) {
285
292
  * @remarks Center axis uses inner layout strategy
286
293
  */
287
294
  set: function (value) {
288
- this.isInnerAxisProperty = value;
289
- this.notifyPropertyChanged(constants_1.PROPERTY.IS_INNER_AXIS);
295
+ if (this.isInnerAxisProperty !== value) {
296
+ this.isInnerAxisProperty = value;
297
+ this.notifyPropertyChanged(constants_1.PROPERTY.IS_INNER_AXIS);
298
+ }
290
299
  },
291
300
  enumerable: false,
292
301
  configurable: true
@@ -307,15 +316,17 @@ var AxisBase2D = /** @class */ (function (_super) {
307
316
  */
308
317
  set: function (value) {
309
318
  var _this = this;
310
- this.isPrimaryAxisProperty = value;
311
- this.notifyPropertyChanged(constants_1.PROPERTY.IS_PRIMARY_AXIS);
312
- if (value && !this.isStackedAxis) {
313
- var axes = this.isXAxis ? this.parentSurface.xAxes : this.parentSurface.yAxes;
314
- axes.asArray().forEach(function (a) {
315
- if (a !== _this && !a.isStackedAxis) {
316
- a.isPrimaryAxis = false;
317
- }
318
- });
319
+ if (this.isPrimaryAxisProperty !== value) {
320
+ this.isPrimaryAxisProperty = value;
321
+ this.notifyPropertyChanged(constants_1.PROPERTY.IS_PRIMARY_AXIS);
322
+ if (value && !this.isStackedAxis) {
323
+ var axes = this.isXAxis ? this.parentSurface.xAxes : this.parentSurface.yAxes;
324
+ axes.asArray().forEach(function (a) {
325
+ if (a !== _this && !a.isStackedAxis) {
326
+ a.isPrimaryAxis = false;
327
+ }
328
+ });
329
+ }
319
330
  }
320
331
  },
321
332
  enumerable: false,
@@ -337,6 +348,31 @@ var AxisBase2D = /** @class */ (function (_super) {
337
348
  enumerable: false,
338
349
  configurable: true
339
350
  });
351
+ Object.defineProperty(AxisBase2D.prototype, "stackedAxisLength", {
352
+ /** Gets or sets the length of a stacked axis as an absolute number or percentage, e.g. 100, or "30%".
353
+ * A plain number will be interpreted as a number of pixels.
354
+ * A number with % will take that percentage of the total length.
355
+ * Stacked axes without a defined length will have the remaining unreserved spaced split between them.
356
+ * @remarks The axis length doesn't include border sizes
357
+ */
358
+ get: function () {
359
+ return this.stackedAxisLengthProperty;
360
+ },
361
+ /** Gets or sets the length of a stacked axis as an absolute number or percentage, e.g. 100, or "30%".
362
+ * A plain number will be interpreted as a number of pixels.
363
+ * A number with % will take that percentage of the total length.
364
+ * Stacked axes without a defined length will have the remaining unreserved spaced split between them.
365
+ * @remarks The axis length doesn't include border sizes
366
+ */
367
+ set: function (value) {
368
+ if (this.stackedAxisLengthProperty !== value) {
369
+ this.stackedAxisLengthProperty = value;
370
+ this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_LENGTH);
371
+ }
372
+ },
373
+ enumerable: false,
374
+ configurable: true
375
+ });
340
376
  Object.defineProperty(AxisBase2D.prototype, "axisLength", {
341
377
  /**
342
378
  * Called internally - Gets or sets the length the current Axis. E.g. width of horizontal axis or height of vertical axis.
@@ -351,8 +387,10 @@ var AxisBase2D = /** @class */ (function (_super) {
351
387
  return (_b = this.axisLengthProperty) !== null && _b !== void 0 ? _b : defaultAxisLength;
352
388
  },
353
389
  set: function (value) {
354
- this.axisLengthProperty = value;
355
- this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_LENGTH);
390
+ if (this.axisLengthProperty !== value) {
391
+ this.axisLengthProperty = value;
392
+ this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_LENGTH);
393
+ }
356
394
  },
357
395
  enumerable: false,
358
396
  configurable: true
@@ -369,8 +407,10 @@ var AxisBase2D = /** @class */ (function (_super) {
369
407
  * Gets or sets the offset of the axis position
370
408
  */
371
409
  set: function (value) {
372
- this.offsetProperty = value;
373
- this.notifyPropertyChanged(constants_1.PROPERTY.OFFSET);
410
+ if (this.offsetProperty !== value) {
411
+ this.offsetProperty = value;
412
+ this.notifyPropertyChanged(constants_1.PROPERTY.OFFSET);
413
+ }
374
414
  },
375
415
  enumerable: false,
376
416
  configurable: true
@@ -676,8 +716,15 @@ var AxisBase2D = /** @class */ (function (_super) {
676
716
  }
677
717
  var translatedRange = this.getCurrentCoordinateCalculator().translateBy(pixelsToScroll, startVisibleRange);
678
718
  if (this.visibleRangeLimit) {
679
- if (translatedRange.min < this.visibleRangeLimit.min || translatedRange.max > this.visibleRangeLimit.max) {
680
- return false;
719
+ var limitDelta = 0;
720
+ if (translatedRange.min < this.visibleRangeLimit.min) {
721
+ limitDelta = this.visibleRangeLimit.min - translatedRange.min;
722
+ }
723
+ else if (this.visibleRangeLimit.max < translatedRange.max) {
724
+ limitDelta = this.visibleRangeLimit.max - translatedRange.max;
725
+ }
726
+ if (limitDelta) {
727
+ translatedRange = new NumberRange_1.NumberRange(translatedRange.min + limitDelta, translatedRange.max + limitDelta);
681
728
  }
682
729
  }
683
730
  this.visibleRange = translatedRange;
@@ -275,6 +275,7 @@ export declare abstract class AxisCore implements IAxisParams, IDeletable {
275
275
  protected maxAutoTicksProperty: number;
276
276
  protected visibleRangeAnimationToken: IGenericAnimation;
277
277
  protected readonly defaultVisibleRange: NumberRange;
278
+ protected allowFastMathProperty: boolean;
278
279
  /**
279
280
  * Creates an instance of an {@link AxisCore}
280
281
  * @param options Optional parameters of type {@link IAxisCoreOptions} used to define properties at instantiation time
@@ -290,6 +291,16 @@ export declare abstract class AxisCore implements IAxisParams, IDeletable {
290
291
  * See {@link AxisBase2D.axisAlignment} if you want to set a 2D Axis alignment to the left, right, top or bottom
291
292
  */
292
293
  get isXAxis(): boolean;
294
+ /**
295
+ * When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
296
+ * edge-cases where every CPU cycle counts.
297
+ */
298
+ get allowFastMath(): boolean;
299
+ /**
300
+ * When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
301
+ * edge-cases where every CPU cycle counts.
302
+ */
303
+ set allowFastMath(allowFastMath: boolean);
293
304
  /**
294
305
  * When true, the axis has a valid {@link AxisCore.visibleRange} which can be drawn
295
306
  * @remarks
@@ -44,7 +44,7 @@ var AxisCore = /** @class */ (function () {
44
44
  * @param options Optional parameters of type {@link IAxisCoreOptions} used to define properties at instantiation time
45
45
  */
46
46
  function AxisCore(options) {
47
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
47
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
48
48
  /**
49
49
  * An {@link EventHandler} which fires a callback when the {@link AxisCore.visibleRange} property changes.
50
50
  * @desc
@@ -161,6 +161,7 @@ var AxisCore = /** @class */ (function () {
161
161
  */
162
162
  this.maxAutoTicksProperty = 10;
163
163
  this.defaultVisibleRange = new NumberRange_1.NumberRange(0, 10);
164
+ this.allowFastMathProperty = false;
164
165
  this.visibleRange = (options === null || options === void 0 ? void 0 : options.visibleRange) || this.defaultVisibleRange;
165
166
  this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : this.id;
166
167
  this.growBy = (_b = options === null || options === void 0 ? void 0 : options.growBy) !== null && _b !== void 0 ? _b : this.growBy;
@@ -168,23 +169,24 @@ var AxisCore = /** @class */ (function () {
168
169
  this.isVisible = (_d = options === null || options === void 0 ? void 0 : options.isVisible) !== null && _d !== void 0 ? _d : this.isVisible;
169
170
  this.axisTitle = (_e = options === null || options === void 0 ? void 0 : options.axisTitle) !== null && _e !== void 0 ? _e : this.axisTitle;
170
171
  this.axisTitleStyle = (_f = options === null || options === void 0 ? void 0 : options.axisTitleStyle) !== null && _f !== void 0 ? _f : this.axisTitleStyle;
171
- this.autoTicksProperty = (_g = options === null || options === void 0 ? void 0 : options.autoTicks) !== null && _g !== void 0 ? _g : this.autoTicksProperty;
172
- this.maxAutoTicksProperty = (_h = options === null || options === void 0 ? void 0 : options.maxAutoTicks) !== null && _h !== void 0 ? _h : this.maxAutoTicksProperty;
173
- this.minorsPerMajorProperty = (_j = options === null || options === void 0 ? void 0 : options.minorsPerMajor) !== null && _j !== void 0 ? _j : this.minorsPerMajorProperty;
174
- this.majorDeltaProperty = (_k = options === null || options === void 0 ? void 0 : options.majorDelta) !== null && _k !== void 0 ? _k : this.majorDeltaProperty;
175
- this.minorDeltaProperty = (_l = options === null || options === void 0 ? void 0 : options.minorDelta) !== null && _l !== void 0 ? _l : this.minorDeltaProperty;
176
- this.drawLabelsProperty = (_m = options === null || options === void 0 ? void 0 : options.drawLabels) !== null && _m !== void 0 ? _m : this.drawLabelsProperty;
177
- this.drawMajorTickLinesProperty = (_o = options === null || options === void 0 ? void 0 : options.drawMajorTickLines) !== null && _o !== void 0 ? _o : this.drawMajorTickLinesProperty;
178
- this.drawMinorTickLinesProperty = (_p = options === null || options === void 0 ? void 0 : options.drawMinorTickLines) !== null && _p !== void 0 ? _p : this.drawMinorTickLinesProperty;
179
- this.drawMinorGridLinesProperty = (_q = options === null || options === void 0 ? void 0 : options.drawMinorGridLines) !== null && _q !== void 0 ? _q : this.drawMinorGridLinesProperty;
180
- this.drawMajorGridLinesProperty = (_r = options === null || options === void 0 ? void 0 : options.drawMajorGridLines) !== null && _r !== void 0 ? _r : this.drawMajorGridLinesProperty;
181
- this.majorGridLineStyleProperty = (_s = options === null || options === void 0 ? void 0 : options.majorGridLineStyle) !== null && _s !== void 0 ? _s : this.majorGridLineStyleProperty;
182
- this.minorGridLineStyleProperty = (_t = options === null || options === void 0 ? void 0 : options.minorGridLineStyle) !== null && _t !== void 0 ? _t : this.minorGridLineStyleProperty;
183
- this.majorTickLineStyleProperty = (_u = options === null || options === void 0 ? void 0 : options.majorTickLineStyle) !== null && _u !== void 0 ? _u : this.majorTickLineStyleProperty;
184
- this.minorTickLineStyleProperty = (_v = options === null || options === void 0 ? void 0 : options.minorTickLineStyle) !== null && _v !== void 0 ? _v : this.minorTickLineStyleProperty;
185
- this.drawMajorBandsProperty = (_w = options === null || options === void 0 ? void 0 : options.drawMajorBands) !== null && _w !== void 0 ? _w : this.drawMajorBandsProperty;
186
- this.axisBandsFillProperty = (_x = options === null || options === void 0 ? void 0 : options.axisBandsFill) !== null && _x !== void 0 ? _x : this.axisBandsFillProperty;
187
- this.flippedCoordinatesProperty = (_y = options === null || options === void 0 ? void 0 : options.flippedCoordinates) !== null && _y !== void 0 ? _y : this.flippedCoordinatesProperty;
172
+ this.allowFastMath = (_g = options === null || options === void 0 ? void 0 : options.allowFastMath) !== null && _g !== void 0 ? _g : this.allowFastMathProperty;
173
+ this.autoTicksProperty = (_h = options === null || options === void 0 ? void 0 : options.autoTicks) !== null && _h !== void 0 ? _h : this.autoTicksProperty;
174
+ this.maxAutoTicksProperty = (_j = options === null || options === void 0 ? void 0 : options.maxAutoTicks) !== null && _j !== void 0 ? _j : this.maxAutoTicksProperty;
175
+ this.minorsPerMajorProperty = (_k = options === null || options === void 0 ? void 0 : options.minorsPerMajor) !== null && _k !== void 0 ? _k : this.minorsPerMajorProperty;
176
+ this.majorDeltaProperty = (_l = options === null || options === void 0 ? void 0 : options.majorDelta) !== null && _l !== void 0 ? _l : this.majorDeltaProperty;
177
+ this.minorDeltaProperty = (_m = options === null || options === void 0 ? void 0 : options.minorDelta) !== null && _m !== void 0 ? _m : this.minorDeltaProperty;
178
+ this.drawLabelsProperty = (_o = options === null || options === void 0 ? void 0 : options.drawLabels) !== null && _o !== void 0 ? _o : this.drawLabelsProperty;
179
+ this.drawMajorTickLinesProperty = (_p = options === null || options === void 0 ? void 0 : options.drawMajorTickLines) !== null && _p !== void 0 ? _p : this.drawMajorTickLinesProperty;
180
+ this.drawMinorTickLinesProperty = (_q = options === null || options === void 0 ? void 0 : options.drawMinorTickLines) !== null && _q !== void 0 ? _q : this.drawMinorTickLinesProperty;
181
+ this.drawMinorGridLinesProperty = (_r = options === null || options === void 0 ? void 0 : options.drawMinorGridLines) !== null && _r !== void 0 ? _r : this.drawMinorGridLinesProperty;
182
+ this.drawMajorGridLinesProperty = (_s = options === null || options === void 0 ? void 0 : options.drawMajorGridLines) !== null && _s !== void 0 ? _s : this.drawMajorGridLinesProperty;
183
+ this.majorGridLineStyleProperty = (_t = options === null || options === void 0 ? void 0 : options.majorGridLineStyle) !== null && _t !== void 0 ? _t : this.majorGridLineStyleProperty;
184
+ this.minorGridLineStyleProperty = (_u = options === null || options === void 0 ? void 0 : options.minorGridLineStyle) !== null && _u !== void 0 ? _u : this.minorGridLineStyleProperty;
185
+ this.majorTickLineStyleProperty = (_v = options === null || options === void 0 ? void 0 : options.majorTickLineStyle) !== null && _v !== void 0 ? _v : this.majorTickLineStyleProperty;
186
+ this.minorTickLineStyleProperty = (_w = options === null || options === void 0 ? void 0 : options.minorTickLineStyle) !== null && _w !== void 0 ? _w : this.minorTickLineStyleProperty;
187
+ this.drawMajorBandsProperty = (_x = options === null || options === void 0 ? void 0 : options.drawMajorBands) !== null && _x !== void 0 ? _x : this.drawMajorBandsProperty;
188
+ this.axisBandsFillProperty = (_y = options === null || options === void 0 ? void 0 : options.axisBandsFill) !== null && _y !== void 0 ? _y : this.axisBandsFillProperty;
189
+ this.flippedCoordinatesProperty = (_z = options === null || options === void 0 ? void 0 : options.flippedCoordinates) !== null && _z !== void 0 ? _z : this.flippedCoordinatesProperty;
188
190
  }
189
191
  Object.defineProperty(AxisCore.prototype, "isCategoryAxis", {
190
192
  /**
@@ -208,6 +210,25 @@ var AxisCore = /** @class */ (function () {
208
210
  enumerable: false,
209
211
  configurable: true
210
212
  });
213
+ Object.defineProperty(AxisCore.prototype, "allowFastMath", {
214
+ /**
215
+ * When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
216
+ * edge-cases where every CPU cycle counts.
217
+ */
218
+ get: function () {
219
+ return this.allowFastMathProperty;
220
+ },
221
+ /**
222
+ * When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
223
+ * edge-cases where every CPU cycle counts.
224
+ */
225
+ set: function (allowFastMath) {
226
+ this.allowFastMathProperty = allowFastMath;
227
+ this.notifyPropertyChanged(constants_1.PROPERTY.ALLOW_FAST_MATH);
228
+ },
229
+ enumerable: false,
230
+ configurable: true
231
+ });
211
232
  /**
212
233
  * When true, the axis has a valid {@link AxisCore.visibleRange} which can be drawn
213
234
  * @remarks
@@ -25,6 +25,7 @@ export declare class AxisRenderer implements IDeletable {
25
25
  private measureTextCanvas;
26
26
  private keepLabelsWithinAxisProperty;
27
27
  private hideOverlappingLabelsProperty;
28
+ private vertices;
28
29
  /**
29
30
  * Creates an instance of a {@link AxisRenderer}
30
31
  * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and