stream-charts 1.2.0 → 2.0.0

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 (463) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +809 -1022
  3. package/changes.md +40 -0
  4. package/dist/app/charts/Chart.d.ts +35 -139
  5. package/dist/app/charts/Chart.d.ts.map +1 -0
  6. package/dist/app/charts/Chart.js +74 -65
  7. package/dist/app/charts/Chart.js.map +1 -1
  8. package/dist/app/charts/axes/AxesState.d.ts +26 -18
  9. package/dist/app/charts/axes/AxesState.d.ts.map +1 -0
  10. package/dist/app/charts/axes/AxesState.js +26 -24
  11. package/dist/app/charts/axes/AxesState.js.map +1 -1
  12. package/dist/app/charts/axes/AxisInterval.d.ts +44 -26
  13. package/dist/app/charts/axes/AxisInterval.d.ts.map +1 -0
  14. package/dist/app/charts/axes/AxisInterval.js +48 -29
  15. package/dist/app/charts/axes/AxisInterval.js.map +1 -1
  16. package/dist/app/charts/axes/BaseAxisRange.d.ts +46 -22
  17. package/dist/app/charts/axes/BaseAxisRange.d.ts.map +1 -0
  18. package/dist/app/charts/axes/BaseAxisRange.js +17 -12
  19. package/dist/app/charts/axes/BaseAxisRange.js.map +1 -1
  20. package/dist/app/charts/axes/ContinuousAxis.d.ts +47 -6
  21. package/dist/app/charts/axes/ContinuousAxis.d.ts.map +1 -0
  22. package/dist/app/charts/axes/ContinuousAxis.js +160 -27
  23. package/dist/app/charts/axes/ContinuousAxis.js.map +1 -1
  24. package/dist/app/charts/axes/ContinuousAxisRange.d.ts +29 -10
  25. package/dist/app/charts/axes/ContinuousAxisRange.d.ts.map +1 -0
  26. package/dist/app/charts/axes/ContinuousAxisRange.js +29 -11
  27. package/dist/app/charts/axes/ContinuousAxisRange.js.map +1 -1
  28. package/dist/app/charts/axes/EmptyAxis.d.ts +5 -2
  29. package/dist/app/charts/axes/EmptyAxis.d.ts.map +1 -0
  30. package/dist/app/charts/axes/EmptyAxis.js +30 -9
  31. package/dist/app/charts/axes/EmptyAxis.js.map +1 -1
  32. package/dist/app/charts/axes/OrdinalAxis.d.ts +5 -3
  33. package/dist/app/charts/axes/OrdinalAxis.d.ts.map +1 -0
  34. package/dist/app/charts/axes/OrdinalAxis.js +39 -16
  35. package/dist/app/charts/axes/OrdinalAxis.js.map +1 -1
  36. package/dist/app/charts/axes/OrdinalAxisRange.d.ts +76 -13
  37. package/dist/app/charts/axes/OrdinalAxisRange.d.ts.map +1 -0
  38. package/dist/app/charts/axes/OrdinalAxisRange.js +95 -16
  39. package/dist/app/charts/axes/OrdinalAxisRange.js.map +1 -1
  40. package/dist/app/charts/axes/autoScale.d.ts +111 -0
  41. package/dist/app/charts/axes/autoScale.d.ts.map +1 -0
  42. package/dist/app/charts/axes/autoScale.js +188 -0
  43. package/dist/app/charts/axes/autoScale.js.map +1 -0
  44. package/dist/app/charts/axes/axes.d.ts +273 -150
  45. package/dist/app/charts/axes/axes.d.ts.map +1 -0
  46. package/dist/app/charts/axes/axes.js +808 -583
  47. package/dist/app/charts/axes/axes.js.map +1 -1
  48. package/dist/app/charts/d3types.d.ts +40 -11
  49. package/dist/app/charts/d3types.d.ts.map +1 -0
  50. package/dist/app/charts/d3types.js +3 -0
  51. package/dist/app/charts/d3types.js.map +1 -1
  52. package/dist/app/charts/datasources/StreamingDataSource.d.ts +149 -0
  53. package/dist/app/charts/datasources/StreamingDataSource.d.ts.map +1 -0
  54. package/dist/app/charts/datasources/StreamingDataSource.js +110 -0
  55. package/dist/app/charts/datasources/StreamingDataSource.js.map +1 -0
  56. package/dist/app/charts/datasources/iteratesDataSource.d.ts +73 -0
  57. package/dist/app/charts/datasources/iteratesDataSource.d.ts.map +1 -0
  58. package/dist/app/charts/datasources/iteratesDataSource.js +87 -0
  59. package/dist/app/charts/datasources/iteratesDataSource.js.map +1 -0
  60. package/dist/app/charts/datasources/ordinalDataSource.d.ts +75 -0
  61. package/dist/app/charts/datasources/ordinalDataSource.d.ts.map +1 -0
  62. package/dist/app/charts/datasources/ordinalDataSource.js +135 -0
  63. package/dist/app/charts/datasources/ordinalDataSource.js.map +1 -0
  64. package/dist/app/charts/datasources/outlierDataSource.d.ts +53 -0
  65. package/dist/app/charts/datasources/outlierDataSource.d.ts.map +1 -0
  66. package/dist/app/charts/datasources/outlierDataSource.js +57 -0
  67. package/dist/app/charts/datasources/outlierDataSource.js.map +1 -0
  68. package/dist/app/charts/datasources/timeSeriesDataSource.d.ts +77 -0
  69. package/dist/app/charts/datasources/timeSeriesDataSource.d.ts.map +1 -0
  70. package/dist/app/charts/datasources/timeSeriesDataSource.js +85 -0
  71. package/dist/app/charts/datasources/timeSeriesDataSource.js.map +1 -0
  72. package/dist/app/charts/filters/regexFilter.d.ts +31 -4
  73. package/dist/app/charts/filters/regexFilter.d.ts.map +1 -0
  74. package/dist/app/charts/filters/regexFilter.js +38 -4
  75. package/dist/app/charts/filters/regexFilter.js.map +1 -1
  76. package/dist/app/charts/hooks/AxesProvider.d.ts +21 -0
  77. package/dist/app/charts/hooks/AxesProvider.d.ts.map +1 -0
  78. package/dist/app/charts/hooks/AxesProvider.js +213 -0
  79. package/dist/app/charts/hooks/AxesProvider.js.map +1 -0
  80. package/dist/app/charts/hooks/CanvasSurfaceProvider.d.ts +25 -0
  81. package/dist/app/charts/hooks/CanvasSurfaceProvider.d.ts.map +1 -0
  82. package/dist/app/charts/hooks/CanvasSurfaceProvider.js +76 -0
  83. package/dist/app/charts/hooks/CanvasSurfaceProvider.js.map +1 -0
  84. package/dist/app/charts/hooks/ChartProvider.d.ts +40 -0
  85. package/dist/app/charts/hooks/ChartProvider.d.ts.map +1 -0
  86. package/dist/app/charts/hooks/ChartProvider.js +33 -0
  87. package/dist/app/charts/hooks/ChartProvider.js.map +1 -0
  88. package/dist/app/charts/hooks/InteractionProvider.d.ts +23 -0
  89. package/dist/app/charts/hooks/InteractionProvider.d.ts.map +1 -0
  90. package/dist/app/charts/hooks/InteractionProvider.js +60 -0
  91. package/dist/app/charts/hooks/InteractionProvider.js.map +1 -0
  92. package/dist/app/charts/hooks/PlotDimensionsProvider.d.ts +16 -0
  93. package/dist/app/charts/hooks/PlotDimensionsProvider.d.ts.map +1 -0
  94. package/dist/app/charts/hooks/PlotDimensionsProvider.js +76 -0
  95. package/dist/app/charts/hooks/PlotDimensionsProvider.js.map +1 -0
  96. package/dist/app/charts/hooks/defaultAxesValues.d.ts +11 -0
  97. package/dist/app/charts/hooks/defaultAxesValues.d.ts.map +1 -0
  98. package/dist/app/charts/hooks/defaultAxesValues.js +36 -0
  99. package/dist/app/charts/hooks/defaultAxesValues.js.map +1 -0
  100. package/dist/app/charts/hooks/defaultMouseValues.d.ts +9 -0
  101. package/dist/app/charts/hooks/defaultMouseValues.d.ts.map +1 -0
  102. package/dist/app/charts/hooks/defaultMouseValues.js +23 -0
  103. package/dist/app/charts/hooks/defaultMouseValues.js.map +1 -0
  104. package/dist/app/charts/hooks/defaultPlotDimensions.d.ts +13 -0
  105. package/dist/app/charts/hooks/defaultPlotDimensions.d.ts.map +1 -0
  106. package/dist/app/charts/hooks/defaultPlotDimensions.js +23 -0
  107. package/dist/app/charts/hooks/defaultPlotDimensions.js.map +1 -0
  108. package/dist/app/charts/hooks/defaultTooltipValues.d.ts +9 -0
  109. package/dist/app/charts/hooks/defaultTooltipValues.d.ts.map +1 -0
  110. package/dist/app/charts/hooks/defaultTooltipValues.js +21 -0
  111. package/dist/app/charts/hooks/defaultTooltipValues.js.map +1 -0
  112. package/dist/app/charts/hooks/defaultUseChartValues.d.ts +14 -0
  113. package/dist/app/charts/hooks/defaultUseChartValues.d.ts.map +1 -0
  114. package/dist/app/charts/hooks/defaultUseChartValues.js +30 -0
  115. package/dist/app/charts/hooks/defaultUseChartValues.js.map +1 -0
  116. package/dist/app/charts/hooks/useAxes.d.ts +49 -36
  117. package/dist/app/charts/hooks/useAxes.d.ts.map +1 -0
  118. package/dist/app/charts/hooks/useAxes.js +16 -176
  119. package/dist/app/charts/hooks/useAxes.js.map +1 -1
  120. package/dist/app/charts/hooks/useCanvasSurface.d.ts +25 -0
  121. package/dist/app/charts/hooks/useCanvasSurface.d.ts.map +1 -0
  122. package/dist/app/charts/hooks/useCanvasSurface.js +18 -0
  123. package/dist/app/charts/hooks/useCanvasSurface.js.map +1 -0
  124. package/dist/app/charts/hooks/useChart.d.ts +30 -44
  125. package/dist/app/charts/hooks/useChart.d.ts.map +1 -0
  126. package/dist/app/charts/hooks/useChart.js +26 -48
  127. package/dist/app/charts/hooks/useChart.js.map +1 -1
  128. package/dist/app/charts/hooks/useDataSource.d.ts +68 -0
  129. package/dist/app/charts/hooks/useDataSource.d.ts.map +1 -0
  130. package/dist/app/charts/hooks/useDataSource.js +63 -0
  131. package/dist/app/charts/hooks/useDataSource.js.map +1 -0
  132. package/dist/app/charts/hooks/useHoveredSeries.d.ts +25 -0
  133. package/dist/app/charts/hooks/useHoveredSeries.d.ts.map +1 -0
  134. package/dist/app/charts/hooks/useHoveredSeries.js +15 -0
  135. package/dist/app/charts/hooks/useHoveredSeries.js.map +1 -0
  136. package/dist/app/charts/hooks/useMouse.d.ts +46 -22
  137. package/dist/app/charts/hooks/useMouse.d.ts.map +1 -0
  138. package/dist/app/charts/hooks/useMouse.js +12 -56
  139. package/dist/app/charts/hooks/useMouse.js.map +1 -1
  140. package/dist/app/charts/hooks/usePlotDimensions.d.ts +25 -13
  141. package/dist/app/charts/hooks/usePlotDimensions.d.ts.map +1 -0
  142. package/dist/app/charts/hooks/usePlotDimensions.js +6 -62
  143. package/dist/app/charts/hooks/usePlotDimensions.js.map +1 -1
  144. package/dist/app/charts/hooks/useTooltip.d.ts +24 -26
  145. package/dist/app/charts/hooks/useTooltip.d.ts.map +1 -0
  146. package/dist/app/charts/hooks/useTooltip.js +12 -42
  147. package/dist/app/charts/hooks/useTooltip.js.map +1 -1
  148. package/dist/app/charts/index.d.ts +66 -0
  149. package/dist/app/charts/index.d.ts.map +1 -0
  150. package/dist/app/charts/index.js +87 -0
  151. package/dist/app/charts/index.js.map +1 -0
  152. package/dist/app/charts/legends/Legend.d.ts +33 -12
  153. package/dist/app/charts/legends/Legend.d.ts.map +1 -0
  154. package/dist/app/charts/legends/Legend.js +138 -379
  155. package/dist/app/charts/legends/Legend.js.map +1 -1
  156. package/dist/app/charts/legends/constants.d.ts +19 -0
  157. package/dist/app/charts/legends/constants.d.ts.map +1 -0
  158. package/dist/app/charts/legends/constants.js +34 -0
  159. package/dist/app/charts/legends/constants.js.map +1 -0
  160. package/dist/app/charts/observables/ChartData.d.ts +1 -0
  161. package/dist/app/charts/observables/ChartData.d.ts.map +1 -0
  162. package/dist/app/charts/observables/iterates.d.ts +13 -7
  163. package/dist/app/charts/observables/iterates.d.ts.map +1 -0
  164. package/dist/app/charts/observables/iterates.js +42 -9
  165. package/dist/app/charts/observables/iterates.js.map +1 -1
  166. package/dist/app/charts/observables/ordinals.d.ts +70 -12
  167. package/dist/app/charts/observables/ordinals.d.ts.map +1 -0
  168. package/dist/app/charts/observables/ordinals.js +127 -48
  169. package/dist/app/charts/observables/ordinals.js.map +1 -1
  170. package/dist/app/charts/observables/outliers.d.ts +18 -0
  171. package/dist/app/charts/observables/outliers.d.ts.map +1 -0
  172. package/dist/app/charts/observables/outliers.js +2 -0
  173. package/dist/app/charts/observables/outliers.js.map +1 -0
  174. package/dist/app/charts/plots/BarPlot.d.ts +87 -13
  175. package/dist/app/charts/plots/BarPlot.d.ts.map +1 -0
  176. package/dist/app/charts/plots/BarPlot.js +603 -356
  177. package/dist/app/charts/plots/BarPlot.js.map +1 -1
  178. package/dist/app/charts/plots/OutlierPlot.d.ts +123 -0
  179. package/dist/app/charts/plots/OutlierPlot.d.ts.map +1 -0
  180. package/dist/app/charts/plots/OutlierPlot.js +430 -0
  181. package/dist/app/charts/plots/OutlierPlot.js.map +1 -0
  182. package/dist/app/charts/plots/PoincarePlot.d.ts +92 -14
  183. package/dist/app/charts/plots/PoincarePlot.d.ts.map +1 -0
  184. package/dist/app/charts/plots/PoincarePlot.js +523 -364
  185. package/dist/app/charts/plots/PoincarePlot.js.map +1 -1
  186. package/dist/app/charts/plots/RasterPlot.d.ts +31 -10
  187. package/dist/app/charts/plots/RasterPlot.d.ts.map +1 -0
  188. package/dist/app/charts/plots/RasterPlot.js +198 -306
  189. package/dist/app/charts/plots/RasterPlot.js.map +1 -1
  190. package/dist/app/charts/plots/ScatterPlot.d.ts +77 -21
  191. package/dist/app/charts/plots/ScatterPlot.d.ts.map +1 -0
  192. package/dist/app/charts/plots/ScatterPlot.js +359 -302
  193. package/dist/app/charts/plots/ScatterPlot.js.map +1 -1
  194. package/dist/app/charts/plots/autoScaleYAxes.d.ts +43 -0
  195. package/dist/app/charts/plots/autoScaleYAxes.d.ts.map +1 -0
  196. package/dist/app/charts/plots/autoScaleYAxes.js +71 -0
  197. package/dist/app/charts/plots/autoScaleYAxes.js.map +1 -0
  198. package/dist/app/charts/plots/colorizedLine.d.ts +61 -0
  199. package/dist/app/charts/plots/colorizedLine.d.ts.map +1 -0
  200. package/dist/app/charts/plots/colorizedLine.js +157 -0
  201. package/dist/app/charts/plots/colorizedLine.js.map +1 -0
  202. package/dist/app/charts/plots/constants.d.ts +7 -0
  203. package/dist/app/charts/plots/constants.d.ts.map +1 -0
  204. package/dist/app/charts/plots/constants.js +11 -0
  205. package/dist/app/charts/plots/constants.js.map +1 -0
  206. package/dist/app/charts/plots/hitTesting.d.ts +88 -0
  207. package/dist/app/charts/plots/hitTesting.d.ts.map +1 -0
  208. package/dist/app/charts/plots/hitTesting.js +136 -0
  209. package/dist/app/charts/plots/hitTesting.js.map +1 -0
  210. package/dist/app/charts/plots/plot.d.ts +52 -16
  211. package/dist/app/charts/plots/plot.d.ts.map +1 -0
  212. package/dist/app/charts/plots/plot.js +108 -35
  213. package/dist/app/charts/plots/plot.js.map +1 -1
  214. package/dist/app/charts/plots/useCanvasZoomPan.d.ts +119 -0
  215. package/dist/app/charts/plots/useCanvasZoomPan.d.ts.map +1 -0
  216. package/dist/app/charts/plots/useCanvasZoomPan.js +113 -0
  217. package/dist/app/charts/plots/useCanvasZoomPan.js.map +1 -0
  218. package/dist/app/charts/plots/useStreamingTimeAxes.d.ts +103 -0
  219. package/dist/app/charts/plots/useStreamingTimeAxes.d.ts.map +1 -0
  220. package/dist/app/charts/plots/useStreamingTimeAxes.js +257 -0
  221. package/dist/app/charts/plots/useStreamingTimeAxes.js.map +1 -0
  222. package/dist/app/charts/series/baseSeries.d.ts +60 -8
  223. package/dist/app/charts/series/baseSeries.d.ts.map +1 -0
  224. package/dist/app/charts/series/baseSeries.js +53 -8
  225. package/dist/app/charts/series/baseSeries.js.map +1 -1
  226. package/dist/app/charts/series/iterateSeries.d.ts +9 -8
  227. package/dist/app/charts/series/iterateSeries.d.ts.map +1 -0
  228. package/dist/app/charts/series/iterateSeries.js +7 -7
  229. package/dist/app/charts/series/iterateSeries.js.map +1 -1
  230. package/dist/app/charts/series/ordinalSeries.d.ts +27 -13
  231. package/dist/app/charts/series/ordinalSeries.d.ts.map +1 -0
  232. package/dist/app/charts/series/ordinalSeries.js +29 -15
  233. package/dist/app/charts/series/ordinalSeries.js.map +1 -1
  234. package/dist/app/charts/series/outlierSeries.d.ts +142 -0
  235. package/dist/app/charts/series/outlierSeries.d.ts.map +1 -0
  236. package/dist/app/charts/series/outlierSeries.js +82 -0
  237. package/dist/app/charts/series/outlierSeries.js.map +1 -0
  238. package/dist/app/charts/series/timeSeries.d.ts +13 -9
  239. package/dist/app/charts/series/timeSeries.d.ts.map +1 -0
  240. package/dist/app/charts/series/timeSeries.js +6 -3
  241. package/dist/app/charts/series/timeSeries.js.map +1 -1
  242. package/dist/app/charts/series/timeSeriesChartData.d.ts +18 -10
  243. package/dist/app/charts/series/timeSeriesChartData.d.ts.map +1 -0
  244. package/dist/app/charts/series/timeSeriesChartData.js +28 -14
  245. package/dist/app/charts/series/timeSeriesChartData.js.map +1 -1
  246. package/dist/app/charts/styling/barPlotStyle.d.ts +46 -2
  247. package/dist/app/charts/styling/barPlotStyle.d.ts.map +1 -0
  248. package/dist/app/charts/styling/barPlotStyle.js +37 -3
  249. package/dist/app/charts/styling/barPlotStyle.js.map +1 -1
  250. package/dist/app/charts/styling/canvasStyle.d.ts +53 -0
  251. package/dist/app/charts/styling/canvasStyle.d.ts.map +1 -0
  252. package/dist/app/charts/styling/canvasStyle.js +71 -0
  253. package/dist/app/charts/styling/canvasStyle.js.map +1 -0
  254. package/dist/app/charts/styling/margins.d.ts +21 -2
  255. package/dist/app/charts/styling/margins.d.ts.map +1 -0
  256. package/dist/app/charts/styling/margins.js +25 -4
  257. package/dist/app/charts/styling/margins.js.map +1 -1
  258. package/dist/app/charts/styling/svgStyle.d.ts +10 -56
  259. package/dist/app/charts/styling/svgStyle.d.ts.map +1 -0
  260. package/dist/app/charts/styling/svgStyle.js +3 -78
  261. package/dist/app/charts/styling/svgStyle.js.map +1 -1
  262. package/dist/app/charts/subscriptions/viewDrivers.d.ts +124 -0
  263. package/dist/app/charts/subscriptions/viewDrivers.d.ts.map +1 -0
  264. package/dist/app/charts/subscriptions/viewDrivers.js +338 -0
  265. package/dist/app/charts/subscriptions/viewDrivers.js.map +1 -0
  266. package/dist/app/charts/tooltips/BarPlotTooltipContent.d.ts +12 -78
  267. package/dist/app/charts/tooltips/BarPlotTooltipContent.d.ts.map +1 -0
  268. package/dist/app/charts/tooltips/BarPlotTooltipContent.js +65 -257
  269. package/dist/app/charts/tooltips/BarPlotTooltipContent.js.map +1 -1
  270. package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.d.ts +9 -0
  271. package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.d.ts.map +1 -0
  272. package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.js +16 -0
  273. package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.js.map +1 -0
  274. package/dist/app/charts/tooltips/OutlierPlotTooltipContent.d.ts +30 -0
  275. package/dist/app/charts/tooltips/OutlierPlotTooltipContent.d.ts.map +1 -0
  276. package/dist/app/charts/tooltips/OutlierPlotTooltipContent.js +26 -0
  277. package/dist/app/charts/tooltips/OutlierPlotTooltipContent.js.map +1 -0
  278. package/dist/app/charts/tooltips/PoincarePlotTooltipContent.d.ts +22 -72
  279. package/dist/app/charts/tooltips/PoincarePlotTooltipContent.d.ts.map +1 -0
  280. package/dist/app/charts/tooltips/PoincarePlotTooltipContent.js +104 -171
  281. package/dist/app/charts/tooltips/PoincarePlotTooltipContent.js.map +1 -1
  282. package/dist/app/charts/tooltips/RasterPlotTooltipContent.d.ts +32 -8
  283. package/dist/app/charts/tooltips/RasterPlotTooltipContent.d.ts.map +1 -0
  284. package/dist/app/charts/tooltips/RasterPlotTooltipContent.js +62 -115
  285. package/dist/app/charts/tooltips/RasterPlotTooltipContent.js.map +1 -1
  286. package/dist/app/charts/tooltips/ScatterPlotTooltipContent.d.ts +39 -12
  287. package/dist/app/charts/tooltips/ScatterPlotTooltipContent.d.ts.map +1 -0
  288. package/dist/app/charts/tooltips/ScatterPlotTooltipContent.js +162 -134
  289. package/dist/app/charts/tooltips/ScatterPlotTooltipContent.js.map +1 -1
  290. package/dist/app/charts/tooltips/Tooltip.d.ts +27 -32
  291. package/dist/app/charts/tooltips/Tooltip.d.ts.map +1 -0
  292. package/dist/app/charts/tooltips/Tooltip.js +37 -81
  293. package/dist/app/charts/tooltips/Tooltip.js.map +1 -1
  294. package/dist/app/charts/tooltips/TooltipContent.d.ts +81 -0
  295. package/dist/app/charts/tooltips/TooltipContent.d.ts.map +1 -0
  296. package/dist/app/charts/tooltips/TooltipContent.js +99 -0
  297. package/dist/app/charts/tooltips/TooltipContent.js.map +1 -0
  298. package/dist/app/charts/tooltips/tooltipUtils.d.ts +186 -36
  299. package/dist/app/charts/tooltips/tooltipUtils.d.ts.map +1 -0
  300. package/dist/app/charts/tooltips/tooltipUtils.js +277 -48
  301. package/dist/app/charts/tooltips/tooltipUtils.js.map +1 -1
  302. package/dist/app/charts/tooltips/useOutlierTooltip.d.ts +59 -0
  303. package/dist/app/charts/tooltips/useOutlierTooltip.d.ts.map +1 -0
  304. package/dist/app/charts/tooltips/useOutlierTooltip.js +16 -0
  305. package/dist/app/charts/tooltips/useOutlierTooltip.js.map +1 -0
  306. package/dist/app/charts/tooltips/useTooltipPlacement.d.ts +51 -0
  307. package/dist/app/charts/tooltips/useTooltipPlacement.d.ts.map +1 -0
  308. package/dist/app/charts/tooltips/useTooltipPlacement.js +52 -0
  309. package/dist/app/charts/tooltips/useTooltipPlacement.js.map +1 -0
  310. package/dist/app/charts/tooltips/useTooltipStyle.d.ts +11 -0
  311. package/dist/app/charts/tooltips/useTooltipStyle.d.ts.map +1 -0
  312. package/dist/app/charts/tooltips/useTooltipStyle.js +14 -0
  313. package/dist/app/charts/tooltips/useTooltipStyle.js.map +1 -0
  314. package/dist/app/charts/trackers/Tracker.d.ts +22 -6
  315. package/dist/app/charts/trackers/Tracker.d.ts.map +1 -0
  316. package/dist/app/charts/trackers/Tracker.js +36 -22
  317. package/dist/app/charts/trackers/Tracker.js.map +1 -1
  318. package/dist/app/charts/trackers/trackerUtils.d.ts +40 -18
  319. package/dist/app/charts/trackers/trackerUtils.d.ts.map +1 -0
  320. package/dist/app/charts/trackers/trackerUtils.js +213 -300
  321. package/dist/app/charts/trackers/trackerUtils.js.map +1 -1
  322. package/dist/app/charts/utils.d.ts +72 -33
  323. package/dist/app/charts/utils.d.ts.map +1 -0
  324. package/dist/app/charts/utils.js +87 -42
  325. package/dist/app/charts/utils.js.map +1 -1
  326. package/dist/index.d.ts +2 -45
  327. package/dist/index.d.ts.map +1 -0
  328. package/dist/index.js +2 -72
  329. package/dist/index.js.map +1 -1
  330. package/package.json +87 -46
  331. package/src/app/charts/Chart.tsx +132 -168
  332. package/src/app/charts/axes/AxesState.ts +27 -29
  333. package/src/app/charts/axes/AxisInterval.ts +57 -32
  334. package/src/app/charts/axes/BaseAxisRange.ts +47 -27
  335. package/src/app/charts/axes/ContinuousAxis.tsx +235 -39
  336. package/src/app/charts/axes/ContinuousAxisRange.ts +29 -11
  337. package/src/app/charts/axes/EmptyAxis.tsx +52 -17
  338. package/src/app/charts/axes/OrdinalAxis.tsx +54 -28
  339. package/src/app/charts/axes/OrdinalAxisRange.ts +96 -16
  340. package/src/app/charts/axes/autoScale.ts +244 -0
  341. package/src/app/charts/axes/axes.ts +954 -735
  342. package/src/app/charts/d3types.ts +42 -13
  343. package/src/app/charts/datasources/StreamingDataSource.ts +214 -0
  344. package/src/app/charts/datasources/iteratesDataSource.ts +122 -0
  345. package/src/app/charts/datasources/ordinalDataSource.ts +205 -0
  346. package/src/app/charts/datasources/outlierDataSource.ts +90 -0
  347. package/src/app/charts/datasources/timeSeriesDataSource.ts +133 -0
  348. package/src/app/charts/filters/regexFilter.ts +45 -5
  349. package/src/app/charts/hooks/AxesProvider.tsx +301 -0
  350. package/src/app/charts/hooks/CanvasSurfaceProvider.tsx +117 -0
  351. package/src/app/charts/hooks/ChartProvider.tsx +79 -0
  352. package/src/app/charts/hooks/InteractionProvider.tsx +88 -0
  353. package/src/app/charts/hooks/PlotDimensionsProvider.tsx +109 -0
  354. package/src/app/charts/hooks/defaultAxesValues.ts +40 -0
  355. package/src/app/charts/hooks/defaultMouseValues.ts +24 -0
  356. package/src/app/charts/hooks/defaultPlotDimensions.ts +27 -0
  357. package/src/app/charts/hooks/defaultTooltipValues.tsx +23 -0
  358. package/src/app/charts/hooks/defaultUseChartValues.tsx +36 -0
  359. package/src/app/charts/hooks/useAxes.tsx +60 -228
  360. package/src/app/charts/hooks/useCanvasSurface.tsx +35 -0
  361. package/src/app/charts/hooks/useChart.tsx +47 -106
  362. package/src/app/charts/hooks/useDataSource.tsx +106 -0
  363. package/src/app/charts/hooks/useHoveredSeries.tsx +33 -0
  364. package/src/app/charts/hooks/useMouse.tsx +58 -82
  365. package/src/app/charts/hooks/usePlotDimensions.tsx +25 -89
  366. package/src/app/charts/hooks/useTooltip.tsx +32 -63
  367. package/src/app/charts/index.ts +213 -0
  368. package/src/app/charts/legends/Legend.tsx +198 -479
  369. package/src/app/charts/legends/constants.ts +37 -0
  370. package/src/app/charts/observables/iterates.ts +32 -12
  371. package/src/app/charts/observables/ordinals.ts +141 -67
  372. package/src/app/charts/observables/outliers.ts +20 -0
  373. package/src/app/charts/plots/BarPlot.tsx +784 -666
  374. package/src/app/charts/plots/OutlierPlot.tsx +685 -0
  375. package/src/app/charts/plots/PoincarePlot.tsx +707 -489
  376. package/src/app/charts/plots/RasterPlot.tsx +253 -445
  377. package/src/app/charts/plots/ScatterPlot.tsx +480 -463
  378. package/src/app/charts/plots/autoScaleYAxes.ts +102 -0
  379. package/src/app/charts/plots/colorizedLine.ts +185 -0
  380. package/src/app/charts/plots/constants.ts +16 -0
  381. package/src/app/charts/plots/hitTesting.ts +198 -0
  382. package/src/app/charts/plots/plot.ts +138 -44
  383. package/src/app/charts/plots/useCanvasZoomPan.ts +240 -0
  384. package/src/app/charts/plots/useStreamingTimeAxes.ts +384 -0
  385. package/src/app/charts/series/baseSeries.ts +81 -14
  386. package/src/app/charts/series/iterateSeries.ts +8 -8
  387. package/src/app/charts/series/ordinalSeries.ts +35 -20
  388. package/src/app/charts/series/outlierSeries.ts +188 -0
  389. package/src/app/charts/series/timeSeries.ts +14 -12
  390. package/src/app/charts/series/timeSeriesChartData.ts +31 -17
  391. package/src/app/charts/styling/barPlotStyle.ts +48 -5
  392. package/src/app/charts/styling/canvasStyle.ts +86 -0
  393. package/src/app/charts/styling/margins.ts +28 -4
  394. package/src/app/charts/styling/svgStyle.ts +10 -91
  395. package/src/app/charts/subscriptions/viewDrivers.ts +447 -0
  396. package/src/app/charts/tooltips/BarPlotTooltipContent.tsx +156 -380
  397. package/src/app/charts/tooltips/DefaultOutlierTooltipContent.tsx +40 -0
  398. package/src/app/charts/tooltips/OutlierPlotTooltipContent.tsx +67 -0
  399. package/src/app/charts/tooltips/PoincarePlotTooltipContent.tsx +229 -292
  400. package/src/app/charts/tooltips/RasterPlotTooltipContent.tsx +164 -217
  401. package/src/app/charts/tooltips/ScatterPlotTooltipContent.tsx +373 -236
  402. package/src/app/charts/tooltips/Tooltip.tsx +58 -124
  403. package/src/app/charts/tooltips/TooltipContent.tsx +177 -0
  404. package/src/app/charts/tooltips/tooltipUtils.ts +359 -61
  405. package/src/app/charts/tooltips/useOutlierTooltip.tsx +68 -0
  406. package/src/app/charts/tooltips/useTooltipPlacement.ts +86 -0
  407. package/src/app/charts/tooltips/useTooltipStyle.ts +15 -0
  408. package/src/app/charts/trackers/Tracker.tsx +68 -33
  409. package/src/app/charts/trackers/trackerUtils.ts +263 -376
  410. package/src/app/charts/utils.ts +90 -48
  411. package/src/index.ts +2 -322
  412. package/dist/app/charts/axes/AxesState.test.d.ts +0 -1
  413. package/dist/app/charts/axes/AxesState.test.js +0 -30
  414. package/dist/app/charts/axes/AxesState.test.js.map +0 -1
  415. package/dist/app/charts/axes/AxisInterval.test.d.ts +0 -1
  416. package/dist/app/charts/axes/AxisInterval.test.js +0 -120
  417. package/dist/app/charts/axes/AxisInterval.test.js.map +0 -1
  418. package/dist/app/charts/axes/ContinuousAxisRange.test.d.ts +0 -1
  419. package/dist/app/charts/axes/ContinuousAxisRange.test.js +0 -47
  420. package/dist/app/charts/axes/ContinuousAxisRange.test.js.map +0 -1
  421. package/dist/app/charts/axes/OrdinalAxisRange.test.d.ts +0 -1
  422. package/dist/app/charts/axes/OrdinalAxisRange.test.js +0 -48
  423. package/dist/app/charts/axes/OrdinalAxisRange.test.js.map +0 -1
  424. package/dist/app/charts/filters/regexFilter.test.d.ts +0 -1
  425. package/dist/app/charts/filters/regexFilter.test.js +0 -11
  426. package/dist/app/charts/filters/regexFilter.test.js.map +0 -1
  427. package/dist/app/charts/hooks/useDataObservable.d.ts +0 -72
  428. package/dist/app/charts/hooks/useDataObservable.js +0 -74
  429. package/dist/app/charts/hooks/useDataObservable.js.map +0 -1
  430. package/dist/app/charts/hooks/useInitialData.d.ts +0 -36
  431. package/dist/app/charts/hooks/useInitialData.js +0 -28
  432. package/dist/app/charts/hooks/useInitialData.js.map +0 -1
  433. package/dist/app/charts/observables/iterates.test.d.ts +0 -1
  434. package/dist/app/charts/observables/iterates.test.js +0 -180
  435. package/dist/app/charts/observables/iterates.test.js.map +0 -1
  436. package/dist/app/charts/observables/ordinals.test.d.ts +0 -1
  437. package/dist/app/charts/observables/ordinals.test.js +0 -102
  438. package/dist/app/charts/observables/ordinals.test.js.map +0 -1
  439. package/dist/app/charts/series/datumSeries.test.d.ts +0 -1
  440. package/dist/app/charts/series/datumSeries.test.js +0 -50
  441. package/dist/app/charts/series/datumSeries.test.js.map +0 -1
  442. package/dist/app/charts/styling/margins.test.d.ts +0 -1
  443. package/dist/app/charts/styling/margins.test.js +0 -19
  444. package/dist/app/charts/styling/margins.test.js.map +0 -1
  445. package/dist/app/charts/subscriptions/subscription.test.d.ts +0 -1
  446. package/dist/app/charts/subscriptions/subscription.test.js +0 -395
  447. package/dist/app/charts/subscriptions/subscription.test.js.map +0 -1
  448. package/dist/app/charts/subscriptions/subscriptions.d.ts +0 -100
  449. package/dist/app/charts/subscriptions/subscriptions.js +0 -449
  450. package/dist/app/charts/subscriptions/subscriptions.js.map +0 -1
  451. package/src/app/charts/axes/AxesState.test.ts +0 -34
  452. package/src/app/charts/axes/AxisInterval.test.ts +0 -143
  453. package/src/app/charts/axes/ContinuousAxisRange.test.ts +0 -55
  454. package/src/app/charts/axes/OrdinalAxisRange.test.ts +0 -55
  455. package/src/app/charts/filters/regexFilter.test.ts +0 -13
  456. package/src/app/charts/hooks/useDataObservable.tsx +0 -170
  457. package/src/app/charts/hooks/useInitialData.tsx +0 -64
  458. package/src/app/charts/observables/iterates.test.ts +0 -201
  459. package/src/app/charts/observables/ordinals.test.ts +0 -135
  460. package/src/app/charts/series/datumSeries.test.ts +0 -60
  461. package/src/app/charts/styling/margins.test.ts +0 -22
  462. package/src/app/charts/subscriptions/subscription.test.ts +0 -499
  463. package/src/app/charts/subscriptions/subscriptions.ts +0 -635
@@ -1,15 +1,28 @@
1
- import { boundingPoints, defaultTooltipStyle, tooltipX, tooltipY } from "./tooltipUtils";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import * as d3 from "d3";
3
- import { formatTime, formatTimeChange, formatValue, formatValueChange } from "../utils";
4
- import { useEffect, useMemo } from "react";
5
- import { useChart } from "../hooks/useChart";
6
- import { usePlotDimensions } from "../hooks/usePlotDimensions";
3
+ import { autocorrelation, boundingPoints, sparklineFor, seriesStatistics, valueOrMissing } from "./tooltipUtils";
4
+ import { TooltipContent } from "./TooltipContent";
5
+ import { formatNumber, formatTime, formatTimeChange, formatValue, formatValueChange } from "../utils";
7
6
  import { emptyDatum } from "../series/timeSeries";
7
+ // the size of the autocorrelation's sparkline (its plot area, without the axes' labels)
8
+ const SPARKLINE_WIDTH = 180;
9
+ const SPARKLINE_HEIGHT = 48;
10
+ // the space around the sparkline's line, within its plot area
11
+ const SPARKLINE_PADDING = 2;
12
+ // the space around the sparkline's plot area for the axes: their ticks and labels (the y-axis'
13
+ // on the left; the x-axis' below, with its "lag" caption to the right of its end)
14
+ const AXES_MARGIN = { left: 24, right: 22, top: 4, bottom: 14 };
15
+ // the length of the axes' ticks
16
+ const TICK_LENGTH = 3;
17
+ // the (most) ticks on the x-axis (the lags)
18
+ const LAG_TICK_COUNT = 5;
8
19
  /**
9
- * Adds tooltip content as a table. The columns of the table are the "label", the value before
10
- * the mouse cursor, then value after the mouse cursor, and the difference between the two values.
11
- * The rows of the table are x-values for the first row, and the y-values for the second row.
12
- * The table has the following form.
20
+ * Adds tooltip content as a table, whose rows are the x-values and the y-values, and whose
21
+ * columns depend on where the mouse is over the series (as the plot reports it, see
22
+ * `ScatterTooltipMetadata` -- the plot also highlights the same points):
23
+ *
24
+ * When the mouse is over a line segment, the points before and after the mouse, and the
25
+ * difference between them:
13
26
  * ```
14
27
  * series name
15
28
  * before after ∆
@@ -17,139 +30,154 @@ import { emptyDatum } from "../series/timeSeries";
17
30
  * y-label y_tb y_ta y_ta - y_tb
18
31
  * ```
19
32
  *
20
- * Registers the tooltip-content provider with the `ChartContext` so that when d3 fires a mouse-over
21
- * event on a series. The content provider is returns the {@link addTooltipContent} function
22
- * when called. And when called the {@link addTooltipContent} function adds the actual tooltip
23
- * content to the SVG element.
33
+ * When the mouse is directly over a data point, that point (in bold), and the points before and
34
+ * after it:
35
+ * ```
36
+ * series name
37
+ * before point after
38
+ * x-label x_b x_p x_a
39
+ * y-label y_b y_p y_a
40
+ * ```
41
+ * A point that doesn't exist (e.g. before the series' first point) shows a dash.
42
+ *
43
+ * Below the table, the statistics of the series' points in the window of data the chart holds:
44
+ * their count, the mean and (sample) standard deviation of their values, and the mean time
45
+ * between consecutive points. And below that, a sparkline of the autocorrelation of their values,
46
+ * by lag (in points, from 0 on the left), drawn from -1 (bottom) to 1 (top): with a y-axis (ticks
47
+ * at -1, 0, and 1), and an x-axis along the (dashed) zero line, with ticks at round lags, captioned
48
+ * "lag" (just to the right of the axis' end).
49
+ *
50
+ * Built on {@link TooltipContent}; put it inside a {@link Tooltip}.
24
51
  * @param props The properties describing the tooltip content
25
- * @return null
52
+ * @return The tooltip's portal, or `null` when nothing is being hovered
26
53
  */
27
54
  export function ScatterPlotTooltipContent(props) {
28
- const { chartId, container, tooltip } = useChart();
29
- const { registerTooltipContentProvider } = tooltip;
30
- const { margin, plotDimensions } = usePlotDimensions();
31
- const { xLabel, yLabel, beforeHeader = 'before', afterHeader = 'after', deltaHeader = '∆', xValueFormatter = formatTime, yValueFormatter = formatValue, xChangeFormatter = formatTimeChange, yChangeFormatter = formatValueChange, style, } = props;
32
- const tooltipStyle = useMemo(() => (Object.assign(Object.assign({}, defaultTooltipStyle), style)), [style]);
33
- // register the tooltip content provider, which when called on mouse-enter-series events
34
- // will render the tooltip container and then the tooltip content. recall that that the
35
- // tooltip content is generated in this plot (because this is the plot that holds all the
36
- // information needed to render it), and the container for the content is rendered by
37
- // the <Tooltip>, which this know nothing about.
38
- //
39
- // the 'registration function accepts a function of the form (seriesName, time, series) => TooltipDimensions.
40
- // and that function has a closure on the content-specific information needed to add the
41
- // actual content
42
- useEffect(() => {
43
- if (container) {
44
- // assemble the options for adding the tooltip
45
- const options = {
46
- labels: { x: xLabel, y: yLabel },
47
- headers: { before: beforeHeader, after: afterHeader, delta: deltaHeader },
48
- formatters: {
49
- x: { value: xValueFormatter, change: xChangeFormatter },
50
- y: { value: yValueFormatter, change: yChangeFormatter },
51
- }
52
- };
53
- // register the tooltip content provider function with the chart hook (useChart) so that
54
- // it is visible to all children of the Chart (i.e. the <Tooltip>).
55
- registerTooltipContentProvider((seriesName, time, tooltipData, mouseCoords) => addTooltipContent(seriesName, time, tooltipData.series, mouseCoords, chartId, container, margin, plotDimensions, tooltipStyle, options));
55
+ const { xLabel, yLabel, beforeHeader = 'before', pointHeader = 'point', afterHeader = 'after', deltaHeader = '∆', xValueFormatter = formatTime, yValueFormatter = formatValue, xChangeFormatter = formatTimeChange, yChangeFormatter = formatValueChange, intervalFormatter = xValueFormatter, style, } = props;
56
+ const options = {
57
+ labels: { x: xLabel, y: yLabel },
58
+ headers: { before: beforeHeader, point: pointHeader, after: afterHeader, delta: deltaHeader },
59
+ formatters: {
60
+ x: { value: xValueFormatter, change: xChangeFormatter },
61
+ y: { value: yValueFormatter, change: yChangeFormatter },
56
62
  }
57
- }, [
58
- chartId, container, margin, plotDimensions, registerTooltipContentProvider,
59
- xLabel, xChangeFormatter, xValueFormatter,
60
- yLabel, yChangeFormatter, yValueFormatter,
61
- beforeHeader, afterHeader, deltaHeader,
62
- tooltipStyle
63
- ]);
64
- return null;
63
+ };
64
+ return (_jsx(TooltipContent, { style: style, capture: (seriesName, time, tooltipData) => captureTooltipContent(seriesName, time, tooltipData.series, tooltipData.metadata.points, options), children: (tooltipContent, tooltipStyle) => {
65
+ const cellStyle = { padding: '1px 8px', textAlign: 'right', border: 'none' };
66
+ const rowLabelStyle = { ...cellStyle, textAlign: 'left', paddingLeft: 0 };
67
+ // the point under the mouse stands out (as it does on the plot)
68
+ const cellStyleFor = (column) => column === tooltipContent.emphasizedColumn ?
69
+ { ...cellStyle, fontWeight: tooltipStyle.fontWeight + 650 } :
70
+ cellStyle;
71
+ return _jsxs(_Fragment, { children: [_jsx("div", { style: { fontSize: tooltipStyle.fontSize, fontWeight: tooltipStyle.fontWeight, marginBottom: 4 }, children: tooltipContent.seriesName }), _jsxs("table", { style: { fontSize: tooltipStyle.fontSize + 2, fontWeight: tooltipStyle.fontWeight + 150, borderCollapse: 'collapse', border: 'none' }, children: [_jsx("thead", { children: _jsxs("tr", { style: { fontWeight: tooltipStyle.fontWeight + 550 }, children: [_jsx("td", { style: rowLabelStyle }), tooltipContent.headers.map((header, column) => (_jsx("td", { style: cellStyleFor(column), children: header }, column)))] }) }), _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { style: rowLabelStyle, children: tooltipContent.xLabel }), tooltipContent.xValues.map((value, column) => (_jsx("td", { style: cellStyleFor(column), children: value }, column)))] }), _jsxs("tr", { children: [_jsx("td", { style: rowLabelStyle, children: tooltipContent.yLabel }), tooltipContent.yValues.map((value, column) => (_jsx("td", { style: cellStyleFor(column), children: value }, column)))] })] })] }), tooltipContent.statistics.count > 0 &&
72
+ _jsx("table", { style: { fontSize: tooltipStyle.fontSize, borderCollapse: 'collapse', border: 'none', marginTop: 6, width: 'auto' }, children: _jsx("tbody", { children: [
73
+ ['Points', formatNumber(tooltipContent.statistics.count, " ,.0f")],
74
+ ['Mean value', valueOrMissing(tooltipContent.statistics.meanValue, yValueFormatter)],
75
+ ['Std. deviation', valueOrMissing(tooltipContent.statistics.valueStandardDeviation, yValueFormatter)],
76
+ ['Mean interval', valueOrMissing(tooltipContent.statistics.meanInterval, intervalFormatter)],
77
+ ].map(([label, value]) => (_jsxs("tr", { children: [_jsx("td", { style: { padding: '1px 12px 1px 0', textAlign: 'left', border: 'none' }, children: label }), _jsx("td", { style: { padding: '1px 0', textAlign: 'right', border: 'none' }, children: value })] }, label))) }) }), tooltipContent.autocorrelation !== undefined && _jsxs(_Fragment, { children: [_jsx("div", { style: { fontSize: tooltipStyle.fontSize, marginTop: 8 }, children: "Autocorrelation" }), _jsx(AutocorrelationChart, { autocorrelation: tooltipContent.autocorrelation, color: tooltipStyle.fontColor, fontSize: tooltipStyle.fontSize - 3 })] })] });
78
+ } }));
65
79
  }
66
80
  /**
67
- * Callback function that adds tooltip content and returns the tooltip width and text height
81
+ * Captures the data needed to render the tooltip's content: the table of the points the tooltip
82
+ * shows, and the statistics and autocorrelation of the series' points.
68
83
  * @param seriesName The name of the series (i.e. the neuron ID)
69
84
  * @param time The time (x-coordinate value) corresponding to the mouse location
70
- * @param series The datum (t ms, s mV)
71
- * @param mouseCoords The coordinates of the mouse when the event was fired (relative to the plot container)
72
- * @param chartId The ID of this chart
73
- * @param container The plot container (SVGSVGElement)
74
- * @param margin The plot margins
75
- * @param tooltipStyle The style properties for the tooltip
76
- * @param plotDimensions The dimensions of the plot
77
- * @param options The options passed through the function that adds the tooltip content
78
- * @return The width and text height of the tooltip content
85
+ * @param series The series' data (the window of data the chart holds -- for the statistics too)
86
+ * @param points The points to show, as the plot determined them (see {@link scatterTooltipPoints});
87
+ * when `undefined`, the points on either side of the mouse's time are shown
88
+ * @param options The tooltip's labels, headers, and formatters
89
+ * @return The tooltip's content
90
+ */
91
+ function captureTooltipContent(seriesName, time, series, points, options) {
92
+ const { labels, headers, formatters } = options;
93
+ // the points to show, as determined by the plot -- or, when the plot doesn't say, the points on
94
+ // either side of the mouse's time
95
+ const shown = points !== null && points !== void 0 ? points : segmentAround(series, time);
96
+ // a value, or a dash for a point that doesn't exist (e.g. before the series' first point)
97
+ const valueOf = (datum, formatter, value) => datum === undefined ? MISSING_VALUE : formatter(value(datum));
98
+ const changeOf = (formatter, value) => shown.before === undefined || shown.after === undefined ?
99
+ MISSING_VALUE :
100
+ formatter(value(shown.before), value(shown.after));
101
+ const xOf = (datum) => datum.x;
102
+ const yOf = (datum) => datum.y;
103
+ return {
104
+ seriesName,
105
+ xLabel: labels.x,
106
+ yLabel: labels.y,
107
+ statistics: seriesStatistics(series),
108
+ autocorrelation: autocorrelationSparkline(series),
109
+ ...(shown.kind === 'point' ?
110
+ // directly over a point: the point before it, the point, and the point after it
111
+ {
112
+ headers: [headers.before, headers.point, headers.after],
113
+ xValues: [shown.before, shown.point, shown.after].map(datum => valueOf(datum, formatters.x.value, xOf)),
114
+ yValues: [shown.before, shown.point, shown.after].map(datum => valueOf(datum, formatters.y.value, yOf)),
115
+ emphasizedColumn: 1,
116
+ } :
117
+ // over a segment: the points on either side of the mouse, and the change between them
118
+ {
119
+ headers: [headers.before, headers.after, headers.delta],
120
+ xValues: [
121
+ valueOf(shown.before, formatters.x.value, xOf),
122
+ valueOf(shown.after, formatters.x.value, xOf),
123
+ changeOf(formatters.x.change, xOf)
124
+ ],
125
+ yValues: [
126
+ valueOf(shown.before, formatters.y.value, yOf),
127
+ valueOf(shown.after, formatters.y.value, yOf),
128
+ changeOf(formatters.y.change, yOf)
129
+ ],
130
+ })
131
+ };
132
+ }
133
+ // shown in place of the values of a point that doesn't exist (e.g. before the series' first point)
134
+ const MISSING_VALUE = '–';
135
+ /**
136
+ * The points on either side of the specified time (the segment it's on)
137
+ * @param series The series' data
138
+ * @param time The time
139
+ * @return The points before and after the time (undefined where there's none)
140
+ */
141
+ function segmentAround(series, time) {
142
+ const [before, after] = boundingPoints(series, time, value => value.x, () => emptyDatum());
143
+ const orUndefined = (datum) => isNaN(datum.x) ? undefined : datum;
144
+ return { kind: 'segment', before: orUndefined(before), after: orUndefined(after) };
145
+ }
146
+ /**
147
+ * The sparkline of the autocorrelation of a series' values (see {@link autocorrelation}): the lags
148
+ * run left to right across the width, and the correlations from -1 (at the bottom) to 1 (at the
149
+ * top), so that the zero line is at the middle
150
+ * @param series The series' data
151
+ * @return The sparkline, or `undefined` when there are too few points (or
152
+ * the values don't vary)
153
+ */
154
+ function autocorrelationSparkline(series) {
155
+ const correlations = autocorrelation(series);
156
+ if (correlations === undefined)
157
+ return undefined;
158
+ const sparkline = sparklineFor(correlations.map((value, lag) => ({ time: lag, value })), SPARKLINE_WIDTH, SPARKLINE_HEIGHT, SPARKLINE_PADDING, [-1, 1]);
159
+ return sparkline === undefined ? undefined : { sparkline, maxLag: correlations.length - 1 };
160
+ }
161
+ /**
162
+ * The autocorrelation's sparkline, with its axes: a y-axis on the left, with ticks (and labels) at
163
+ * -1, 0, and 1; and an x-axis along the dashed zero line, with ticks at round lags (labelled below
164
+ * the plot, out of the line's way), captioned "lag" just to the right of its end
165
+ * @param props The autocorrelation's sparkline (and largest lag), the color of the line and the
166
+ * axes, and the font size of the axes' labels
167
+ * @return The sparkline, with its axes
79
168
  */
80
- function addTooltipContent(seriesName, time, series, mouseCoords, chartId, container, margin, plotDimensions, tooltipStyle, options) {
81
- const { labels, formatters } = options;
82
- const [x, y] = mouseCoords;
83
- const [lower, upper] = boundingPoints(series, time, value => value.time, () => emptyDatum());
84
- // display the neuron ID in the tooltip
85
- const header = d3.select(container)
86
- .append("text")
87
- .attr('id', `tn${time}-${seriesName}-${chartId}`)
88
- .attr('class', 'tooltip')
89
- .attr('fill', tooltipStyle.fontColor)
90
- .attr('font-family', 'sans-serif')
91
- .attr('font-size', tooltipStyle.fontSize)
92
- .attr('font-weight', tooltipStyle.fontWeight)
93
- .attr('fill-opacity', tooltipStyle.borderOpacity)
94
- .text(() => seriesName);
95
- // create the table that shows the points that come before and after the mouse time, and the
96
- // changes in the time and value
97
- const table = d3.select(container)
98
- .append("g")
99
- .attr('id', `t${time}-${seriesName}-header-${chartId}`)
100
- .attr('class', 'tooltip')
101
- .attr('fill', tooltipStyle.fontColor)
102
- .attr('font-family', 'sans-serif')
103
- .attr('font-size', tooltipStyle.fontSize + 2)
104
- .attr('font-weight', tooltipStyle.fontWeight + 150)
105
- .attr('fill-opacity', tooltipStyle.borderOpacity);
106
- const headerRow = table.append('g').attr('font-weight', tooltipStyle.fontWeight + 550);
107
- const hrLower = headerRow.append("text").text(() => options.headers.before);
108
- const hrUpper = headerRow.append("text").text(() => options.headers.after);
109
- const hrDelta = headerRow.append("text").text(() => options.headers.delta);
110
- const trHeader = table.append("text").text(() => labels.x);
111
- const trLower = table.append("text").text(() => formatters.x.value(lower.time));
112
- const trUpper = table.append("text").text(() => formatters.x.value(upper.time));
113
- const trDelta = table.append("text").text(() => formatters.x.change(lower.time, upper.time));
114
- const vrHeader = table.append("text").text(() => labels.y);
115
- const vrLower = table.append("text").text(() => formatters.y.value(lower.value));
116
- const vrUpper = table.append("text").text(() => formatters.y.value(upper.value));
117
- const vrDelta = table.append("text").text(() => formatters.y.change(lower.value, upper.value));
118
- const textWidthOf = (elem) => { var _a, _b; return ((_b = (_a = elem.node()) === null || _a === void 0 ? void 0 : _a.getBBox()) === null || _b === void 0 ? void 0 : _b.width) || 0; };
119
- const textHeightOf = (elem) => { var _a, _b; return ((_b = (_a = elem.node()) === null || _a === void 0 ? void 0 : _a.getBBox()) === null || _b === void 0 ? void 0 : _b.height) || 0; };
120
- const spacesWidthFor = (spaces) => spaces * textWidthOf(hrLower) / 5;
121
- // calculate the max width and height of the text
122
- const tooltipWidth = Math.max(textWidthOf(header), spacesWidthFor(33));
123
- const headerTextHeight = textHeightOf(header);
124
- const headerRowHeight = textHeightOf(hrLower);
125
- const timeRowHeight = textHeightOf(trHeader);
126
- const valueRowHeight = textHeightOf(vrHeader);
127
- const textHeight = headerTextHeight + headerRowHeight + timeRowHeight + valueRowHeight;
128
- // set the header text location
129
- const xCoord = tooltipX(x, tooltipWidth, plotDimensions, tooltipStyle, margin);
130
- const yCoord = tooltipY(y, textHeight, plotDimensions, tooltipStyle, margin);
131
- const xTooltip = xCoord + tooltipStyle.paddingLeft;
132
- const yTooltip = yCoord + tooltipStyle.paddingTop;
133
- header
134
- .attr('x', () => xTooltip)
135
- .attr('y', () => yTooltip - (headerRowHeight + timeRowHeight + valueRowHeight) + textHeight);
136
- const hrRowY = yTooltip + headerTextHeight + headerRowHeight;
137
- const hrLowerX = spacesWidthFor(14);
138
- const hrUpperX = spacesWidthFor(24);
139
- const hrDeltaX = spacesWidthFor(32);
140
- hrLower.attr('x', () => xTooltip + hrLowerX - textWidthOf(hrLower)).attr('y', () => hrRowY);
141
- hrUpper.attr('x', () => xTooltip + hrUpperX - textWidthOf(hrUpper)).attr('y', () => hrRowY);
142
- hrDelta.attr('x', () => xTooltip + hrDeltaX - textWidthOf(hrDelta)).attr('y', () => hrRowY);
143
- const trRowY = hrRowY + timeRowHeight;
144
- trHeader.attr('x', () => xTooltip).attr('y', () => trRowY);
145
- trLower.attr('x', () => xTooltip + hrLowerX - textWidthOf(trLower)).attr('y', () => trRowY);
146
- trUpper.attr('x', () => xTooltip + hrUpperX - textWidthOf(trUpper)).attr('y', () => trRowY);
147
- trDelta.attr('x', () => xTooltip + hrDeltaX - textWidthOf(trDelta)).attr('y', () => trRowY);
148
- const vrRowY = trRowY + valueRowHeight;
149
- vrHeader.attr('x', () => xTooltip).attr('y', () => vrRowY);
150
- vrLower.attr('x', () => xTooltip + hrLowerX - textWidthOf(vrLower)).attr('y', () => vrRowY);
151
- vrUpper.attr('x', () => xTooltip + hrUpperX - textWidthOf(vrUpper)).attr('y', () => vrRowY);
152
- vrDelta.attr('x', () => xTooltip + hrDeltaX - textWidthOf(vrDelta)).attr('y', () => vrRowY);
153
- return { x: xCoord, y: yCoord, contentWidth: tooltipWidth, contentHeight: textHeight };
169
+ function AutocorrelationChart(props) {
170
+ const { autocorrelation: { sparkline, maxLag }, color, fontSize } = props;
171
+ // where a lag, and a correlation, are within the plot area (as `sparklineFor` places them)
172
+ const innerWidth = SPARKLINE_WIDTH - 2 * SPARKLINE_PADDING;
173
+ const innerHeight = SPARKLINE_HEIGHT - 2 * SPARKLINE_PADDING;
174
+ const xOf = (lag) => SPARKLINE_PADDING + lag / maxLag * innerWidth;
175
+ const yOf = (correlation) => SPARKLINE_PADDING + (1 - correlation) / 2 * innerHeight;
176
+ // (the y-axis sits just left of lag 0, so it doesn't cover the line's start)
177
+ const yAxisX = SPARKLINE_PADDING - TICK_LENGTH;
178
+ const lagTicks = d3.ticks(0, maxLag, Math.min(LAG_TICK_COUNT, maxLag)).filter(Number.isInteger);
179
+ const axisStyle = { stroke: color, strokeOpacity: 0.6, strokeWidth: 1 };
180
+ const labelStyle = { fill: color, fillOpacity: 0.8, fontSize };
181
+ return (_jsx("svg", { width: AXES_MARGIN.left + SPARKLINE_WIDTH + AXES_MARGIN.right, height: AXES_MARGIN.top + SPARKLINE_HEIGHT + AXES_MARGIN.bottom, style: { display: 'block', marginTop: 2 }, "aria-hidden": "true", children: _jsxs("g", { transform: `translate(${AXES_MARGIN.left}, ${AXES_MARGIN.top})`, children: [_jsx("line", { x1: yAxisX, y1: yOf(1), x2: yAxisX, y2: yOf(-1), ...axisStyle }), [-1, 0, 1].map(correlation => (_jsxs("g", { children: [_jsx("line", { x1: yAxisX - TICK_LENGTH, y1: yOf(correlation), x2: yAxisX, y2: yOf(correlation), ...axisStyle }), _jsx("text", { x: yAxisX - TICK_LENGTH - 2, y: yOf(correlation), textAnchor: "end", dominantBaseline: "middle", ...labelStyle, children: correlation })] }, correlation))), _jsx("line", { x1: yAxisX, y1: yOf(0), x2: xOf(maxLag), y2: yOf(0), ...axisStyle, strokeOpacity: 0.35, strokeDasharray: "2 2" }), lagTicks.map(lag => (_jsxs("g", { children: [_jsx("line", { x1: xOf(lag), y1: yOf(0) - TICK_LENGTH / 2, x2: xOf(lag), y2: yOf(0) + TICK_LENGTH / 2, ...axisStyle }), _jsx("text", { x: xOf(lag), y: SPARKLINE_HEIGHT + AXES_MARGIN.bottom - 3, textAnchor: "middle", ...labelStyle, children: lag })] }, lag))), _jsx("text", { x: xOf(maxLag) + TICK_LENGTH, y: yOf(0), textAnchor: "start", dominantBaseline: "middle", ...labelStyle, children: "lag" }), _jsx("path", { d: sparkline.path, fill: "none", stroke: color, strokeWidth: 1.25, strokeLinejoin: "round", strokeLinecap: "round" })] }) }));
154
182
  }
155
183
  //# sourceMappingURL=ScatterPlotTooltipContent.js.map
@@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EAAC,QAAQ,KACxC,UAAU,oBAGX,EACP,eACI,CAAC,EAAE,SAAS,CAAC,IAAI,EACjB,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,IAAI,EACjB,cAAc,EAAC,OAAO,EACtB,aAAa,EAAC,OAAO,GACvB,IACF,GACF,CACT,CAAA;AACL,CAAC"}
@@ -1,43 +1,38 @@
1
- import { JSX } from "react";
2
- import { TooltipStyle } from "./tooltipUtils";
3
- import { BaseAxis, SeriesStyle } from "../axes/axes";
1
+ import { type JSX } from "react";
2
+ import { type TooltipStyle } from "./tooltipUtils";
3
+ import type { BaseAxis, SeriesStyle } from "../axes/axes";
4
4
  import { BaseAxisRange } from "../axes/BaseAxisRange";
5
+ /**
6
+ * The properties of the {@link Tooltip}
7
+ */
5
8
  export interface Props {
9
+ /** whether the tooltip is shown when the mouse is over one of the plot's elements */
6
10
  visible: boolean;
11
+ /** the style of the tooltip (its box and text); its content can override parts of it */
7
12
  style?: Partial<TooltipStyle>;
13
+ /** the tooltip's content (e.g. a `<ScatterPlotTooltipContent>`, or your own, built on `<TooltipContent>`) */
8
14
  children: JSX.Element;
9
15
  }
10
16
  /**
11
- * Tooltip component triggered by mouse-over-series events. When mounted, the tooltip component
12
- * registers a mouse-over handler with the {@link useMouse} hook using the
13
- * {@link UseMouseValues.registerMouseOverHandler} function. The handler renders the tooltip
14
- * by adding it to the SVG plot container. However, to remain general, this {@link Tooltip} also
15
- * uses the {@link useTooltip}'s {@link UseTooltipValues.tooltipContentProvider} to render the actual
16
- * content of the tooltip. The content provider is given the series' name on which the mouse-over
17
- * event occurred, the plot time associated with mouse-over event, and the {@link TimeSeries}
18
- * associated with the mouse-over event. The plot (for example {@link ScatterPlot}) is responsible
19
- * for rendering the tooltip, and it registers this tooltip-content provider with the {@link useTooltip}
20
- * hook.
21
- *
22
- * The {@link useChart} hook allows the plots and this tooltip to register methods needed its siblings.
23
- *
24
- * ## on mount
25
- * 1. The plot (for example {@link ScatterPlot}) adds a d3 mouse-enter and mouse-leave event handlers
26
- * to each series. The mouse-enter event handler performs a few tasks and then calls the
27
- * mouse-over event handler registered by the {@link Tooltip} via the {@link useMouse} hook.
28
- * 2. The plot (for example {@link ScatterPlot}) registers the tooltip-content provider with the {@link useTooltip}
29
- * hook using the {@link UseTooltipValues.registerTooltipContentProvider} function.
30
- * 3. {@link Tooltip} registers the handler for mouse-over events. The handler accepts the series
31
- * name, plot time, and time-series associated with the mouse-over event, and returns the tooltip
32
- * dimensions. In order to create/render the tooltip, it uses the {@link UseTooltipValues.tooltipContentProvider}
33
- * function that was registered via the {@link useTooltip} hook.
17
+ * Shows a tooltip when the mouse is over one of the plot's elements (a series, a point, a spike, a
18
+ * bar, a band, and so on), while `visible` is `true`. What the tooltip shows is up to its content
19
+ * (its child -- for example, a `<ScatterPlotTooltipContent>`), which is built on
20
+ * {@link TooltipContent}.
34
21
  *
35
- * ## on mouse-over event
36
- * When the plot's (for example {@link ScatterPlot}) d3 mouse-enter event handler fires, the plot calls this
37
- * {@link Tooltip}'s mouse-over handler, which creates the tooltip, and calls the {@link UseTooltipValues.tooltipContentProvider}
38
- * registered by the plot to render the tooltip content, and get the tooltip size.
22
+ * The plot hit-tests the mouse against what it drew, and calls the mouse-over handler this
23
+ * component registers (see `useMouse`), which hands what the plot knows about the element
24
+ * under the mouse to the content's tooltip-content provider (see `useTooltip`). The content
25
+ * shows itself, and hides itself again when the mouse leaves the element.
39
26
  *
40
- * @param props The properties of the tooltip (i.e. visibility and style)
41
- * @return null
27
+ * The content gets this tooltip's style (its `style` over the default tooltip style) through
28
+ * {@link useTooltipStyle}, and can override parts of it.
29
+ * @param props Whether the tooltip is shown, its style, and its content
30
+ * @return The content, while the tooltip is shown
31
+ * @template D The type of the series' datum
32
+ * @template S The type of the series style
33
+ * @template TM The type of the tooltip metadata
34
+ * @template AR The type of the axis range
35
+ * @template A The type of the axis
42
36
  */
43
37
  export declare function Tooltip<D, S extends SeriesStyle, TM, AR extends BaseAxisRange, A extends BaseAxis>(props: Props): JSX.Element;
38
+ //# sourceMappingURL=Tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/app/charts/tooltips/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,GAAG,EAAqB,MAAM,OAAO,CAAC;AACnD,OAAO,EAAsB,KAAK,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAEtE,OAAO,KAAK,EAAC,QAAQ,EAAE,WAAW,EAAC,MAAM,cAAc,CAAC;AAExD,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAGpD;;GAEG;AACH,MAAM,WAAW,KAAK;IAClB,qFAAqF;IACrF,OAAO,EAAE,OAAO,CAAA;IAChB,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;IAC7B,6GAA6G;IAC7G,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;CACxB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,EAAE,EAAE,EAAE,EAAE,SAAS,aAAa,EAAE,CAAC,SAAS,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAwC7H"}