scichart 2.2.2417 → 3.0.0-beta.230

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 (394) 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 +92 -19
  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 +43 -21
  24. package/Charting/ChartModifiers/RolloverModifier.js +48 -29
  25. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +9 -6
  26. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +10 -8
  27. package/Charting/ChartModifiers/SeriesSelectionModifier.js +2 -1
  28. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  29. package/Charting/ChartModifiers/XAxisDragModifier.js +2 -1
  30. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
  31. package/Charting/ChartModifiers/YAxisDragModifier.js +2 -1
  32. package/Charting/ChartModifiers/ZoomExtentsModifier.js +2 -1
  33. package/Charting/ChartModifiers/ZoomPanModifier.js +2 -1
  34. package/Charting/ChartModifiers/constants.d.ts +3 -1
  35. package/Charting/ChartModifiers/constants.js +2 -0
  36. package/Charting/Drawing/BatchRenderContext.d.ts +6 -0
  37. package/Charting/Drawing/BatchRenderContext.js +40 -0
  38. package/Charting/Drawing/RenderSurface.d.ts +2 -1
  39. package/Charting/Drawing/RenderSurface.js +3 -2
  40. package/Charting/Drawing/WebGlRenderContext2D.d.ts +19 -4
  41. package/Charting/Drawing/WebGlRenderContext2D.js +70 -41
  42. package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.js +2 -1
  43. package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +1 -1
  44. package/Charting/LayoutManager/CentralAxesLayoutManager.js +2 -1
  45. package/Charting/LayoutManager/LayoutManager.d.ts +2 -1
  46. package/Charting/LayoutManager/LayoutManager.js +6 -5
  47. package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +1 -1
  48. package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +1 -1
  49. package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +1 -1
  50. package/Charting/Model/BaseDataSeries.d.ts +10 -1
  51. package/Charting/Model/BaseDataSeries.js +9 -8
  52. package/Charting/Model/BaseHeatmapDataSeries.d.ts +18 -5
  53. package/Charting/Model/BaseHeatmapDataSeries.js +21 -13
  54. package/Charting/Model/ChartData/SeriesInfo.d.ts +6 -0
  55. package/Charting/Model/ChartData/SeriesInfo.js +5 -0
  56. package/Charting/Model/ChartData/XyySeriesInfo.d.ts +2 -0
  57. package/Charting/Model/ChartData/XyySeriesInfo.js +2 -0
  58. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +4 -3
  59. package/Charting/Model/Filters/HlcCustomFilter.js +12 -9
  60. package/Charting/Model/Filters/HlcFilterBase.js +2 -1
  61. package/Charting/Model/Filters/HlcScaleOffsetFilter.js +2 -1
  62. package/Charting/Model/Filters/OhlcCustomFilter.js +12 -9
  63. package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +2 -1
  64. package/Charting/Model/Filters/XyCustomFilter.js +12 -9
  65. package/Charting/Model/Filters/XyFilterBase.d.ts +14 -5
  66. package/Charting/Model/Filters/XyFilterBase.js +47 -15
  67. package/Charting/Model/Filters/XyMovingAverageFilter.js +2 -1
  68. package/Charting/Model/Filters/XyRatioFilter.js +2 -1
  69. package/Charting/Model/Filters/XyScaleOffsetFilter.js +2 -1
  70. package/Charting/Model/Filters/XyyCustomFilter.js +12 -9
  71. package/Charting/Model/Filters/XyyFilterBase.js +2 -1
  72. package/Charting/Model/Filters/XyyScaleOffsetFilter.js +2 -1
  73. package/Charting/Model/Filters/XyzCustomFilter.js +12 -9
  74. package/Charting/Model/Filters/XyzFilterBase.js +2 -1
  75. package/Charting/Model/Filters/XyzScaleOffsetFilter.js +2 -1
  76. package/Charting/Model/IDataSeries.d.ts +9 -1
  77. package/Charting/Model/IDataSeries.js +8 -0
  78. package/Charting/Model/NonUniformHeatmapDataSeries.d.ts +112 -0
  79. package/Charting/Model/NonUniformHeatmapDataSeries.js +261 -0
  80. package/Charting/Model/PaletteFactory.d.ts +40 -4
  81. package/Charting/Model/PaletteFactory.js +37 -11
  82. package/Charting/Model/XyTextDataSeries.d.ts +121 -0
  83. package/Charting/Model/XyTextDataSeries.js +274 -0
  84. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +1 -1
  85. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +1 -1
  86. package/Charting/Services/RenderPassData.d.ts +15 -5
  87. package/Charting/Services/RenderPassData.js +27 -5
  88. package/Charting/Services/SciChartRenderer.d.ts +2 -1
  89. package/Charting/Services/SciChartRenderer.js +91 -29
  90. package/Charting/Themes/IThemeProvider.d.ts +61 -0
  91. package/Charting/Themes/IThemeProvider.js +67 -1
  92. package/Charting/Themes/SciChartJSDarkTheme.d.ts +4 -0
  93. package/Charting/Themes/SciChartJSDarkTheme.js +6 -2
  94. package/Charting/Themes/SciChartJSDarkv2Theme.js +3 -0
  95. package/Charting/Themes/SciChartJSLightTheme.d.ts +8 -0
  96. package/Charting/Themes/SciChartJSLightTheme.js +8 -0
  97. package/Charting/Themes/SciChartJsNavyTheme.d.ts +10 -0
  98. package/Charting/Themes/SciChartJsNavyTheme.js +49 -0
  99. package/Charting/Visuals/Annotations/AdornerLayer.js +4 -8
  100. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +80 -7
  101. package/Charting/Visuals/Annotations/AnnotationBase.js +238 -28
  102. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.d.ts +11 -0
  103. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.js +12 -0
  104. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -0
  105. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +18 -19
  106. package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -0
  107. package/Charting/Visuals/Annotations/BoxAnnotation.js +69 -67
  108. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +2 -2
  109. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +20 -20
  110. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
  111. package/Charting/Visuals/Annotations/CustomAnnotation.js +3 -2
  112. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +6 -3
  113. package/Charting/Visuals/Annotations/IAdornerProvider.d.ts +12 -0
  114. package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -0
  115. package/Charting/Visuals/Annotations/IAnnotation.js +9 -0
  116. package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -0
  117. package/Charting/Visuals/Annotations/LineAnnotation.js +29 -35
  118. package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +193 -0
  119. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +536 -0
  120. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.d.ts +4 -2
  121. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +19 -14
  122. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +2 -2
  123. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +9 -8
  124. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +2 -2
  125. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +6 -6
  126. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +2 -2
  127. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +20 -21
  128. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +13 -2
  129. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +34 -42
  130. package/Charting/Visuals/Annotations/TextAnnotation.d.ts +2 -2
  131. package/Charting/Visuals/Annotations/TextAnnotation.js +41 -22
  132. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +6 -3
  133. package/Charting/Visuals/Annotations/annotationHelpers.d.ts +6 -6
  134. package/Charting/Visuals/Annotations/annotationHelpers.js +7 -6
  135. package/Charting/Visuals/Annotations/constants.d.ts +13 -1
  136. package/Charting/Visuals/Annotations/constants.js +12 -0
  137. package/Charting/Visuals/Axis/AxisBase2D.d.ts +24 -4
  138. package/Charting/Visuals/Axis/AxisBase2D.js +115 -38
  139. package/Charting/Visuals/Axis/AxisCore.d.ts +10 -5
  140. package/Charting/Visuals/Axis/AxisCore.js +11 -10
  141. package/Charting/Visuals/Axis/AxisRenderer.js +114 -20
  142. package/Charting/Visuals/Axis/CategoryAxis.js +2 -1
  143. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +15 -15
  144. package/Charting/Visuals/Axis/CategoryAxisBase.js +14 -12
  145. package/Charting/Visuals/Axis/DateTimeNumericAxis.js +2 -1
  146. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +2 -1
  147. package/Charting/Visuals/Axis/LabelProvider/DateLabelProvider.js +2 -1
  148. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -0
  149. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +14 -0
  150. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +140 -33
  151. package/Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider.js +2 -1
  152. package/Charting/Visuals/Axis/LabelProvider/NumericLabelProvider.js +2 -1
  153. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +2 -1
  154. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +31 -1
  155. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +64 -42
  156. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +2 -2
  157. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.js +16 -19
  158. package/Charting/Visuals/Axis/LogarithmicAxis.js +9 -6
  159. package/Charting/Visuals/Axis/NumericAxis.js +3 -3
  160. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  161. package/Charting/Visuals/Axis/constants.js +1 -0
  162. package/Charting/Visuals/HeatmapLegend.d.ts +95 -0
  163. package/Charting/Visuals/HeatmapLegend.js +192 -0
  164. package/Charting/Visuals/Helpers/NativeObject.d.ts +15 -2
  165. package/Charting/Visuals/Helpers/NativeObject.js +72 -6
  166. package/Charting/Visuals/I2DSurfaceOptions.d.ts +46 -0
  167. package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +5 -0
  168. package/Charting/Visuals/PointMarkers/BasePointMarker.js +28 -0
  169. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +8 -0
  170. package/Charting/Visuals/RenderableSeries/Animations/BandAnimation.js +2 -1
  171. package/Charting/Visuals/RenderableSeries/Animations/BandAnimationStyle.js +2 -1
  172. package/Charting/Visuals/RenderableSeries/Animations/BubbleAnimation.js +2 -1
  173. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimation.js +2 -1
  174. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimationStyle.js +2 -1
  175. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimation.js +2 -1
  176. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimationStyle.js +2 -1
  177. package/Charting/Visuals/RenderableSeries/Animations/CustomPointMarkerStyle.js +2 -1
  178. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.js +2 -1
  179. package/Charting/Visuals/RenderableSeries/Animations/LineAnimation.js +2 -1
  180. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimation.js +2 -1
  181. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimationStyle.js +2 -1
  182. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimation.js +2 -1
  183. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimationStyle.js +2 -1
  184. package/Charting/Visuals/RenderableSeries/Animations/PointMarkerStyle.js +2 -1
  185. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.js +2 -1
  186. package/Charting/Visuals/RenderableSeries/Animations/ScatterAnimation.js +2 -1
  187. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +8 -2
  188. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +3 -3
  189. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.js +2 -1
  190. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +7 -0
  191. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +42 -10
  192. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +128 -0
  193. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +201 -0
  194. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +26 -0
  195. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +39 -3
  196. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +7 -0
  197. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +17 -2
  198. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +2 -0
  199. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +15 -2
  200. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +10 -0
  201. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +93 -17
  202. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +8 -1
  203. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +21 -1
  204. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +1 -0
  205. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +4 -0
  206. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +43 -0
  207. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.js +142 -0
  208. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +92 -0
  209. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +129 -0
  210. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.d.ts +17 -0
  211. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.js +62 -0
  212. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +47 -0
  213. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.js +125 -0
  214. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +71 -0
  215. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.js +221 -0
  216. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.d.ts +5 -0
  217. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.js +2 -0
  218. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +208 -0
  219. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +410 -0
  220. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +40 -0
  221. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +141 -0
  222. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +63 -0
  223. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.js +198 -0
  224. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +35 -0
  225. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.js +92 -0
  226. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.d.ts +12 -0
  227. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +134 -0
  228. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.d.ts +56 -0
  229. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +167 -0
  230. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +0 -1
  231. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -2
  232. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -2
  233. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +47 -40
  234. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +1 -1
  235. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  236. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +18 -5
  237. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +0 -1
  238. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +14 -27
  239. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +17 -4
  240. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +34 -11
  241. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.d.ts +36 -0
  242. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +493 -0
  243. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +5 -2
  244. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +8 -5
  245. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +4 -4
  246. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +3 -0
  247. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +15 -4
  248. package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +2 -1
  249. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +21 -0
  250. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +40 -4
  251. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +2 -0
  252. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +18 -3
  253. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +36 -2
  254. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +77 -8
  255. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +2 -1
  256. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +7 -0
  257. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +16 -4
  258. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +2 -1
  259. package/Charting/Visuals/RenderableSeries/FastMountainRenderableSeries.js +2 -1
  260. package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +2 -1
  261. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +17 -0
  262. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +45 -0
  263. package/Charting/Visuals/RenderableSeries/HeatmapColorMap.js +3 -2
  264. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +35 -5
  265. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +17 -1
  266. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +8 -0
  267. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +7 -1
  268. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.d.ts +20 -0
  269. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.js +86 -0
  270. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.d.ts +6 -0
  271. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.js +56 -0
  272. package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +1 -1
  273. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +7 -1
  274. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +34 -2
  275. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +6 -1
  276. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +12 -0
  277. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.d.ts +74 -0
  278. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.js +99 -0
  279. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.d.ts +7 -2
  280. package/Charting/Visuals/RenderableSeries/ShaderEffect.js +2 -2
  281. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +2 -1
  282. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +2 -3
  283. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +2 -1
  284. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +2 -1
  285. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +2 -1
  286. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +3 -0
  287. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +13 -2
  288. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -1
  289. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +7 -0
  290. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +33 -9
  291. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  292. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +7 -1
  293. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +2 -75
  294. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +8 -130
  295. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  296. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +7 -1
  297. package/Charting/Visuals/RenderableSeries/constants.d.ts +5 -1
  298. package/Charting/Visuals/RenderableSeries/constants.js +4 -0
  299. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +3 -3
  300. package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
  301. package/Charting/Visuals/SciChartDefaults.js +4 -0
  302. package/Charting/Visuals/SciChartOverview.js +5 -3
  303. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -0
  304. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -0
  305. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +22 -4
  306. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +2 -1
  307. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +1 -0
  308. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +5 -0
  309. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +17 -19
  310. package/Charting/Visuals/SciChartSurface.d.ts +238 -7
  311. package/Charting/Visuals/SciChartSurface.js +800 -28
  312. package/Charting/Visuals/SciChartSurfaceBase.d.ts +16 -1
  313. package/Charting/Visuals/SciChartSurfaceBase.js +34 -2
  314. package/Charting/Visuals/TextureManager/CanvasTexture.js +1 -1
  315. package/Charting/Visuals/TextureManager/DpiHelper.js +3 -7
  316. package/Charting/Visuals/TextureManager/TextureManager.d.ts +11 -0
  317. package/Charting/Visuals/TextureManager/TextureManager.js +37 -1
  318. package/Charting/Visuals/createMaster.js +7 -10
  319. package/Charting/Visuals/createSingle.js +2 -0
  320. package/Charting/Visuals/licenseManager2D.js +9 -9
  321. package/Charting/Visuals/sciChartInitCommon.js +16 -12
  322. package/Charting3D/CameraController.d.ts +5 -0
  323. package/Charting3D/CameraController.js +6 -0
  324. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +2 -1
  325. package/Charting3D/Visuals/Axis/AxisBase3D.js +7 -5
  326. package/Charting3D/Visuals/Axis/NumericAxis3D.js +2 -1
  327. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +4 -0
  328. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +7 -0
  329. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +6 -4
  330. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +7 -2
  331. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +3 -2
  332. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.d.ts +0 -5
  333. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.js +12 -11
  334. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  335. package/Charting3D/Visuals/SciChart3DSurface.js +18 -11
  336. package/Charting3D/Visuals/createMaster3d.js +10 -18
  337. package/Charting3D/Visuals/createSingle3d.js +12 -10
  338. package/Core/Animations/GenericAnimation.d.ts +2 -0
  339. package/Core/Animations/GenericAnimation.js +3 -0
  340. package/Core/Animations/NumberRangeAnimator.js +7 -2
  341. package/Core/BuildStamp.d.ts +1 -1
  342. package/Core/BuildStamp.js +2 -2
  343. package/Core/Mouse/MouseManager.d.ts +20 -0
  344. package/Core/Mouse/MouseManager.js +201 -30
  345. package/Core/Telemetry.js +1 -1
  346. package/README.md +91 -403
  347. package/_wasm/scichart.browser.js +1 -1
  348. package/_wasm/scichart2d.data +0 -0
  349. package/_wasm/scichart2d.js +280 -267
  350. package/_wasm/scichart2d.wasm +0 -0
  351. package/_wasm/scichart3d.data +0 -0
  352. package/_wasm/scichart3d.js +280 -268
  353. package/_wasm/scichart3d.wasm +0 -0
  354. package/constants/performanceWarnings.d.ts +2 -0
  355. package/constants/performanceWarnings.js +3 -1
  356. package/package.json +2 -2
  357. package/types/AutoColorMode.d.ts +9 -0
  358. package/types/AutoColorMode.js +13 -0
  359. package/types/BaseType.d.ts +3 -1
  360. package/types/BaseType.js +2 -0
  361. package/types/DataLabelProviderType.d.ts +15 -0
  362. package/types/DataLabelProviderType.js +19 -0
  363. package/types/DataLabelSkipMode.d.ts +21 -0
  364. package/types/DataLabelSkipMode.js +25 -0
  365. package/types/DefaultRenderLayer.d.ts +10 -0
  366. package/types/DefaultRenderLayer.js +14 -0
  367. package/types/MousePosition.d.ts +1 -1
  368. package/types/MousePosition.js +1 -1
  369. package/types/SeriesType.d.ts +7 -1
  370. package/types/SeriesType.js +6 -0
  371. package/types/SvgClippingMode.d.ts +17 -0
  372. package/types/SvgClippingMode.js +21 -0
  373. package/types/TDataLabelStyle.d.ts +16 -0
  374. package/types/TDataLabelStyle.js +2 -0
  375. package/types/TSciChart.d.ts +214 -118
  376. package/types/TSciChart3D.d.ts +104 -70
  377. package/types/TextPosition.d.ts +17 -0
  378. package/types/TextPosition.js +39 -0
  379. package/types/ThemeProviderType.d.ts +3 -1
  380. package/types/ThemeProviderType.js +2 -0
  381. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +10 -1
  382. package/utils/ccall/appendDoubleVectorFromJsArray.js +24 -1
  383. package/utils/memoize.d.ts +1 -0
  384. package/utils/memoize.js +26 -0
  385. package/utils/number.d.ts +1 -0
  386. package/utils/number.js +5 -1
  387. package/utils/parseColor.d.ts +2 -0
  388. package/utils/parseColor.js +3 -3
  389. package/utils/text.d.ts +5 -0
  390. package/utils/text.js +48 -0
  391. package/utils/translate.d.ts +12 -2
  392. package/utils/translate.js +67 -11
  393. package/utils/zeroArray2D.d.ts +5 -0
  394. package/utils/zeroArray2D.js +5 -0
@@ -0,0 +1,198 @@
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.HeatMapDataLabelProvider = 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 HeatMapDataLabelProvider = /** @class */ (function (_super) {
30
+ __extends(HeatMapDataLabelProvider, _super);
31
+ function HeatMapDataLabelProvider(options) {
32
+ var _this = this;
33
+ var _a, _b;
34
+ _this = _super.call(this, options) || this;
35
+ _this.type = DataLabelProviderType_1.EDataLabelProviderType.Heatmap;
36
+ _this.numericFormatProperty = NumericFormat_1.ENumericFormat.Decimal;
37
+ _this.precisionProperty = 1;
38
+ _this.numericFormatProperty = (_a = options === null || options === void 0 ? void 0 : options.numericFormat) !== null && _a !== void 0 ? _a : _this.numericFormatProperty;
39
+ _this.precision = (_b = options === null || options === void 0 ? void 0 : options.precision) !== null && _b !== void 0 ? _b : _this.precisionProperty;
40
+ _this.metaDataSelector = options === null || options === void 0 ? void 0 : options.metaDataSelector;
41
+ return _this;
42
+ }
43
+ Object.defineProperty(HeatMapDataLabelProvider.prototype, "numericFormat", {
44
+ /**
45
+ * Gets or sets numeric format to use when formatting values to text. For a list of values, see {@link ENumericFormat}
46
+ * For more control, override getText
47
+ */
48
+ get: function () {
49
+ return this.numericFormatProperty;
50
+ },
51
+ set: function (value) {
52
+ var _a;
53
+ this.numericFormatProperty = value;
54
+ (_a = this.parentSeries) === null || _a === void 0 ? void 0 : _a.invalidateParentCallback();
55
+ },
56
+ enumerable: false,
57
+ configurable: true
58
+ });
59
+ Object.defineProperty(HeatMapDataLabelProvider.prototype, "precision", {
60
+ /**
61
+ * Gets or sets the precision to use when formatting values to text
62
+ * For more control, override getText
63
+ */
64
+ get: function () {
65
+ return this.precisionProperty;
66
+ },
67
+ set: function (value) {
68
+ var _a;
69
+ this.precisionProperty = value;
70
+ (_a = this.parentSeries) === null || _a === void 0 ? void 0 : _a.invalidateParentCallback();
71
+ },
72
+ enumerable: false,
73
+ configurable: true
74
+ });
75
+ HeatMapDataLabelProvider.prototype.getText = function (xIndex, yIndex) {
76
+ var _a, _b;
77
+ if (this.metaDataSelector) {
78
+ return this.metaDataSelector(this.dataSeries.getMetadataAt(yIndex, xIndex));
79
+ }
80
+ var z = this.zValues[yIndex][xIndex];
81
+ if (z === z) {
82
+ // Fast isNaN check
83
+ 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);
84
+ }
85
+ else {
86
+ return undefined;
87
+ }
88
+ };
89
+ HeatMapDataLabelProvider.prototype.getPosition = function (xIndex, yIndex, xVal, yVal, textSize, cellWidth, cellHeight, renderPassData) {
90
+ var x = renderPassData.xCoordinateCalculator.getCoordinate(xVal);
91
+ var y = renderPassData.yCoordinateCalculator.getCoordinate(yVal);
92
+ if (renderPassData.isVerticalChart) {
93
+ var c = x;
94
+ x = y;
95
+ y = c;
96
+ }
97
+ if (renderPassData.xCoordinateCalculator.hasFlippedCoordinates) {
98
+ x += (cellWidth - textSize.width) / 2;
99
+ }
100
+ else {
101
+ x -= cellWidth - (cellWidth - textSize.width) / 2;
102
+ }
103
+ if (renderPassData.yCoordinateCalculator.hasFlippedCoordinates) {
104
+ y += cellHeight - (cellHeight - textSize.height) / 2;
105
+ }
106
+ else {
107
+ y -= (cellHeight - textSize.height) / 2;
108
+ }
109
+ return new Point_1.Point(x, y);
110
+ };
111
+ HeatMapDataLabelProvider.prototype.shouldGenerate = function (textSize, cellWidth, cellHeight) {
112
+ return textSize.height < cellHeight && textSize.width < cellWidth;
113
+ };
114
+ HeatMapDataLabelProvider.prototype.getColor = function (xIndex, yIndex, text) {
115
+ return this.colorValue;
116
+ };
117
+ HeatMapDataLabelProvider.prototype.shouldSkipLabel = function (xIndex, yIndex, label, cellWidth, cellHeight) {
118
+ // Skip if out of bounds
119
+ var svr = this.parentSeries.parentSurface.seriesViewRect;
120
+ // const yMax = state.renderPassData.isVerticalChart ? svr.width : svr.height;
121
+ if (label.rect.y < 0 || label.rect.bottom > svr.height)
122
+ return true;
123
+ // const xMax = state.renderPassData.isVerticalChart ? svr.height : svr.width;
124
+ if (label.rect.x < 0 || label.rect.right > svr.width)
125
+ return true;
126
+ return false;
127
+ };
128
+ HeatMapDataLabelProvider.prototype.generateDataLabels = function (renderContext, renderPassData) {
129
+ var _a;
130
+ var _b, _c;
131
+ // clear any previous labels
132
+ this.dataLabels = [];
133
+ if (!this.style || !this.style.fontFamily || !this.style.fontSize) {
134
+ return;
135
+ }
136
+ this.dataSeries = this.parentSeries.dataSeries;
137
+ this.zValues = this.dataSeries.getZValues();
138
+ // this.state = new DataLabelState(renderContext, renderPassData, this.style, yValues, this.parentSeries);
139
+ var bounds = (0, NativeObject_1.getTextBounds)(this.webAssemblyContext);
140
+ var dpiAdjustedStyle = DpiHelper_1.DpiHelper.adjustTextStyle(this.style);
141
+ var font = renderContext.getFont(dpiAdjustedStyle);
142
+ var cellWidth = Math.abs(renderPassData.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(1)) -
143
+ renderPassData.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0)));
144
+ var cellHeight = Math.abs(renderPassData.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(1)) -
145
+ renderPassData.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0)));
146
+ font.CalculateStringBounds((_b = this.getText(0, 0)) !== null && _b !== void 0 ? _b : "", bounds, (_c = this.style.lineSpacing) !== null && _c !== void 0 ? _c : 2);
147
+ if (renderPassData.isVerticalChart) {
148
+ _a = [cellWidth, cellHeight], cellHeight = _a[0], cellWidth = _a[1];
149
+ }
150
+ if (!this.shouldGenerate(new Size_1.Size(bounds.m_fWidth, bounds.m_fHeight), cellWidth, cellHeight))
151
+ return;
152
+ this.colorValue = (0, parseColor_1.parseColorToUIntArgb)(this.color);
153
+ var _d = this.parentSeries.dataSeries, xStart = _d.xStart, xStep = _d.xStep, yStart = _d.yStart, yStep = _d.yStep;
154
+ for (var yIndex = 0; yIndex < this.dataSeries.arrayHeight; yIndex++) {
155
+ var y = yStart + yStep * yIndex;
156
+ if (renderPassData.yCoordinateCalculator.visibleMin > y + yStep ||
157
+ renderPassData.yCoordinateCalculator.visibleMax < y)
158
+ continue;
159
+ for (var xIndex = 0; xIndex < this.dataSeries.arrayWidth; xIndex++) {
160
+ var x = xStart + xStep * xIndex;
161
+ if (renderPassData.xCoordinateCalculator.visibleMin > x + xStep ||
162
+ renderPassData.xCoordinateCalculator.visibleMax < x)
163
+ continue;
164
+ var text = this.getText(xIndex, yIndex);
165
+ if (!text) {
166
+ continue;
167
+ }
168
+ font.CalculateStringBounds(text !== null && text !== void 0 ? text : "", bounds, 2);
169
+ var textSize = new Size_1.Size(bounds.m_fWidth, bounds.m_fHeight);
170
+ var xVal = this.dataSeries.getXValue(xIndex);
171
+ var yVal = this.dataSeries.getYValue(yIndex);
172
+ var position = this.getPosition(xIndex, yIndex, xVal, yVal, textSize, cellWidth, cellHeight, renderPassData);
173
+ var label = {
174
+ text: text,
175
+ position: position,
176
+ rect: new Rect_1.Rect(position.x, position.y - bounds.GetLineBounds(0).m_fHeight, textSize.width, textSize.height),
177
+ color: this.getColor(xIndex, yIndex, text),
178
+ dataX: this.dataSeries.getXValue(xIndex),
179
+ dataY: this.dataSeries.getYValue(yIndex)
180
+ };
181
+ if (!this.shouldSkipLabel(xIndex, yIndex, label, cellWidth, cellHeight)) {
182
+ this.dataLabels.push(label);
183
+ }
184
+ }
185
+ }
186
+ };
187
+ HeatMapDataLabelProvider.prototype.toJSON = function () {
188
+ var json = _super.prototype.toJSON.call(this);
189
+ var options = {
190
+ numericFormat: this.numericFormat,
191
+ precision: this.precision
192
+ };
193
+ Object.assign(json.options, options);
194
+ return json;
195
+ };
196
+ return HeatMapDataLabelProvider;
197
+ }(BaseDataLabelProvider_1.BaseDataLabelProvider));
198
+ exports.HeatMapDataLabelProvider = HeatMapDataLabelProvider;
@@ -0,0 +1,35 @@
1
+ import { Point } from "../../../../Core/Point";
2
+ import { EDataLabelProviderType } from "../../../../types/DataLabelProviderType";
3
+ import { TSRTextBounds } from "../../../../types/TSciChart";
4
+ import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
5
+ import { RenderPassData } from "../../../Services/RenderPassData";
6
+ import { DataLabelProvider, IDataLabelProviderOptions } from "./DataLabelProvider";
7
+ import { DataLabelState } from "./DataLabelState";
8
+ export interface ILineSeriesDataLabelProviderOptions extends IDataLabelProviderOptions {
9
+ /**
10
+ * Sets whether text should be positioned above the line if it is going down, and below the line if it going up.
11
+ * Default true. When true this overrides horizontalAnchorPoint and verticalAnchorPoint to be left, bottom.
12
+ */
13
+ aboveBelow?: boolean;
14
+ }
15
+ export declare class LineSeriesDataLabelProvider extends DataLabelProvider {
16
+ readonly type: EDataLabelProviderType;
17
+ private yAdj;
18
+ private aboveBelowProperty;
19
+ constructor(options?: ILineSeriesDataLabelProviderOptions);
20
+ /**
21
+ * Gets or Sets whether text should be positioned above the line if it is going down, and below the line if it going up.
22
+ * Default true. When true this overrides horizontalAnchorPoint and verticalAnchorPoint to be left, bottom.
23
+ */
24
+ get aboveBelow(): boolean;
25
+ set aboveBelow(value: boolean);
26
+ generateDataLabels(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
27
+ getPosition(state: DataLabelState, textBounds: TSRTextBounds): Point;
28
+ toJSON(): {
29
+ type: EDataLabelProviderType;
30
+ options: {
31
+ style: import("../../../../types/TDataLabelStyle").TDataLabelStyle;
32
+ color: string;
33
+ };
34
+ };
35
+ }
@@ -0,0 +1,92 @@
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.LineSeriesDataLabelProvider = void 0;
19
+ var Point_1 = require("../../../../Core/Point");
20
+ var DataLabelProviderType_1 = require("../../../../types/DataLabelProviderType");
21
+ var DataLabelProvider_1 = require("./DataLabelProvider");
22
+ var LineSeriesDataLabelProvider = /** @class */ (function (_super) {
23
+ __extends(LineSeriesDataLabelProvider, _super);
24
+ function LineSeriesDataLabelProvider(options) {
25
+ var _this = this;
26
+ var _a;
27
+ _this = _super.call(this, options) || this;
28
+ _this.type = DataLabelProviderType_1.EDataLabelProviderType.Line;
29
+ _this.aboveBelowProperty = true;
30
+ _this.aboveBelowProperty = (_a = options === null || options === void 0 ? void 0 : options.aboveBelow) !== null && _a !== void 0 ? _a : _this.aboveBelow;
31
+ return _this;
32
+ }
33
+ Object.defineProperty(LineSeriesDataLabelProvider.prototype, "aboveBelow", {
34
+ /**
35
+ * Gets or Sets whether text should be positioned above the line if it is going down, and below the line if it going up.
36
+ * Default true. When true this overrides horizontalAnchorPoint and verticalAnchorPoint to be left, bottom.
37
+ */
38
+ get: function () {
39
+ return this.aboveBelowProperty;
40
+ },
41
+ set: function (value) {
42
+ this.aboveBelowProperty = value;
43
+ this.invalidateParent();
44
+ },
45
+ enumerable: false,
46
+ configurable: true
47
+ });
48
+ LineSeriesDataLabelProvider.prototype.generateDataLabels = function (renderContext, renderPassData) {
49
+ var parent = this.parentSeries;
50
+ this.yAdj = Math.ceil(parent.strokeThickness / 2);
51
+ if (parent.pointMarker) {
52
+ this.yAdj = Math.max(this.yAdj, Math.ceil(parent.pointMarker.height / 2));
53
+ }
54
+ _super.prototype.generateDataLabels.call(this, renderContext, renderPassData);
55
+ };
56
+ LineSeriesDataLabelProvider.prototype.getPosition = function (state, textBounds) {
57
+ var _a, _b, _c, _d, _e, _f;
58
+ if (this.aboveBelow) {
59
+ var x = state.xCoord() + ((_b = (_a = this.style.padding) === null || _a === void 0 ? void 0 : _a.left) !== null && _b !== void 0 ? _b : 0);
60
+ // Handle multiline
61
+ var yOffset = textBounds.m_fHeight - textBounds.GetLineBounds(0).m_fHeight;
62
+ var y = state.yCoord() - yOffset;
63
+ if (state.hasNext()) {
64
+ var nextY = state.yCoord(state.index + 1);
65
+ var nextX = state.xCoord(state.index + 1);
66
+ // Text anchor point is bottom left
67
+ if ((nextX > x && nextY > y) || (nextX < x && nextY < y)) {
68
+ // going down - draw above
69
+ y -= this.yAdj + ((_d = (_c = state.style.padding) === null || _c === void 0 ? void 0 : _c.bottom) !== null && _d !== void 0 ? _d : 1);
70
+ }
71
+ else {
72
+ // going up - draw below
73
+ y += textBounds.m_fHeight + this.yAdj + ((_f = (_e = state.style.padding) === null || _e === void 0 ? void 0 : _e.top) !== null && _f !== void 0 ? _f : 1);
74
+ }
75
+ }
76
+ return new Point_1.Point(x, y);
77
+ }
78
+ else {
79
+ return _super.prototype.getPosition.call(this, state, textBounds);
80
+ }
81
+ };
82
+ LineSeriesDataLabelProvider.prototype.toJSON = function () {
83
+ var json = _super.prototype.toJSON.call(this);
84
+ var options = {
85
+ aboveBelow: this.aboveBelow
86
+ };
87
+ Object.assign(json.options, options);
88
+ return json;
89
+ };
90
+ return LineSeriesDataLabelProvider;
91
+ }(DataLabelProvider_1.DataLabelProvider));
92
+ exports.LineSeriesDataLabelProvider = LineSeriesDataLabelProvider;
@@ -0,0 +1,12 @@
1
+ import { Point } from "../../../../Core/Point";
2
+ import { EDataLabelProviderType } from "../../../../types/DataLabelProviderType";
3
+ import { Size } from "../../../../types/Size";
4
+ import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
5
+ import { RenderPassData } from "../../../Services/RenderPassData";
6
+ import { HeatMapDataLabelProvider } from "./HeatMapDataLabelProvider";
7
+ export declare class NonUniformHeatMapDataLabelProvider extends HeatMapDataLabelProvider {
8
+ readonly type: EDataLabelProviderType;
9
+ cellSizeThresholdCoefficient: number;
10
+ getPosition(xIndex: number, yIndex: number, xVal: number, yVal: number, textSize: Size, cellWidth: number, cellHeight: number, renderPassData: RenderPassData): Point;
11
+ generateDataLabels(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
12
+ }
@@ -0,0 +1,134 @@
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.NonUniformHeatMapDataLabelProvider = 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 Size_1 = require("../../../../types/Size");
23
+ var parseColor_1 = require("../../../../utils/parseColor");
24
+ var NativeObject_1 = require("../../Helpers/NativeObject");
25
+ var DpiHelper_1 = require("../../TextureManager/DpiHelper");
26
+ var HeatMapDataLabelProvider_1 = require("./HeatMapDataLabelProvider");
27
+ var NonUniformHeatMapDataLabelProvider = /** @class */ (function (_super) {
28
+ __extends(NonUniformHeatMapDataLabelProvider, _super);
29
+ function NonUniformHeatMapDataLabelProvider() {
30
+ var _this = _super !== null && _super.apply(this, arguments) || this;
31
+ _this.type = DataLabelProviderType_1.EDataLabelProviderType.NonUniformHeatmap;
32
+ _this.cellSizeThresholdCoefficient = 1;
33
+ return _this;
34
+ }
35
+ NonUniformHeatMapDataLabelProvider.prototype.getPosition = function (xIndex, yIndex, xVal, yVal, textSize, cellWidth, cellHeight, renderPassData) {
36
+ var x = renderPassData.xCoordinateCalculator.getCoordinate(xVal);
37
+ var y = renderPassData.yCoordinateCalculator.getCoordinate(yVal);
38
+ if (renderPassData.isVerticalChart) {
39
+ var c = x;
40
+ x = y;
41
+ y = c;
42
+ }
43
+ if (renderPassData.xCoordinateCalculator.hasFlippedCoordinates) {
44
+ x += (cellWidth - textSize.width) / 2;
45
+ }
46
+ else {
47
+ x -= cellWidth - (cellWidth - textSize.width) / 2;
48
+ }
49
+ if (renderPassData.yCoordinateCalculator.hasFlippedCoordinates) {
50
+ y += cellHeight - (cellHeight - textSize.height) / 2;
51
+ }
52
+ else {
53
+ y -= (cellHeight - textSize.height) / 2;
54
+ }
55
+ return new Point_1.Point(x, y);
56
+ };
57
+ NonUniformHeatMapDataLabelProvider.prototype.generateDataLabels = function (renderContext, renderPassData) {
58
+ var _a, _b;
59
+ // clear any previous labels
60
+ this.dataLabels = [];
61
+ if (!this.style || !this.style.fontFamily || !this.style.fontSize) {
62
+ return;
63
+ }
64
+ this.dataSeries = this.parentSeries.dataSeries;
65
+ this.zValues = this.dataSeries.getZValues();
66
+ // this.state = new DataLabelState(renderContext, renderPassData, this.style, yValues, this.parentSeries);
67
+ var bounds = (0, NativeObject_1.getTextBounds)(this.webAssemblyContext);
68
+ var dpiAdjustedStyle = DpiHelper_1.DpiHelper.adjustTextStyle(this.style);
69
+ var font = renderContext.getFont(dpiAdjustedStyle);
70
+ // NonUniform-specific logic
71
+ var heatmapWidth = Math.abs(renderPassData.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(this.dataSeries.arrayWidth)) -
72
+ renderPassData.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0)));
73
+ var heatmapHeight = Math.abs(renderPassData.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(this.dataSeries.arrayHeight)) -
74
+ renderPassData.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0)));
75
+ var relativeXCellSizes = this.dataSeries.xCellSizes;
76
+ var relativeYCellSizes = this.dataSeries.yCellSizes;
77
+ font.CalculateStringBounds((_a = this.getText(0, 0)) !== null && _a !== void 0 ? _a : "", bounds, (_b = this.style.lineSpacing) !== null && _b !== void 0 ? _b : 2);
78
+ var minCellHeight = bounds.m_fHeight * this.cellSizeThresholdCoefficient;
79
+ var minCellWidth = bounds.m_fWidth * this.cellSizeThresholdCoefficient;
80
+ // TODO figure out how it should work for NonUniform
81
+ // if (!this.shouldGenerate(new Size(bounds.m_fWidth, bounds.m_fHeight), cellWidth, cellHeight)) return;
82
+ this.colorValue = (0, parseColor_1.parseColorToUIntArgb)(this.color);
83
+ for (var yIndex = 0; yIndex < this.dataSeries.arrayHeight; yIndex++) {
84
+ var cellHeight = heatmapHeight * relativeYCellSizes[yIndex];
85
+ if (cellHeight < minCellHeight) {
86
+ continue;
87
+ }
88
+ var yVal = this.dataSeries.getYValue(yIndex);
89
+ var yValNext = this.dataSeries.yCellOffsets[yIndex + 1];
90
+ if (renderPassData.yCoordinateCalculator.visibleMin > yVal ||
91
+ renderPassData.yCoordinateCalculator.visibleMax < yValNext) {
92
+ continue;
93
+ }
94
+ for (var xIndex = 0; xIndex < this.dataSeries.arrayWidth; xIndex++) {
95
+ var cellWidth = heatmapWidth * relativeXCellSizes[xIndex];
96
+ if (cellWidth < minCellWidth) {
97
+ continue;
98
+ }
99
+ var xVal = this.dataSeries.getXValue(xIndex);
100
+ var xValNext = this.dataSeries.xCellOffsets[xIndex + 1];
101
+ console.log(xIndex, xVal, xValNext, renderPassData.xCoordinateCalculator.visibleMax);
102
+ if (renderPassData.xCoordinateCalculator.visibleMin > xVal ||
103
+ renderPassData.xCoordinateCalculator.visibleMax < xValNext) {
104
+ continue;
105
+ }
106
+ var text = this.getText(xIndex, yIndex);
107
+ if (!text) {
108
+ continue;
109
+ }
110
+ font.CalculateStringBounds(text !== null && text !== void 0 ? text : "", bounds, 2);
111
+ var textSize = new Size_1.Size(bounds.m_fWidth, bounds.m_fHeight);
112
+ if (renderPassData.isVerticalChart) {
113
+ var c = cellHeight;
114
+ cellHeight = cellWidth;
115
+ cellWidth = c;
116
+ }
117
+ var position = this.getPosition(xIndex, yIndex, xVal, yVal, textSize, cellWidth, cellHeight, renderPassData);
118
+ var label = {
119
+ text: text,
120
+ position: position,
121
+ rect: new Rect_1.Rect(position.x, position.y - bounds.GetLineBounds(0).m_fHeight, textSize.width, textSize.height),
122
+ color: this.getColor(xIndex, yIndex, text),
123
+ dataX: xVal,
124
+ dataY: yVal
125
+ };
126
+ if (!this.shouldSkipLabel(xIndex, yIndex, label, cellWidth, cellHeight)) {
127
+ this.dataLabels.push(label);
128
+ }
129
+ }
130
+ }
131
+ };
132
+ return NonUniformHeatMapDataLabelProvider;
133
+ }(HeatMapDataLabelProvider_1.HeatMapDataLabelProvider));
134
+ exports.NonUniformHeatMapDataLabelProvider = NonUniformHeatMapDataLabelProvider;
@@ -0,0 +1,56 @@
1
+ import { Point } from "../../../../Core/Point";
2
+ import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
3
+ import { RenderPassData } from "../../../Services/RenderPassData";
4
+ import { BaseDataLabelProvider, IBaseDataLabelProviderOptions } from "./BaseDataLabelProvider";
5
+ import { EDataLabelProviderType } from "../../../../types/DataLabelProviderType";
6
+ import { DataLabelState } from "./DataLabelState";
7
+ import { EHorizontalTextPosition, EVerticalTextPosition } from "../../../../types/TextPosition";
8
+ import { TSRTextBounds } from "../../../../types/TSciChart";
9
+ import { TDataLabelStyle } from "../../../../types/TDataLabelStyle";
10
+ export interface ITextDataLabelProviderOptions extends IBaseDataLabelProviderOptions {
11
+ /**
12
+ * If you want to be able to look at the position and size of labels before they are drawn, set this true
13
+ * otherwise it is faster to leave it false.
14
+ */
15
+ calculateTextBounds?: boolean;
16
+ /** Sets the horizontal text position for the label */
17
+ horizontalTextPosition?: EHorizontalTextPosition;
18
+ /** Sets the vertical text position for the label */
19
+ verticalTextPosition?: EVerticalTextPosition;
20
+ }
21
+ /**
22
+ * A DataLabelProvider sepcifically designed to work with {@link FastTextRenderableSeries } or any series that uses an {@link XYTextDataSeries }
23
+ * Text is taken directly from the textValues on the dataSeries and placed at the x,y coordinates (anchored top, left)
24
+ */
25
+ export declare class TextDataLabelProvider extends BaseDataLabelProvider {
26
+ type: EDataLabelProviderType;
27
+ /**
28
+ * If your labels are all the same size, or you are not changing the alignment, you can set this false to gain performance
29
+ */
30
+ calculateTextBounds: boolean;
31
+ protected horizontalTextPositionProperty: EHorizontalTextPosition;
32
+ protected verticalTextPositionProperty: EVerticalTextPosition;
33
+ constructor(options?: ITextDataLabelProviderOptions);
34
+ /**
35
+ * Gets or sets the horizontal text position for the label
36
+ * For more control, override getPosition
37
+ */
38
+ get horizontalTextPosition(): EHorizontalTextPosition;
39
+ set horizontalTextPosition(value: EHorizontalTextPosition);
40
+ /**
41
+ * Gets or sets the vertical text position for the label
42
+ * For more control, override getPosition
43
+ */
44
+ get verticalTextPosition(): EVerticalTextPosition;
45
+ set verticalTextPosition(value: EVerticalTextPosition);
46
+ getPosition(state: DataLabelState, textBounds: TSRTextBounds): Point;
47
+ getColor(state: DataLabelState, text: string): number;
48
+ generateDataLabels(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
49
+ toJSON(): {
50
+ type: EDataLabelProviderType;
51
+ options: {
52
+ style: TDataLabelStyle;
53
+ color: string;
54
+ };
55
+ };
56
+ }