scichart 2.2.2417 → 3.0.0-beta.224

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/Builder/buildDataSeries.d.ts +16 -1
  2. package/Builder/buildDataSeries.js +24 -1
  3. package/Builder/buildSeries.d.ts +60 -3
  4. package/Builder/buildSeries.js +28 -1
  5. package/Builder/buildSurface.d.ts +28 -2
  6. package/Builder/buildSurface.js +53 -31
  7. package/Builder/chartBuilder.d.ts +20 -7
  8. package/Builder/chartBuilder.js +37 -3
  9. package/Charting/ChartModifiers/ChartModifierBase.d.ts +21 -0
  10. package/Charting/ChartModifiers/ChartModifierBase.js +12 -0
  11. package/Charting/ChartModifiers/ChartModifierBase2D.js +2 -1
  12. package/Charting/ChartModifiers/CursorModifier.d.ts +83 -10
  13. package/Charting/ChartModifiers/CursorModifier.js +147 -58
  14. package/Charting/ChartModifiers/DataPointSelectionModifier.js +2 -1
  15. package/Charting/ChartModifiers/LegendModifier.js +2 -1
  16. package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +6 -1
  17. package/Charting/ChartModifiers/ModifierMouseArgs.js +13 -3
  18. package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +2 -2
  19. package/Charting/ChartModifiers/MouseWheelZoomModifier.js +16 -4
  20. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +2 -1
  21. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +8 -4
  22. package/Charting/ChartModifiers/PinchZoomModifier.js +2 -1
  23. package/Charting/ChartModifiers/RolloverModifier.d.ts +40 -0
  24. package/Charting/ChartModifiers/RolloverModifier.js +40 -3
  25. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +2 -1
  26. package/Charting/ChartModifiers/SeriesSelectionModifier.js +2 -1
  27. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  28. package/Charting/ChartModifiers/XAxisDragModifier.js +2 -1
  29. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
  30. package/Charting/ChartModifiers/YAxisDragModifier.js +2 -1
  31. package/Charting/ChartModifiers/ZoomExtentsModifier.js +2 -1
  32. package/Charting/ChartModifiers/ZoomPanModifier.js +2 -1
  33. package/Charting/ChartModifiers/constants.d.ts +3 -1
  34. package/Charting/ChartModifiers/constants.js +2 -0
  35. package/Charting/Drawing/BatchRenderContext.d.ts +6 -0
  36. package/Charting/Drawing/BatchRenderContext.js +40 -0
  37. package/Charting/Drawing/RenderSurface.d.ts +2 -1
  38. package/Charting/Drawing/RenderSurface.js +3 -2
  39. package/Charting/Drawing/WebGlRenderContext2D.d.ts +19 -4
  40. package/Charting/Drawing/WebGlRenderContext2D.js +70 -41
  41. package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.js +2 -1
  42. package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +1 -1
  43. package/Charting/LayoutManager/CentralAxesLayoutManager.js +2 -1
  44. package/Charting/LayoutManager/LayoutManager.d.ts +2 -1
  45. package/Charting/LayoutManager/LayoutManager.js +6 -5
  46. package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +1 -1
  47. package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +1 -1
  48. package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +1 -1
  49. package/Charting/Model/BaseDataSeries.d.ts +10 -1
  50. package/Charting/Model/BaseDataSeries.js +9 -8
  51. package/Charting/Model/BaseHeatmapDataSeries.d.ts +18 -5
  52. package/Charting/Model/BaseHeatmapDataSeries.js +21 -13
  53. package/Charting/Model/ChartData/SeriesInfo.d.ts +6 -0
  54. package/Charting/Model/ChartData/SeriesInfo.js +5 -0
  55. package/Charting/Model/ChartData/XyySeriesInfo.d.ts +2 -0
  56. package/Charting/Model/ChartData/XyySeriesInfo.js +2 -0
  57. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +4 -3
  58. package/Charting/Model/Filters/HlcCustomFilter.js +12 -9
  59. package/Charting/Model/Filters/HlcFilterBase.js +2 -1
  60. package/Charting/Model/Filters/HlcScaleOffsetFilter.js +2 -1
  61. package/Charting/Model/Filters/OhlcCustomFilter.js +12 -9
  62. package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +2 -1
  63. package/Charting/Model/Filters/XyCustomFilter.js +12 -9
  64. package/Charting/Model/Filters/XyFilterBase.d.ts +14 -5
  65. package/Charting/Model/Filters/XyFilterBase.js +47 -15
  66. package/Charting/Model/Filters/XyMovingAverageFilter.js +2 -1
  67. package/Charting/Model/Filters/XyRatioFilter.js +2 -1
  68. package/Charting/Model/Filters/XyScaleOffsetFilter.js +2 -1
  69. package/Charting/Model/Filters/XyyCustomFilter.js +12 -9
  70. package/Charting/Model/Filters/XyyFilterBase.js +2 -1
  71. package/Charting/Model/Filters/XyyScaleOffsetFilter.js +2 -1
  72. package/Charting/Model/Filters/XyzCustomFilter.js +12 -9
  73. package/Charting/Model/Filters/XyzFilterBase.js +2 -1
  74. package/Charting/Model/Filters/XyzScaleOffsetFilter.js +2 -1
  75. package/Charting/Model/IDataSeries.d.ts +9 -1
  76. package/Charting/Model/IDataSeries.js +8 -0
  77. package/Charting/Model/NonUniformHeatmapDataSeries.d.ts +112 -0
  78. package/Charting/Model/NonUniformHeatmapDataSeries.js +261 -0
  79. package/Charting/Model/PaletteFactory.d.ts +40 -4
  80. package/Charting/Model/PaletteFactory.js +37 -11
  81. package/Charting/Model/XyTextDataSeries.d.ts +121 -0
  82. package/Charting/Model/XyTextDataSeries.js +274 -0
  83. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +1 -1
  84. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +1 -1
  85. package/Charting/Services/RenderPassData.d.ts +15 -5
  86. package/Charting/Services/RenderPassData.js +27 -5
  87. package/Charting/Services/SciChartRenderer.d.ts +2 -1
  88. package/Charting/Services/SciChartRenderer.js +92 -29
  89. package/Charting/Themes/IThemeProvider.d.ts +61 -0
  90. package/Charting/Themes/IThemeProvider.js +67 -1
  91. package/Charting/Themes/SciChartJSDarkTheme.d.ts +4 -0
  92. package/Charting/Themes/SciChartJSDarkTheme.js +6 -2
  93. package/Charting/Themes/SciChartJSDarkv2Theme.js +3 -0
  94. package/Charting/Themes/SciChartJSLightTheme.d.ts +8 -0
  95. package/Charting/Themes/SciChartJSLightTheme.js +8 -0
  96. package/Charting/Themes/SciChartJsNavyTheme.d.ts +10 -0
  97. package/Charting/Themes/SciChartJsNavyTheme.js +49 -0
  98. package/Charting/Visuals/Annotations/AdornerLayer.js +4 -8
  99. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +80 -7
  100. package/Charting/Visuals/Annotations/AnnotationBase.js +238 -28
  101. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.d.ts +11 -0
  102. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.js +12 -0
  103. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -0
  104. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +18 -19
  105. package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -0
  106. package/Charting/Visuals/Annotations/BoxAnnotation.js +69 -67
  107. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +2 -2
  108. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +20 -20
  109. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
  110. package/Charting/Visuals/Annotations/CustomAnnotation.js +3 -2
  111. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +6 -3
  112. package/Charting/Visuals/Annotations/IAdornerProvider.d.ts +12 -0
  113. package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -0
  114. package/Charting/Visuals/Annotations/IAnnotation.js +9 -0
  115. package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -0
  116. package/Charting/Visuals/Annotations/LineAnnotation.js +29 -35
  117. package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +193 -0
  118. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +536 -0
  119. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.d.ts +4 -2
  120. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +19 -14
  121. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +2 -2
  122. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +9 -8
  123. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +2 -2
  124. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +6 -6
  125. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +2 -2
  126. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +16 -17
  127. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +13 -2
  128. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +34 -42
  129. package/Charting/Visuals/Annotations/TextAnnotation.d.ts +2 -2
  130. package/Charting/Visuals/Annotations/TextAnnotation.js +41 -22
  131. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +6 -3
  132. package/Charting/Visuals/Annotations/annotationHelpers.d.ts +6 -6
  133. package/Charting/Visuals/Annotations/annotationHelpers.js +7 -6
  134. package/Charting/Visuals/Annotations/constants.d.ts +13 -1
  135. package/Charting/Visuals/Annotations/constants.js +12 -0
  136. package/Charting/Visuals/Axis/AxisBase2D.d.ts +24 -4
  137. package/Charting/Visuals/Axis/AxisBase2D.js +115 -38
  138. package/Charting/Visuals/Axis/AxisCore.d.ts +10 -5
  139. package/Charting/Visuals/Axis/AxisCore.js +11 -10
  140. package/Charting/Visuals/Axis/AxisRenderer.js +114 -20
  141. package/Charting/Visuals/Axis/CategoryAxis.js +2 -1
  142. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +15 -15
  143. package/Charting/Visuals/Axis/CategoryAxisBase.js +14 -12
  144. package/Charting/Visuals/Axis/DateTimeNumericAxis.js +2 -1
  145. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +2 -1
  146. package/Charting/Visuals/Axis/LabelProvider/DateLabelProvider.js +2 -1
  147. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -0
  148. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +14 -0
  149. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +140 -33
  150. package/Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider.js +2 -1
  151. package/Charting/Visuals/Axis/LabelProvider/NumericLabelProvider.js +2 -1
  152. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +2 -1
  153. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +31 -1
  154. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +64 -42
  155. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +2 -2
  156. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.js +16 -19
  157. package/Charting/Visuals/Axis/LogarithmicAxis.js +9 -6
  158. package/Charting/Visuals/Axis/NumericAxis.js +3 -3
  159. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  160. package/Charting/Visuals/Axis/constants.js +1 -0
  161. package/Charting/Visuals/HeatmapLegend.d.ts +95 -0
  162. package/Charting/Visuals/HeatmapLegend.js +192 -0
  163. package/Charting/Visuals/Helpers/NativeObject.d.ts +15 -2
  164. package/Charting/Visuals/Helpers/NativeObject.js +72 -6
  165. package/Charting/Visuals/I2DSurfaceOptions.d.ts +46 -0
  166. package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +5 -0
  167. package/Charting/Visuals/PointMarkers/BasePointMarker.js +28 -0
  168. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +8 -0
  169. package/Charting/Visuals/RenderableSeries/Animations/BandAnimation.js +2 -1
  170. package/Charting/Visuals/RenderableSeries/Animations/BandAnimationStyle.js +2 -1
  171. package/Charting/Visuals/RenderableSeries/Animations/BubbleAnimation.js +2 -1
  172. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimation.js +2 -1
  173. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimationStyle.js +2 -1
  174. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimation.js +2 -1
  175. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimationStyle.js +2 -1
  176. package/Charting/Visuals/RenderableSeries/Animations/CustomPointMarkerStyle.js +2 -1
  177. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.js +2 -1
  178. package/Charting/Visuals/RenderableSeries/Animations/LineAnimation.js +2 -1
  179. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimation.js +2 -1
  180. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimationStyle.js +2 -1
  181. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimation.js +2 -1
  182. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimationStyle.js +2 -1
  183. package/Charting/Visuals/RenderableSeries/Animations/PointMarkerStyle.js +2 -1
  184. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.js +2 -1
  185. package/Charting/Visuals/RenderableSeries/Animations/ScatterAnimation.js +2 -1
  186. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +8 -2
  187. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +3 -3
  188. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.js +2 -1
  189. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +7 -0
  190. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +42 -10
  191. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +128 -0
  192. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +201 -0
  193. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +26 -0
  194. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +39 -3
  195. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +7 -0
  196. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +17 -2
  197. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +2 -0
  198. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +15 -2
  199. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +10 -0
  200. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +93 -17
  201. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +8 -1
  202. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +21 -1
  203. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +1 -0
  204. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +4 -0
  205. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +43 -0
  206. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.js +142 -0
  207. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +92 -0
  208. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +129 -0
  209. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.d.ts +17 -0
  210. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.js +62 -0
  211. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +47 -0
  212. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.js +125 -0
  213. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +71 -0
  214. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.js +221 -0
  215. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.d.ts +5 -0
  216. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.js +2 -0
  217. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +208 -0
  218. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +410 -0
  219. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +40 -0
  220. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +141 -0
  221. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +63 -0
  222. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.js +198 -0
  223. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +35 -0
  224. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.js +92 -0
  225. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.d.ts +12 -0
  226. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +134 -0
  227. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.d.ts +56 -0
  228. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +167 -0
  229. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +0 -1
  230. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -2
  231. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -2
  232. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +47 -40
  233. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +1 -1
  234. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  235. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +18 -5
  236. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +0 -1
  237. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +14 -27
  238. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +17 -4
  239. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +34 -11
  240. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.d.ts +36 -0
  241. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +493 -0
  242. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +5 -2
  243. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +8 -5
  244. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +4 -4
  245. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +3 -0
  246. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +15 -4
  247. package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +2 -1
  248. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +21 -0
  249. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +40 -4
  250. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +2 -0
  251. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +18 -3
  252. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +36 -2
  253. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +77 -8
  254. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +2 -1
  255. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +7 -0
  256. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +16 -4
  257. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +2 -1
  258. package/Charting/Visuals/RenderableSeries/FastMountainRenderableSeries.js +2 -1
  259. package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +2 -1
  260. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +17 -0
  261. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +45 -0
  262. package/Charting/Visuals/RenderableSeries/HeatmapColorMap.js +3 -2
  263. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +35 -5
  264. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +17 -1
  265. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +8 -0
  266. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +7 -1
  267. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.d.ts +20 -0
  268. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.js +86 -0
  269. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.d.ts +6 -0
  270. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.js +56 -0
  271. package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +1 -1
  272. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +7 -1
  273. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +34 -2
  274. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +6 -1
  275. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +12 -0
  276. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.d.ts +74 -0
  277. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.js +99 -0
  278. package/Charting/Visuals/RenderableSeries/ShaderEffect.js +2 -2
  279. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +2 -1
  280. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +2 -3
  281. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +2 -1
  282. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +2 -1
  283. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +2 -1
  284. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +3 -0
  285. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +13 -2
  286. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -1
  287. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +7 -0
  288. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +33 -9
  289. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  290. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +7 -1
  291. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +2 -75
  292. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +8 -130
  293. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  294. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +7 -1
  295. package/Charting/Visuals/RenderableSeries/constants.d.ts +5 -1
  296. package/Charting/Visuals/RenderableSeries/constants.js +4 -0
  297. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +3 -3
  298. package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
  299. package/Charting/Visuals/SciChartDefaults.js +4 -0
  300. package/Charting/Visuals/SciChartOverview.js +5 -3
  301. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -0
  302. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -0
  303. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +22 -4
  304. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +2 -1
  305. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +1 -0
  306. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +5 -0
  307. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +17 -19
  308. package/Charting/Visuals/SciChartSurface.d.ts +225 -7
  309. package/Charting/Visuals/SciChartSurface.js +782 -28
  310. package/Charting/Visuals/SciChartSurfaceBase.d.ts +16 -1
  311. package/Charting/Visuals/SciChartSurfaceBase.js +34 -2
  312. package/Charting/Visuals/TextureManager/CanvasTexture.js +1 -1
  313. package/Charting/Visuals/TextureManager/DpiHelper.js +3 -7
  314. package/Charting/Visuals/TextureManager/TextureManager.d.ts +11 -0
  315. package/Charting/Visuals/TextureManager/TextureManager.js +37 -1
  316. package/Charting/Visuals/createMaster.js +7 -10
  317. package/Charting/Visuals/createSingle.js +2 -0
  318. package/Charting/Visuals/licenseManager2D.js +9 -9
  319. package/Charting/Visuals/sciChartInitCommon.js +16 -12
  320. package/Charting3D/CameraController.d.ts +5 -0
  321. package/Charting3D/CameraController.js +6 -0
  322. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +2 -1
  323. package/Charting3D/Visuals/Axis/AxisBase3D.js +7 -5
  324. package/Charting3D/Visuals/Axis/NumericAxis3D.js +2 -1
  325. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +4 -0
  326. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +7 -0
  327. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +6 -4
  328. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +7 -2
  329. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +3 -2
  330. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.d.ts +0 -5
  331. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.js +12 -11
  332. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  333. package/Charting3D/Visuals/SciChart3DSurface.js +18 -11
  334. package/Charting3D/Visuals/createMaster3d.js +10 -18
  335. package/Charting3D/Visuals/createSingle3d.js +12 -10
  336. package/Core/Animations/GenericAnimation.d.ts +2 -0
  337. package/Core/Animations/GenericAnimation.js +3 -0
  338. package/Core/Animations/NumberRangeAnimator.js +7 -2
  339. package/Core/BuildStamp.d.ts +1 -1
  340. package/Core/BuildStamp.js +2 -2
  341. package/Core/Mouse/MouseManager.d.ts +20 -0
  342. package/Core/Mouse/MouseManager.js +199 -30
  343. package/README.md +91 -403
  344. package/_wasm/scichart.browser.js +1 -1
  345. package/_wasm/scichart2d.data +0 -0
  346. package/_wasm/scichart2d.js +280 -267
  347. package/_wasm/scichart2d.wasm +0 -0
  348. package/_wasm/scichart3d.data +0 -0
  349. package/_wasm/scichart3d.js +280 -268
  350. package/_wasm/scichart3d.wasm +0 -0
  351. package/constants/performanceWarnings.d.ts +2 -0
  352. package/constants/performanceWarnings.js +3 -1
  353. package/package.json +2 -2
  354. package/types/AutoColorMode.d.ts +9 -0
  355. package/types/AutoColorMode.js +13 -0
  356. package/types/BaseType.d.ts +3 -1
  357. package/types/BaseType.js +2 -0
  358. package/types/DataLabelProviderType.d.ts +15 -0
  359. package/types/DataLabelProviderType.js +19 -0
  360. package/types/DataLabelSkipMode.d.ts +21 -0
  361. package/types/DataLabelSkipMode.js +25 -0
  362. package/types/DefaultRenderLayer.d.ts +10 -0
  363. package/types/DefaultRenderLayer.js +14 -0
  364. package/types/SeriesType.d.ts +7 -1
  365. package/types/SeriesType.js +6 -0
  366. package/types/SvgClippingMode.d.ts +17 -0
  367. package/types/SvgClippingMode.js +21 -0
  368. package/types/TDataLabelStyle.d.ts +16 -0
  369. package/types/TDataLabelStyle.js +2 -0
  370. package/types/TSciChart.d.ts +214 -118
  371. package/types/TSciChart3D.d.ts +104 -70
  372. package/types/TextPosition.d.ts +17 -0
  373. package/types/TextPosition.js +39 -0
  374. package/types/ThemeProviderType.d.ts +3 -1
  375. package/types/ThemeProviderType.js +2 -0
  376. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +10 -1
  377. package/utils/ccall/appendDoubleVectorFromJsArray.js +24 -1
  378. package/utils/memoize.d.ts +1 -0
  379. package/utils/memoize.js +26 -0
  380. package/utils/number.d.ts +1 -0
  381. package/utils/number.js +5 -1
  382. package/utils/parseColor.d.ts +2 -0
  383. package/utils/parseColor.js +3 -3
  384. package/utils/text.d.ts +5 -0
  385. package/utils/text.js +48 -0
  386. package/utils/translate.d.ts +8 -0
  387. package/utils/translate.js +27 -5
  388. package/utils/zeroArray2D.d.ts +5 -0
  389. package/utils/zeroArray2D.js +5 -0
@@ -0,0 +1,221 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ContoursDataLabelProvider = void 0;
19
+ var Point_1 = require("../../../../Core/Point");
20
+ var Rect_1 = require("../../../../Core/Rect");
21
+ var DataLabelProviderType_1 = require("../../../../types/DataLabelProviderType");
22
+ var NumericFormat_1 = require("../../../../types/NumericFormat");
23
+ var Size_1 = require("../../../../types/Size");
24
+ var number_1 = require("../../../../utils/number");
25
+ var parseColor_1 = require("../../../../utils/parseColor");
26
+ var NativeObject_1 = require("../../Helpers/NativeObject");
27
+ var DpiHelper_1 = require("../../TextureManager/DpiHelper");
28
+ var BaseDataLabelProvider_1 = require("./BaseDataLabelProvider");
29
+ var ContoursDataLabelProvider = /** @class */ (function (_super) {
30
+ __extends(ContoursDataLabelProvider, _super);
31
+ function ContoursDataLabelProvider(options) {
32
+ var _this = this;
33
+ var _a, _b, _c;
34
+ _this = _super.call(this, options) || this;
35
+ _this.type = DataLabelProviderType_1.EDataLabelProviderType.Contours;
36
+ _this.numericFormatProperty = NumericFormat_1.ENumericFormat.Decimal;
37
+ _this.precisionProperty = 1;
38
+ _this.labelRowCountProperty = 10;
39
+ _this.numericFormatProperty = (_a = options === null || options === void 0 ? void 0 : options.numericFormat) !== null && _a !== void 0 ? _a : _this.numericFormatProperty;
40
+ _this.precision = (_b = options === null || options === void 0 ? void 0 : options.precision) !== null && _b !== void 0 ? _b : _this.precisionProperty;
41
+ _this.labelRowCountProperty = (_c = options === null || options === void 0 ? void 0 : options.labelRowCount) !== null && _c !== void 0 ? _c : _this.labelRowCountProperty;
42
+ _this.metaDataSelector = options === null || options === void 0 ? void 0 : options.metaDataSelector;
43
+ return _this;
44
+ }
45
+ Object.defineProperty(ContoursDataLabelProvider.prototype, "numericFormat", {
46
+ /**
47
+ * Gets or sets numeric format to use when formatting values to text. For a list of values, see {@link ENumericFormat}
48
+ * For more control, override getText
49
+ */
50
+ get: function () {
51
+ return this.numericFormatProperty;
52
+ },
53
+ set: function (value) {
54
+ var _a;
55
+ this.numericFormatProperty = value;
56
+ (_a = this.parentSeries) === null || _a === void 0 ? void 0 : _a.invalidateParentCallback();
57
+ },
58
+ enumerable: false,
59
+ configurable: true
60
+ });
61
+ Object.defineProperty(ContoursDataLabelProvider.prototype, "precision", {
62
+ /**
63
+ * Gets or sets the precision to use when formatting values to text
64
+ * For more control, override getText
65
+ */
66
+ get: function () {
67
+ return this.precisionProperty;
68
+ },
69
+ set: function (value) {
70
+ var _a;
71
+ this.precisionProperty = value;
72
+ (_a = this.parentSeries) === null || _a === void 0 ? void 0 : _a.invalidateParentCallback();
73
+ },
74
+ enumerable: false,
75
+ configurable: true
76
+ });
77
+ Object.defineProperty(ContoursDataLabelProvider.prototype, "labelRowCount", {
78
+ /**
79
+ * Gets or sets the number of rows of data labels. Default 10
80
+ */
81
+ get: function () {
82
+ return this.labelRowCountProperty;
83
+ },
84
+ set: function (value) {
85
+ var _a;
86
+ this.labelRowCountProperty = value;
87
+ (_a = this.parentSeries) === null || _a === void 0 ? void 0 : _a.invalidateParentCallback();
88
+ },
89
+ enumerable: false,
90
+ configurable: true
91
+ });
92
+ ContoursDataLabelProvider.prototype.getText = function (xIndex, yIndex) {
93
+ var _a, _b;
94
+ if (this.metaDataSelector) {
95
+ return this.metaDataSelector(this.dataSeries.getMetadataAt(yIndex, xIndex));
96
+ }
97
+ var z = this.zValues[yIndex][xIndex];
98
+ if (z === z) {
99
+ // Fast isNaN check
100
+ return (0, number_1.formatNumber)(z, (_a = this.numericFormat) !== null && _a !== void 0 ? _a : NumericFormat_1.ENumericFormat.Decimal, (_b = this.precision) !== null && _b !== void 0 ? _b : 1);
101
+ }
102
+ else {
103
+ return undefined;
104
+ }
105
+ };
106
+ ContoursDataLabelProvider.prototype.getPosition = function (xIndex, yIndex, xVal, yVal, textSize, renderPassData) {
107
+ var x = renderPassData.xCoordinateCalculator.getCoordinate(xVal);
108
+ var y = renderPassData.yCoordinateCalculator.getCoordinate(yVal);
109
+ if (renderPassData.isVerticalChart) {
110
+ var c = x;
111
+ x = y;
112
+ y = c;
113
+ }
114
+ return new Point_1.Point(x, y);
115
+ };
116
+ ContoursDataLabelProvider.prototype.shouldGenerate = function (textSize, cellWidth, cellHeight) {
117
+ return textSize.height < cellHeight && textSize.width < cellWidth;
118
+ };
119
+ ContoursDataLabelProvider.prototype.getColor = function (xIndex, yIndex, text) {
120
+ return this.colorValue;
121
+ };
122
+ ContoursDataLabelProvider.prototype.shouldSkipLabel = function (xIndex, yIndex, label, cellWidth, cellHeight) {
123
+ // Skip if out of bounds
124
+ var svr = this.parentSeries.parentSurface.seriesViewRect;
125
+ // const yMax = state.renderPassData.isVerticalChart ? svr.width : svr.height;
126
+ if (label.rect.y < 0 || label.rect.bottom > svr.height)
127
+ return true;
128
+ // const xMax = state.renderPassData.isVerticalChart ? svr.height : svr.width;
129
+ if (label.rect.x < 0 || label.rect.right > svr.width)
130
+ return true;
131
+ return false;
132
+ };
133
+ ContoursDataLabelProvider.prototype.generateDataLabels = function (renderContext, renderPassData) {
134
+ var _a, _b, _c, _d;
135
+ // clear any previous labels
136
+ this.dataLabels = [];
137
+ if (!this.style || !this.style.fontFamily || !this.style.fontSize) {
138
+ return;
139
+ }
140
+ this.dataSeries = this.parentSeries.dataSeries;
141
+ this.zValues = this.dataSeries.getZValues();
142
+ // this.state = new DataLabelState(renderContext, renderPassData, this.style, yValues, this.parentSeries);
143
+ var bounds = (0, NativeObject_1.getTextBounds)(this.webAssemblyContext);
144
+ var dpiAdjustedStyle = DpiHelper_1.DpiHelper.adjustTextStyle(this.style);
145
+ var font = renderContext.getFont(dpiAdjustedStyle);
146
+ var cellWidth = Math.abs(renderPassData.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(1)) -
147
+ renderPassData.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0)));
148
+ var cellHeight = Math.abs(renderPassData.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(1)) -
149
+ renderPassData.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0)));
150
+ //if (!this.shouldGenerate(new Size(bounds.m_fWidth, bounds.m_fHeight), cellWidth, cellHeight)) return;
151
+ this.colorValue = (0, parseColor_1.parseColorToUIntArgb)(this.color);
152
+ var _e = this.parentSeries.dataSeries, xStart = _e.xStart, xStep = _e.xStep, yStart = _e.yStart, yStep = _e.yStep;
153
+ var contourParams = this.parentSeries.getContourDrawingParams();
154
+ var zStep = contourParams.majorStepZ;
155
+ var yInc = (contourParams.yMax - contourParams.yMin) / (this.labelRowCount + 1);
156
+ var lasty = yStart;
157
+ for (var yIndex = 0; yIndex < this.dataSeries.arrayHeight; yIndex++) {
158
+ var y = yStart + yStep * yIndex;
159
+ if (y <= lasty + yInc)
160
+ continue;
161
+ lasty = y;
162
+ if (renderPassData.yCoordinateCalculator.visibleMin > y + yStep ||
163
+ renderPassData.yCoordinateCalculator.visibleMax < y)
164
+ continue;
165
+ var lastZ = undefined;
166
+ for (var xIndex = 0; xIndex < this.dataSeries.arrayWidth; xIndex++) {
167
+ var x = xStart + xStep * xIndex;
168
+ if (renderPassData.xCoordinateCalculator.visibleMin > x + xStep ||
169
+ renderPassData.xCoordinateCalculator.visibleMax < x)
170
+ continue;
171
+ var z = this.zValues[yIndex][xIndex];
172
+ var text = undefined;
173
+ var lineX = x;
174
+ if (lastZ !== undefined) {
175
+ var prevZ = Math.floor(lastZ / zStep) * zStep;
176
+ var nextZ = prevZ + zStep;
177
+ if (z <= prevZ) {
178
+ text = (0, number_1.formatNumber)(prevZ, (_a = this.numericFormat) !== null && _a !== void 0 ? _a : NumericFormat_1.ENumericFormat.Decimal, (_b = this.precision) !== null && _b !== void 0 ? _b : 1);
179
+ lineX = (xStep * (prevZ - z)) / (lastZ - z) - xStep / 2 + x;
180
+ }
181
+ else if (z >= nextZ) {
182
+ text = (0, number_1.formatNumber)(nextZ, (_c = this.numericFormat) !== null && _c !== void 0 ? _c : NumericFormat_1.ENumericFormat.Decimal, (_d = this.precision) !== null && _d !== void 0 ? _d : 1);
183
+ lineX = (xStep * (nextZ - z)) / (z - lastZ) - xStep / 2 + x;
184
+ }
185
+ }
186
+ lastZ = z;
187
+ if (!text) {
188
+ continue;
189
+ }
190
+ font.CalculateStringBounds(text !== null && text !== void 0 ? text : "", bounds, 2);
191
+ var textSize = new Size_1.Size(bounds.m_fWidth, bounds.m_fHeight);
192
+ var xVal = this.dataSeries.getXValue(xIndex);
193
+ var yVal = this.dataSeries.getYValue(yIndex);
194
+ var position = this.getPosition(xIndex, yIndex, lineX, yVal, textSize, renderPassData);
195
+ var label = {
196
+ text: text,
197
+ position: position,
198
+ rect: new Rect_1.Rect(position.x, position.y - bounds.GetLineBounds(0).m_fHeight, textSize.width, textSize.height),
199
+ color: this.getColor(xIndex, yIndex, text),
200
+ dataX: this.dataSeries.getXValue(xIndex),
201
+ dataY: this.dataSeries.getYValue(yIndex)
202
+ };
203
+ // if (!this.shouldSkipLabel(xIndex, yIndex, label, cellWidth, cellHeight)) {
204
+ this.dataLabels.push(label);
205
+ // }
206
+ }
207
+ }
208
+ };
209
+ ContoursDataLabelProvider.prototype.toJSON = function () {
210
+ var json = _super.prototype.toJSON.call(this);
211
+ var options = {
212
+ numericFormat: this.numericFormat,
213
+ precision: this.precision,
214
+ labelRowCount: this.labelRowCount
215
+ };
216
+ Object.assign(json.options, options);
217
+ return json;
218
+ };
219
+ return ContoursDataLabelProvider;
220
+ }(BaseDataLabelProvider_1.BaseDataLabelProvider));
221
+ exports.ContoursDataLabelProvider = ContoursDataLabelProvider;
@@ -0,0 +1,5 @@
1
+ import { RenderPassInfo } from "../../../Services/RenderPassInfo";
2
+ import { SciChartSurface } from "../../SciChartSurface";
3
+ export interface IDataLabelLayoutManager {
4
+ performTextLayout(sciChartSurface: SciChartSurface, renderPassInfo: RenderPassInfo): void;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,208 @@
1
+ import { Point } from "../../../../Core/Point";
2
+ import { EHorizontalTextPosition, EVerticalTextPosition } from "../../../../types/TextPosition";
3
+ import { EDataLabelProviderType } from "../../../../types/DataLabelProviderType";
4
+ import { EDataLabelSkipMode } from "../../../../types/DataLabelSkipMode";
5
+ import { ENumericFormat } from "../../../../types/NumericFormat";
6
+ import { SCRTDoubleVector, TSciChart, TSRTextBounds } from "../../../../types/TSciChart";
7
+ import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
8
+ import { IPointMetadata } from "../../../Model/IPointMetadata";
9
+ import { IPointSeries } from "../../../Model/PointSeries/IPointSeries";
10
+ import { RenderPassData } from "../../../Services/RenderPassData";
11
+ import { IRenderableSeries } from "../IRenderableSeries";
12
+ import { BaseDataLabelProvider, IBaseDataLabelProviderOptions, TDataLabel } from "./BaseDataLabelProvider";
13
+ import { DataLabelState } from "./DataLabelState";
14
+ export interface IDataLabelProviderOptions extends IBaseDataLabelProviderOptions {
15
+ /**
16
+ * Gets or sets numeric format to use for formatting values to text. For a list of values, see {@link ENumericFormat}
17
+ */
18
+ numericFormat?: ENumericFormat;
19
+ /**
20
+ * Gets or sets the precision to use when formatting values to text.
21
+ */
22
+ precision?: number;
23
+ /**
24
+ * Gets or sets the zoom threshold above which label drawing will start. Default 0
25
+ * This is expressed as the gap between the first points divided by the size of the first text.
26
+ * If data is unevenly spaced, consider {@link pointCountThreshold} or override shouldDrawText
27
+ */
28
+ pointGapThreshold?: number;
29
+ /**
30
+ * Gets or sets the number of points below which drawing will start. Default Infinity
31
+ * This can be used instead of {@link pointGapThreshold} when data is unevenly spaced or has large y variation
32
+ */
33
+ pointCountThreshold?: number;
34
+ /**
35
+ * The number of points to skip while generating labels. Default 0 = no skip. 1 = skip every other.
36
+ * When creating text with many data points, it will help performance to skip points rather than creating and checking overlap for every data point.
37
+ * This is applied before any logic related to {@link skipMode}
38
+ */
39
+ skipNumber?: number;
40
+ /**
41
+ * How do decide whether to keep or skip a label once generated.
42
+ * Override {@link shouldSkipLabel} for more control
43
+ */
44
+ skipMode?: EDataLabelSkipMode;
45
+ /**
46
+ * A function to pick which y values to use from the pointSeries passed in on the renderPassData
47
+ */
48
+ ySelector?: (ps: IPointSeries) => SCRTDoubleVector;
49
+ /**
50
+ * If this is set it will be used to get text values from metaData, rather than formatting y values.
51
+ * The selector will be called even if the metaData for an index is undefined.
52
+ */
53
+ metaDataSelector?: (metadata: IPointMetadata) => string;
54
+ /**
55
+ * Whether the label text should update when the label position is animating. Default false.
56
+ */
57
+ updateTextInAnimation?: boolean;
58
+ /** Sets the horizontal text position for the label. Default Right */
59
+ horizontalTextPosition?: EHorizontalTextPosition;
60
+ /** Sets the vertical text position for the label. Default Top */
61
+ verticalTextPosition?: EVerticalTextPosition;
62
+ }
63
+ /**
64
+ * This is the standard DataLabelProvider which provides a number of options for configuring data labels.
65
+ * It defines a much richer api than BaseDataLabelProvider and is intended to be used as a base for doing small changes to data label behaviour
66
+ * generateDataLabels calls the following functions which you can override parts of the behaviour
67
+ * {@link ySelector} to pick the desired yValues from the pointSeries.
68
+ * {@link shouldGenerate} to determine if any labels should be generated so you can enable labels depending on zoom or data level.
69
+ * Then for each data point:
70
+ * {@link getText} Build in behaviour can get text from metadata using {@link metaDataSelector} or format the y values using {@link numericFormat} and {@link precision}
71
+ * {@link getPosition} By default return the x and y coordinate of the data point. Series-specific DataLabelProviders eg {@link LineSeriesDataLabelProvider} have logic to adjust text position based on the series
72
+ * {@link getColor} Returns the color from the text style. Use {@link parseColorToUIntArgb} to turn color string to the required numeric value if overriding.
73
+ * {@link shouldSkipLabel} Decides whether to keep or ship the generated label based on the {@link }
74
+ */
75
+ export declare class DataLabelProvider extends BaseDataLabelProvider {
76
+ readonly type: EDataLabelProviderType;
77
+ /**
78
+ * If this is set it will be used to get text values from metaData, rather than formatting y values.
79
+ * The selector will be called even if the metaData for an index is undefined.
80
+ */
81
+ metaDataSelector: (metadata: IPointMetadata) => string;
82
+ /**
83
+ * A function to pick which y values to use from the pointSeries passed in on the renderPassData
84
+ */
85
+ ySelector: (ps: IPointSeries) => SCRTDoubleVector;
86
+ /**
87
+ * The text to draw, along with the sizes and positions. Usually generated, but can be set or updated before final drawing
88
+ */
89
+ dataLabels: TDataLabel[];
90
+ /**
91
+ * Whether the label text should update when the label position is animating. Default false.
92
+ */
93
+ updateTextInAnimation: boolean;
94
+ /**
95
+ * The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
96
+ * access to our WebGL2 Engine and WebAssembly numerical methods
97
+ */
98
+ protected webAssemblyContext: TSciChart;
99
+ /**
100
+ * The Parent {@link IRenderableSeries | RenderableSeries}
101
+ */
102
+ protected parentSeries: IRenderableSeries;
103
+ protected state: DataLabelState;
104
+ protected pointGapThresholdProperty: number;
105
+ protected pointCountThresholdProperty: number;
106
+ protected numericFormatProperty: ENumericFormat;
107
+ protected precisionProperty: number;
108
+ protected skipModeProperty: EDataLabelSkipMode;
109
+ protected skipNumberProperty: number;
110
+ protected horizontalTextPositionProperty: EHorizontalTextPosition;
111
+ protected verticalTextPositionProperty: EVerticalTextPosition;
112
+ /**
113
+ * Creates an instance of the {@link DataLabelProvider}
114
+ */
115
+ constructor(options?: IDataLabelProviderOptions);
116
+ /**
117
+ * @inheritDoc
118
+ */
119
+ onAttach(webAssemblyContext: TSciChart, parentSeries: IRenderableSeries): void;
120
+ /**
121
+ * Gets or sets the zoom threshold above which label drawing will start. Default 0.
122
+ * This is expressed as the gap between the first points divided by the size of the first text
123
+ * If data is unevenly spaced, consider {@link pointCountThreshold} or override shouldDrawText
124
+ */
125
+ get pointGapThreshold(): number;
126
+ /**
127
+ * Gets or sets the zoom threshold above which label drawing will start. Default 0.
128
+ * This is expressed as the gap between the first points divided by the size of the first text
129
+ * If data is unevenly spaced, consider {@link pointCountThreshold} or override shouldDrawText
130
+ */
131
+ set pointGapThreshold(value: number);
132
+ /**
133
+ * Gets or sets the number of points below which drawing will start. Default Infinity
134
+ * This can be used instead of {@link pointGapThreshold} when data is unevenly spaced or has large y variation
135
+ */
136
+ get pointCountThreshold(): number;
137
+ /**
138
+ * Gets or sets the number of points below which drawing will start. Default Infinity
139
+ * This can be used instead of {@link pointGapThreshold} when data is unevenly spaced or has large y variation
140
+ */
141
+ set pointCountThreshold(value: number);
142
+ /**
143
+ * How do decide whether to keep or skip a label once generated.
144
+ * Override {@link shouldSkipLabel} for more control
145
+ */
146
+ get skipMode(): EDataLabelSkipMode;
147
+ /**
148
+ * How do decide whether to keep or skip a label once generated.
149
+ * Override {@link shouldSkipLabel} for more control
150
+ */
151
+ set skipMode(value: EDataLabelSkipMode);
152
+ /**
153
+ * The number of points to skip while generating labels. Default 0 = no skip. 1 = skip every other.
154
+ * When creating text with many data points, it will help performance to skip points rather than creating and checking overlap for every data point.
155
+ */
156
+ get skipNumber(): number;
157
+ /**
158
+ * The number of points to skip while generating labels. Default 0 = no skip. 1 = skip every other.
159
+ * When creating text with many data points, it will help performance to skip points rather than creating and checking overlap for every data point.
160
+ */
161
+ set skipNumber(value: number);
162
+ /**
163
+ * Gets or sets numeric format to use when formatting values to text. For a list of values, see {@link ENumericFormat}
164
+ * For more control, override getText
165
+ */
166
+ get numericFormat(): ENumericFormat;
167
+ set numericFormat(value: ENumericFormat);
168
+ /**
169
+ * Gets or sets the precision to use when formatting values to text
170
+ * For more control, override getText
171
+ */
172
+ get precision(): number;
173
+ set precision(value: number);
174
+ /**
175
+ * Gets or sets the horizontal text position for the label
176
+ * For more control, override getPosition
177
+ */
178
+ get horizontalTextPosition(): EHorizontalTextPosition;
179
+ set horizontalTextPosition(value: EHorizontalTextPosition);
180
+ /**
181
+ * Gets or sets the vertical text position for the label
182
+ * For more control, override getPosition
183
+ */
184
+ get verticalTextPosition(): EVerticalTextPosition;
185
+ set verticalTextPosition(value: EVerticalTextPosition);
186
+ getText(state: DataLabelState): string;
187
+ /**
188
+ * Called at the start of generateDataLabels. If false, no labels will be generated.
189
+ * Checks {@link pointCountThreshold} then {@link pointGapThreshold}
190
+ * @param state
191
+ * @returns
192
+ */
193
+ shouldGenerate(state: DataLabelState): boolean;
194
+ getPosition(state: DataLabelState, textBounds: TSRTextBounds): Point;
195
+ getColor(state: DataLabelState, text: string): number;
196
+ shouldSkipLabel(state: DataLabelState, label: TDataLabel): boolean;
197
+ /** Generates labels using getText, getPosition, getColor. Overrides manually set labels. */
198
+ generateDataLabels(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
199
+ toJSON(): {
200
+ type: EDataLabelProviderType;
201
+ options: {
202
+ style: import("../../../../types/TDataLabelStyle").TDataLabelStyle;
203
+ color: string;
204
+ };
205
+ };
206
+ private skipIfOverlapPrevious;
207
+ private skipIfOverlapNext;
208
+ }