scichart 2.0.2194 → 2.1.0-beta.40

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 (223) hide show
  1. package/Charting/ChartModifiers/CursorModifier.d.ts +9 -0
  2. package/Charting/ChartModifiers/CursorModifier.js +10 -0
  3. package/Charting/ChartModifiers/DataPointSelectionModifier.js +0 -1
  4. package/Charting/ChartModifiers/RolloverModifier.d.ts +25 -0
  5. package/Charting/ChartModifiers/RolloverModifier.js +8 -0
  6. package/Charting/Drawing/BrushCache.d.ts +8 -2
  7. package/Charting/Drawing/BrushCache.js +16 -8
  8. package/Charting/Drawing/WebGlRenderContext2D.d.ts +1 -0
  9. package/Charting/Drawing/WebGlRenderContext2D.js +4 -1
  10. package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +2 -0
  11. package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +33 -0
  12. package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  13. package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +19 -2
  14. package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +18 -2
  15. package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  16. package/Charting/Model/BaseDataSeries.d.ts +42 -15
  17. package/Charting/Model/BaseDataSeries.js +77 -28
  18. package/Charting/Model/BaseHeatmapDataSeries.d.ts +31 -23
  19. package/Charting/Model/BaseHeatmapDataSeries.js +45 -18
  20. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.d.ts +23 -0
  21. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +122 -0
  22. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.d.ts +57 -0
  23. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.js +2 -0
  24. package/Charting/Model/Filters/OhlcFilterBase.d.ts +2 -2
  25. package/Charting/Model/Filters/XyFilterBase.d.ts +3 -3
  26. package/Charting/Model/Filters/XyMovingAverageFilter.js +1 -1
  27. package/Charting/Model/Filters/XyyFilterBase.d.ts +4 -4
  28. package/Charting/Model/Filters/XyzFilterBase.d.ts +4 -4
  29. package/Charting/Model/IDataSeries.d.ts +37 -5
  30. package/Charting/Model/OhlcDataSeries.d.ts +12 -11
  31. package/Charting/Model/OhlcDataSeries.js +47 -44
  32. package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +21 -0
  33. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +56 -0
  34. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +14 -0
  35. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +23 -0
  36. package/Charting/Model/PointSeries/IPointSeries.d.ts +31 -0
  37. package/Charting/Model/PointSeries/IPointSeries.js +2 -0
  38. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.d.ts +13 -0
  39. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +59 -0
  40. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.d.ts +11 -0
  41. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.js +32 -0
  42. package/Charting/Model/PointSeries/XyPointSeriesResampled.d.ts +7 -0
  43. package/Charting/Model/PointSeries/XyPointSeriesResampled.js +27 -0
  44. package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +6 -0
  45. package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +27 -0
  46. package/Charting/Model/PointSeries/XyyPointSeriesResampled.d.ts +10 -0
  47. package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +48 -0
  48. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +8 -0
  49. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +29 -0
  50. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.d.ts +8 -0
  51. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.js +29 -0
  52. package/Charting/Model/XyDataSeries.d.ts +3 -2
  53. package/Charting/Model/XyDataSeries.js +26 -26
  54. package/Charting/Model/XyyDataSeries.d.ts +5 -5
  55. package/Charting/Model/XyyDataSeries.js +30 -27
  56. package/Charting/Model/XyzDataSeries.d.ts +5 -5
  57. package/Charting/Model/XyzDataSeries.js +30 -27
  58. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +2 -2
  59. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +2 -2
  60. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.d.ts +2 -1
  61. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.js +6 -2
  62. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.d.ts +2 -1
  63. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.js +6 -2
  64. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +54 -0
  65. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +232 -0
  66. package/Charting/Numerics/Resamplers/ResamplingMode.d.ts +37 -0
  67. package/Charting/Numerics/Resamplers/ResamplingMode.js +41 -0
  68. package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +39 -0
  69. package/Charting/Numerics/Resamplers/ResamplingParams.js +52 -0
  70. package/Charting/Services/RenderPassData.d.ts +6 -1
  71. package/Charting/Services/RenderPassData.js +5 -1
  72. package/Charting/Services/RenderPassInfo.d.ts +18 -0
  73. package/Charting/Services/RenderPassInfo.js +14 -0
  74. package/Charting/Services/SciChartRenderer.d.ts +14 -1
  75. package/Charting/Services/SciChartRenderer.js +124 -31
  76. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +1 -1
  77. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +1 -0
  78. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +6 -0
  79. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +5 -0
  80. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +12 -1
  81. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +6 -8
  82. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +12 -9
  83. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +7 -2
  84. package/Charting/Visuals/Axis/AxisBase2D.d.ts +23 -0
  85. package/Charting/Visuals/Axis/AxisBase2D.js +71 -24
  86. package/Charting/Visuals/Axis/AxisCore.d.ts +11 -0
  87. package/Charting/Visuals/Axis/AxisCore.js +39 -18
  88. package/Charting/Visuals/Axis/AxisRenderer.d.ts +1 -0
  89. package/Charting/Visuals/Axis/AxisRenderer.js +37 -10
  90. package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +5 -0
  91. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -2
  92. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +9 -4
  93. package/Charting/Visuals/Axis/NumericAxis.js +2 -2
  94. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  95. package/Charting/Visuals/Axis/constants.js +1 -0
  96. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.d.ts +2 -2
  97. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +2 -2
  98. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +3 -3
  99. package/Charting/Visuals/RenderableSeries/Animations/SweepAnimation.d.ts +2 -2
  100. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +2 -2
  101. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +6 -6
  102. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +2 -2
  103. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +9 -2
  104. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +45 -1
  105. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -0
  106. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +1 -0
  107. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -0
  108. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -0
  109. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +12 -5
  110. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +59 -0
  111. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +40 -5
  112. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +116 -11
  113. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +36 -4
  114. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +51 -3
  115. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +38 -4
  116. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +54 -3
  117. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -1
  118. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +8 -14
  119. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +4 -3
  120. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +5 -11
  121. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +4 -11
  122. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +2 -1
  123. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +17 -21
  124. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +16 -15
  125. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +9 -15
  126. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +4 -3
  127. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +16 -21
  128. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +2 -9
  129. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +0 -7
  130. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +6 -2
  131. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +5 -0
  132. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -0
  133. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +1 -0
  134. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.d.ts +1 -0
  135. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +6 -0
  136. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -2
  137. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -1
  138. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +1 -1
  139. package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +2 -2
  140. package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -2
  141. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -1
  142. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +2 -2
  143. package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +1 -1
  144. package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +2 -2
  145. package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +2 -2
  146. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -6
  147. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +1 -1
  148. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +12 -1
  149. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +38 -2
  150. package/Charting/Visuals/RenderableSeries/ISpline.d.ts +3 -3
  151. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +4 -4
  152. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +5 -5
  153. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +3 -3
  154. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +3 -3
  155. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -3
  156. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +3 -3
  157. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +0 -6
  158. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +1 -1
  159. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +1 -7
  160. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  161. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +6 -0
  162. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +5 -0
  163. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +6 -0
  164. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -3
  165. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +6 -3
  166. package/Charting/Visuals/RenderableSeries/constants.d.ts +3 -0
  167. package/Charting/Visuals/RenderableSeries/constants.js +3 -0
  168. package/Charting/Visuals/SciChartDefaults.d.ts +9 -1
  169. package/Charting/Visuals/SciChartDefaults.js +9 -1
  170. package/Charting/Visuals/SciChartSurface.d.ts +4 -4
  171. package/Charting/Visuals/SciChartSurface.js +18 -11
  172. package/Charting/Visuals/SciChartSurfaceBase.d.ts +3 -2
  173. package/Charting/Visuals/SciChartSurfaceBase.js +4 -4
  174. package/Charting/Visuals/createMaster.d.ts +1 -1
  175. package/Charting/Visuals/createMaster.js +11 -6
  176. package/Charting/Visuals/createSingle.d.ts +1 -1
  177. package/Charting/Visuals/createSingle.js +2 -2
  178. package/Charting/Visuals/licenseManager2D.js +22 -21
  179. package/Charting/Visuals/licenseManager2dState.d.ts +4 -0
  180. package/Charting/Visuals/licenseManager2dState.js +12 -0
  181. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  182. package/Charting/Visuals/sciChartInitCommon.js +18 -12
  183. package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +7 -7
  184. package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +3 -3
  185. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  186. package/Charting3D/Visuals/SciChart3DSurface.js +3 -3
  187. package/Charting3D/Visuals/createMaster3d.d.ts +1 -1
  188. package/Charting3D/Visuals/createMaster3d.js +11 -6
  189. package/Charting3D/Visuals/createSingle3d.d.ts +1 -1
  190. package/Charting3D/Visuals/createSingle3d.js +2 -2
  191. package/Core/BuildStamp.d.ts +1 -1
  192. package/Core/BuildStamp.js +2 -2
  193. package/Core/NumberRange.d.ts +1 -0
  194. package/Core/NumberRange.js +8 -0
  195. package/Core/OneTimePerformanceWarning.d.ts +6 -0
  196. package/Core/OneTimePerformanceWarning.js +19 -0
  197. package/Core/storage/localStorageApi.d.ts +9 -0
  198. package/Core/storage/localStorageApi.js +32 -0
  199. package/_wasm/scichart.browser.js +1 -1
  200. package/_wasm/scichart2d.js +12 -12
  201. package/_wasm/scichart2d.wasm +0 -0
  202. package/_wasm/scichart3d.js +96 -96
  203. package/_wasm/scichart3d.wasm +0 -0
  204. package/constants/performanceWarnings.d.ts +5 -0
  205. package/constants/performanceWarnings.js +8 -0
  206. package/package.json +1 -1
  207. package/types/NumberArray.d.ts +1 -0
  208. package/types/NumberArray.js +5 -1
  209. package/types/SearchMode.d.ts +21 -0
  210. package/types/SearchMode.js +25 -0
  211. package/types/TSciChart.d.ts +143 -40
  212. package/types/TSciChart3D.d.ts +66 -28
  213. package/types/TStackedAxisLength.d.ts +4 -0
  214. package/types/TStackedAxisLength.js +4 -0
  215. package/utils/array.d.ts +7 -0
  216. package/utils/array.js +19 -1
  217. package/utils/calcAverage.d.ts +2 -2
  218. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +19 -0
  219. package/utils/ccall/appendDoubleVectorFromJsArray.js +91 -0
  220. package/utils/hash.d.ts +7 -0
  221. package/utils/hash.js +35 -0
  222. package/utils/ccall/fillDoubleVectorFromJsArray.d.ts +0 -3
  223. package/utils/ccall/fillDoubleVectorFromJsArray.js +0 -33
@@ -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
@@ -45,6 +45,7 @@ var AxisRenderer = /** @class */ (function () {
45
45
  this.hideOverlappingLabelsProperty = true;
46
46
  this.webAssemblyContext = webAssemblyContext;
47
47
  this.textureManager = new TextureManager_1.TextureManager(webAssemblyContext);
48
+ this.vertices = new webAssemblyContext.VectorColorVertex();
48
49
  if (!app_1.IS_TEST_ENV) {
49
50
  this.measureTextCanvas = document.createElement("canvas");
50
51
  this.measureTextCanvas.width = 1;
@@ -55,6 +56,7 @@ var AxisRenderer = /** @class */ (function () {
55
56
  AxisRenderer.prototype.delete = function () {
56
57
  this.measureTextCanvas = undefined;
57
58
  this.textureManager = (0, Deleter_1.deleteSafe)(this.textureManager);
59
+ this.vertices = (0, Deleter_1.deleteSafe)(this.vertices);
58
60
  };
59
61
  /**
60
62
  * Called when the {@link AxisRenderer} is attached to an {@link AxisBase2D | Axis}
@@ -311,7 +313,6 @@ var AxisRenderer = /** @class */ (function () {
311
313
  return;
312
314
  var viewRect = this.viewRect;
313
315
  var tickSize = tickStyle.tickSize;
314
- var vertices = new this.webAssemblyContext.VectorColorVertex();
315
316
  var isHorizontal = (0, AxisAlignment_1.getIsHorizontal)(axisAlignment);
316
317
  if (isHorizontal === undefined) {
317
318
  return;
@@ -347,17 +348,16 @@ var AxisRenderer = /** @class */ (function () {
347
348
  }
348
349
  }
349
350
  var vertex = new _this.webAssemblyContext.SCRTColorVertex(x1, y1);
350
- vertices.push_back(vertex);
351
+ _this.vertices.push_back(vertex);
351
352
  vertex.delete();
352
353
  var vertex2 = new _this.webAssemblyContext.SCRTColorVertex(x2, y2);
353
- vertices.push_back(vertex2);
354
+ _this.vertices.push_back(vertex2);
354
355
  vertex2.delete();
355
356
  });
356
357
  var leftOffset = viewRect.left - (isHorizontal ? axisOffset : 0);
357
358
  var topOffset = viewRect.top - (isHorizontal ? 0 : axisOffset);
358
- renderContext.drawLinesNative(vertices, pen, WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine, leftOffset, topOffset);
359
- vertices.clear();
360
- vertices.delete();
359
+ renderContext.drawLinesNative(this.vertices, pen, WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine, leftOffset, topOffset);
360
+ this.vertices.clear();
361
361
  };
362
362
  /**
363
363
  * Called internally - draws axis labels when needed, for example for line annotations
@@ -367,22 +367,49 @@ var AxisRenderer = /** @class */ (function () {
367
367
  return undefined;
368
368
  var nativeContext = renderContext.getNativeContext();
369
369
  var _a = this.textureManager.createSimpleTextTexture(displayValue, __assign(__assign({}, textStyle), { padding: new Thickness_1.Thickness(2, 2, 2, 2) }), fill), bitmapTexture = _a.bitmapTexture, textureHeight = _a.textureHeight, textureWidth = _a.textureWidth;
370
+ var canvas = {
371
+ height: this.parentAxis.parentSurface.domCanvas2D.height,
372
+ width: this.parentAxis.parentSurface.domCanvas2D.width
373
+ };
374
+ var getPosition = function (viewRectSize, coord, canvasSize, textureSize$) {
375
+ if (viewRectSize + coord < textureSize$ / 2) {
376
+ return 0;
377
+ }
378
+ else if (viewRectSize + coord > canvasSize - textureSize$ / 2) {
379
+ return canvasSize - textureSize$;
380
+ }
381
+ else {
382
+ return viewRectSize + coord - textureSize$ / 2;
383
+ }
384
+ };
370
385
  var xPosition, yPosition;
371
386
  if (axisAlignment === AxisAlignment_1.EAxisAlignment.Bottom) {
372
- xPosition = this.viewRect.x + coord - textureWidth / 2;
387
+ xPosition = getPosition(this.viewRect.x, coord, canvas.width, textureWidth);
373
388
  yPosition = this.viewRect.y;
389
+ if (canvas.height - yPosition < textureHeight) {
390
+ yPosition = canvas.height - textureHeight;
391
+ }
374
392
  }
375
393
  else if (axisAlignment === AxisAlignment_1.EAxisAlignment.Top) {
376
- xPosition = this.viewRect.x + coord - textureWidth / 2;
394
+ xPosition = getPosition(this.viewRect.x, coord, canvas.width, textureWidth);
377
395
  yPosition = this.viewRect.y + this.viewRect.height - textureHeight;
396
+ if (this.parentAxis.axisLayoutState.axisSize < textureHeight) {
397
+ yPosition = 0;
398
+ }
378
399
  }
379
400
  else if (axisAlignment === AxisAlignment_1.EAxisAlignment.Left) {
380
401
  xPosition = this.viewRect.x + this.viewRect.width - textureWidth;
381
- yPosition = this.viewRect.y + coord - textureHeight / 2;
402
+ yPosition = getPosition(this.viewRect.y, coord, canvas.height, textureHeight);
403
+ if (this.parentAxis.axisLayoutState.axisSize < textureWidth) {
404
+ xPosition = 0;
405
+ }
382
406
  }
383
407
  else if (axisAlignment === AxisAlignment_1.EAxisAlignment.Right) {
384
408
  xPosition = this.viewRect.x;
385
- yPosition = this.viewRect.y + coord - textureHeight / 2;
409
+ yPosition = getPosition(this.viewRect.y, coord, canvas.height, textureHeight);
410
+ if (canvas.width - xPosition < textureWidth) {
411
+ xPosition = canvas.width - textureWidth;
412
+ }
386
413
  }
387
414
  nativeContext.DrawTexture(bitmapTexture, Math.round(xPosition), Math.round(yPosition), textureWidth, textureHeight);
388
415
  bitmapTexture.delete();
@@ -5,6 +5,11 @@ import { TGridLineStyle, TTextStyle, TTickLineStyle } from "./AxisCore";
5
5
  * Optional parameters passed to {@link AxisCore} constructor to set defaults at construction time
6
6
  */
7
7
  export interface IAxisCoreOptions {
8
+ /**
9
+ * When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
10
+ * edge-cases where every CPU cycle counts.
11
+ */
12
+ allowFastMath?: boolean;
8
13
  /**
9
14
  * The VisibleRange is the range of the Axis (min to max).
10
15
  * @description
@@ -72,7 +72,7 @@ var clearCacheByStyle = function (styleId) {
72
72
  }
73
73
  }
74
74
  };
75
- var maxSize = 100;
75
+ var maxSize = 200;
76
76
  var minAge = 1000 * 60;
77
77
  var lastUsed = 0;
78
78
  var getMaxSize = function () { return maxSize; };
@@ -88,7 +88,7 @@ var pruneCache = function () {
88
88
  if (labelCacheByTextAndStyle.size > maxSize && lastUsed < latest) {
89
89
  try {
90
90
  // remove more than we need so we do this less.
91
- var toRemove = (labelCacheByTextAndStyle.size - maxSize) * 2;
91
+ var toRemove = Math.min(Math.floor(labelCacheByTextAndStyle.size / 2), (labelCacheByTextAndStyle.size - maxSize) * 2);
92
92
  // Sort the items by LastUsed ascending
93
93
  var labels = Array.from(labelCacheByTextAndStyle.entries());
94
94
  labels.sort(function (a, b) { return a[1].lastUsed - b[1].lastUsed; });
@@ -148,11 +148,16 @@ var LabelProviderBase2D = /** @class */ (function (_super) {
148
148
  var cachedLabel = void 0;
149
149
  if (cachedLabelText) {
150
150
  cachedLabel = LabelCache_1.labelCache.getLabel(cachedLabelText, this.styleId);
151
- labels.push(cachedLabelText);
151
+ if (cachedLabel) {
152
+ labels.push(cachedLabelText);
153
+ }
152
154
  }
153
- else {
154
- var text = this.formatLabel(tick);
155
- this.tickToText.set(tick, text);
155
+ if (!cachedLabel) {
156
+ var text = cachedLabelText;
157
+ if (!cachedLabelText) {
158
+ text = this.formatLabel(tick);
159
+ this.tickToText.set(tick, text);
160
+ }
156
161
  var texture = this.getCachedLabelTexture(text, axis.axisRenderer.textureManager, axis.dpiAdjustedLabelStyle);
157
162
  if (texture.textureWidth !== null) {
158
163
  cachedLabel = new LabelInfo(tick, text, texture.bitmapTexture, texture.textureHeight, texture.textureWidth);
@@ -58,8 +58,8 @@ var NumericAxis = /** @class */ (function (_super) {
58
58
  var size = this.axisLength;
59
59
  var shouldFlip = this.isXAxis !== this.flippedCoordinatesProperty;
60
60
  return shouldFlip
61
- ? new FlippedNumericCoordinateCalculator_1.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset)
62
- : new NumericCoordinateCalculator_1.NumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset);
61
+ ? new FlippedNumericCoordinateCalculator_1.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset, this.allowFastMath)
62
+ : new NumericCoordinateCalculator_1.NumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset, this.allowFastMath);
63
63
  };
64
64
  return NumericAxis;
65
65
  }(AxisBase2D_1.AxisBase2D));
@@ -1,4 +1,5 @@
1
1
  export declare enum PROPERTY {
2
+ ALLOW_FAST_MATH = "ALLOW_FAST_MATH",
2
3
  AUTO_RANGE = "AUTO_RANGE",
3
4
  AUTO_TICKS = "AUTO_TICKS",
4
5
  AXIS_ALIGNMENT = "AXIS_ALIGNMENT",
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROPERTY = void 0;
4
4
  var PROPERTY;
5
5
  (function (PROPERTY) {
6
+ PROPERTY["ALLOW_FAST_MATH"] = "ALLOW_FAST_MATH";
6
7
  PROPERTY["AUTO_RANGE"] = "AUTO_RANGE";
7
8
  PROPERTY["AUTO_TICKS"] = "AUTO_TICKS";
8
9
  PROPERTY["AXIS_ALIGNMENT"] = "AXIS_ALIGNMENT";
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface IFadeAnimationOptions extends IBaseAnimationOptions {
5
5
  }
@@ -8,5 +8,5 @@ export declare class FadeAnimation extends SeriesAnimation {
8
8
  readonly type = EAnimationType.Fade;
9
9
  constructor(options?: IFadeAnimationOptions);
10
10
  /** @inheritDoc */
11
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
11
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface IScaleAnimationOptions extends IBaseAnimationOptions {
5
5
  zeroLine?: number;
@@ -13,7 +13,7 @@ export declare class ScaleAnimation extends SeriesAnimation {
13
13
  zeroLine: number;
14
14
  constructor(options?: IScaleAnimationOptions);
15
15
  /** @inheritDoc */
16
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
16
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
17
17
  toJSON(): {
18
18
  type: EAnimationType;
19
19
  options: Required<Omit<IBaseAnimationOptions, never>>;
@@ -1,7 +1,7 @@
1
1
  import { IAnimation } from "../../../../Core/Animations/AnimationFiniteStateMachine";
2
2
  import { TEasingFn } from "../../../../Core/Animations/EasingFunctions";
3
3
  import { EAnimationType } from "../../../../types/AnimationType";
4
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
4
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
5
5
  import { IDataSeries } from "../../../Model/IDataSeries";
6
6
  import { IRenderableSeries } from "../IRenderableSeries";
7
7
  import { BaseAnimationStyle } from "./BaseAnimationStyle";
@@ -65,7 +65,7 @@ export declare abstract class SeriesAnimation implements IAnimation {
65
65
  * @param progress Current animation progress
66
66
  * @param noZeroLine Sets zeroLine = 0, is used for XyzDataSeries
67
67
  */
68
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
68
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
69
69
  /**
70
70
  * Runs for data animation to update animation vectors
71
71
  * @param wasmContext
@@ -74,7 +74,7 @@ export declare abstract class SeriesAnimation implements IAnimation {
74
74
  * @param interpolatedValues The vector which will be updated with interpolated values
75
75
  * @param progress Current animation progress
76
76
  */
77
- calculateDataSeriesAnimationValues(wasmContext: TSciChart, initialValues: DoubleVector, finalValues: DoubleVector, interpolatedValues: DoubleVector, progress: number): void;
77
+ calculateDataSeriesAnimationValues(wasmContext: TSciChart, initialValues: SCRTDoubleVector, finalValues: SCRTDoubleVector, interpolatedValues: SCRTDoubleVector, progress: number): void;
78
78
  /**
79
79
  * Returns {@link BaseAnimationStyle} object which is being used to create initial styles
80
80
  * @param renderableSeries The renderable series
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface ISweepAnimationOptions extends IBaseAnimationOptions {
5
5
  }
@@ -8,5 +8,5 @@ export declare class SweepAnimation extends SeriesAnimation {
8
8
  readonly type = EAnimationType.Sweep;
9
9
  constructor(options?: ISweepAnimationOptions);
10
10
  /** @inheritDoc */
11
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
11
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface IWaveAnimationOptions extends IBaseAnimationOptions {
5
5
  pointDurationFraction?: number;
@@ -18,7 +18,7 @@ export declare class WaveAnimation extends SeriesAnimation {
18
18
  zeroLine: number;
19
19
  constructor(options?: IWaveAnimationOptions);
20
20
  /** @inheritDoc */
21
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
21
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
22
22
  toJSON(): {
23
23
  type: EAnimationType;
24
24
  options: Required<Omit<IBaseAnimationOptions, never>>;