stream-charts 1.0.0 → 1.1.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 (271) hide show
  1. package/README.md +758 -345
  2. package/changes.md +10 -0
  3. package/dist/src/app/charts/Chart.d.ts +116 -87
  4. package/dist/src/app/charts/Chart.js +96 -101
  5. package/dist/src/app/charts/Chart.js.map +1 -1
  6. package/dist/src/app/charts/axes/AxesState.d.ts +64 -0
  7. package/dist/src/app/charts/axes/AxesState.js +97 -0
  8. package/dist/src/app/charts/axes/AxesState.js.map +1 -0
  9. package/dist/src/app/charts/axes/AxesState.test.js +30 -0
  10. package/dist/src/app/charts/axes/AxesState.test.js.map +1 -0
  11. package/dist/src/app/charts/axes/AxisInterval.d.ts +92 -0
  12. package/dist/src/app/charts/axes/AxisInterval.js +126 -0
  13. package/dist/src/app/charts/axes/AxisInterval.js.map +1 -0
  14. package/dist/src/app/charts/axes/AxisInterval.test.js +120 -0
  15. package/dist/src/app/charts/axes/AxisInterval.test.js.map +1 -0
  16. package/dist/src/app/charts/axes/BaseAxisRange.d.ts +83 -0
  17. package/dist/src/app/charts/axes/BaseAxisRange.js +58 -0
  18. package/dist/src/app/charts/axes/BaseAxisRange.js.map +1 -0
  19. package/dist/src/app/charts/axes/ContinuousAxis.d.ts +22 -0
  20. package/dist/src/app/charts/axes/ContinuousAxis.js +96 -0
  21. package/dist/src/app/charts/axes/ContinuousAxis.js.map +1 -0
  22. package/dist/src/app/charts/axes/ContinuousAxisRange.d.ts +59 -0
  23. package/dist/src/app/charts/axes/ContinuousAxisRange.js +84 -0
  24. package/dist/src/app/charts/axes/ContinuousAxisRange.js.map +1 -0
  25. package/dist/src/app/charts/axes/ContinuousAxisRange.test.js +47 -0
  26. package/dist/src/app/charts/axes/ContinuousAxisRange.test.js.map +1 -0
  27. package/dist/src/app/charts/axes/OrdinalAxis.d.ts +23 -0
  28. package/dist/src/app/charts/axes/OrdinalAxis.js +124 -0
  29. package/dist/src/app/charts/axes/OrdinalAxis.js.map +1 -0
  30. package/dist/src/app/charts/axes/OrdinalAxisRange.d.ts +69 -0
  31. package/dist/src/app/charts/axes/OrdinalAxisRange.js +100 -0
  32. package/dist/src/app/charts/axes/OrdinalAxisRange.js.map +1 -0
  33. package/dist/src/app/charts/axes/OrdinalAxisRange.test.js +48 -0
  34. package/dist/src/app/charts/axes/OrdinalAxisRange.test.js.map +1 -0
  35. package/dist/src/app/charts/axes/axes.d.ts +391 -0
  36. package/dist/src/app/charts/axes/axes.js +1046 -0
  37. package/dist/src/app/charts/axes/axes.js.map +1 -0
  38. package/dist/src/app/charts/d3types.d.ts +10 -10
  39. package/dist/src/app/charts/filters/regexFilter.d.ts +9 -0
  40. package/dist/src/app/charts/filters/regexFilter.js +18 -0
  41. package/dist/src/app/charts/filters/regexFilter.js.map +1 -0
  42. package/dist/src/app/charts/filters/regexFilter.test.d.ts +1 -0
  43. package/dist/src/app/charts/filters/regexFilter.test.js +11 -0
  44. package/dist/src/app/charts/filters/regexFilter.test.js.map +1 -0
  45. package/dist/src/app/charts/hooks/useAxes.d.ts +144 -0
  46. package/dist/src/app/charts/hooks/useAxes.js +187 -0
  47. package/dist/src/app/charts/hooks/useAxes.js.map +1 -0
  48. package/dist/src/app/charts/hooks/useChart.d.ts +30 -201
  49. package/dist/src/app/charts/hooks/useChart.js +33 -134
  50. package/dist/src/app/charts/hooks/useChart.js.map +1 -1
  51. package/dist/src/app/charts/hooks/useDataObservable.d.ts +74 -0
  52. package/dist/src/app/charts/hooks/useDataObservable.js +76 -0
  53. package/dist/src/app/charts/hooks/useDataObservable.js.map +1 -0
  54. package/dist/src/app/charts/hooks/useInitialData.d.ts +38 -0
  55. package/dist/src/app/charts/hooks/useInitialData.js +29 -0
  56. package/dist/src/app/charts/hooks/useInitialData.js.map +1 -0
  57. package/dist/src/app/charts/hooks/useMouse.d.ts +53 -0
  58. package/dist/src/app/charts/hooks/useMouse.js +65 -0
  59. package/dist/src/app/charts/hooks/useMouse.js.map +1 -0
  60. package/dist/src/app/charts/hooks/usePlotDimensions.d.ts +34 -0
  61. package/dist/src/app/charts/hooks/usePlotDimensions.js +73 -0
  62. package/dist/src/app/charts/hooks/usePlotDimensions.js.map +1 -0
  63. package/dist/src/app/charts/hooks/useTooltip.d.ts +64 -0
  64. package/dist/src/app/charts/hooks/useTooltip.js +52 -0
  65. package/dist/src/app/charts/hooks/useTooltip.js.map +1 -0
  66. package/dist/src/app/charts/observables/ChartData.d.ts +23 -0
  67. package/dist/src/app/charts/observables/ChartData.js +20 -0
  68. package/dist/src/app/charts/observables/ChartData.js.map +1 -0
  69. package/dist/src/app/charts/observables/iterates.d.ts +52 -0
  70. package/dist/src/app/charts/observables/iterates.js +121 -0
  71. package/dist/src/app/charts/observables/iterates.js.map +1 -0
  72. package/dist/src/app/charts/observables/iterates.test.d.ts +1 -0
  73. package/dist/src/app/charts/observables/iterates.test.js +180 -0
  74. package/dist/src/app/charts/observables/iterates.test.js.map +1 -0
  75. package/dist/src/app/charts/observables/ordinals.d.ts +75 -0
  76. package/dist/src/app/charts/observables/ordinals.js +141 -0
  77. package/dist/src/app/charts/observables/ordinals.js.map +1 -0
  78. package/dist/src/app/charts/observables/ordinals.test.d.ts +1 -0
  79. package/dist/src/app/charts/observables/ordinals.test.js +102 -0
  80. package/dist/src/app/charts/observables/ordinals.test.js.map +1 -0
  81. package/dist/src/app/charts/plots/BarPlot.d.ts +81 -0
  82. package/dist/src/app/charts/plots/BarPlot.js +557 -0
  83. package/dist/src/app/charts/plots/BarPlot.js.map +1 -0
  84. package/dist/src/app/charts/plots/PoincarePlot.d.ts +78 -0
  85. package/dist/src/app/charts/plots/PoincarePlot.js +504 -0
  86. package/dist/src/app/charts/plots/PoincarePlot.js.map +1 -0
  87. package/dist/src/app/charts/{RasterPlot.d.ts → plots/RasterPlot.d.ts} +1 -1
  88. package/dist/src/app/charts/{RasterPlot.js → plots/RasterPlot.js} +152 -133
  89. package/dist/src/app/charts/plots/RasterPlot.js.map +1 -0
  90. package/dist/src/app/charts/{ScatterPlot.d.ts → plots/ScatterPlot.d.ts} +10 -8
  91. package/dist/src/app/charts/plots/ScatterPlot.js +379 -0
  92. package/dist/src/app/charts/plots/ScatterPlot.js.map +1 -0
  93. package/dist/src/app/charts/{plot.d.ts → plots/plot.d.ts} +12 -14
  94. package/dist/src/app/charts/{plot.js → plots/plot.js} +19 -17
  95. package/dist/src/app/charts/plots/plot.js.map +1 -0
  96. package/dist/src/app/charts/series/baseSeries.d.ts +38 -0
  97. package/dist/src/app/charts/series/baseSeries.js +36 -0
  98. package/dist/src/app/charts/series/baseSeries.js.map +1 -0
  99. package/dist/src/app/charts/series/datumSeries.test.d.ts +1 -0
  100. package/dist/src/app/charts/series/datumSeries.test.js +50 -0
  101. package/dist/src/app/charts/series/datumSeries.test.js.map +1 -0
  102. package/dist/src/app/charts/series/iterateSeries.d.ts +42 -0
  103. package/dist/src/app/charts/series/iterateSeries.js +34 -0
  104. package/dist/src/app/charts/series/iterateSeries.js.map +1 -0
  105. package/dist/src/app/charts/series/ordinalSeries.d.ts +54 -0
  106. package/dist/src/app/charts/series/ordinalSeries.js +98 -0
  107. package/dist/src/app/charts/series/ordinalSeries.js.map +1 -0
  108. package/dist/src/app/charts/series/timeSeries.d.ts +30 -0
  109. package/dist/src/app/charts/series/timeSeries.js +19 -0
  110. package/dist/src/app/charts/series/timeSeries.js.map +1 -0
  111. package/dist/src/app/charts/{chartData.d.ts → series/timeSeriesChartData.d.ts} +11 -6
  112. package/dist/src/app/charts/series/timeSeriesChartData.js +32 -0
  113. package/dist/src/app/charts/series/timeSeriesChartData.js.map +1 -0
  114. package/dist/src/app/charts/styling/barPlotStyle.d.ts +41 -0
  115. package/dist/src/app/charts/styling/barPlotStyle.js +84 -0
  116. package/dist/src/app/charts/styling/barPlotStyle.js.map +1 -0
  117. package/dist/src/app/charts/{margins.d.ts → styling/margins.d.ts} +7 -5
  118. package/dist/src/app/charts/{margins.js → styling/margins.js} +19 -9
  119. package/dist/src/app/charts/styling/margins.js.map +1 -0
  120. package/dist/src/app/charts/styling/margins.test.d.ts +1 -0
  121. package/dist/src/app/charts/styling/margins.test.js +19 -0
  122. package/dist/src/app/charts/styling/margins.test.js.map +1 -0
  123. package/dist/src/app/charts/styling/svgStyle.d.ts +76 -0
  124. package/dist/src/app/charts/styling/svgStyle.js +84 -0
  125. package/dist/src/app/charts/styling/svgStyle.js.map +1 -0
  126. package/dist/src/app/charts/subscriptions/subscription.test.d.ts +1 -0
  127. package/dist/src/app/charts/subscriptions/subscription.test.js +395 -0
  128. package/dist/src/app/charts/subscriptions/subscription.test.js.map +1 -0
  129. package/dist/src/app/charts/subscriptions/subscriptions.d.ts +100 -0
  130. package/dist/src/app/charts/subscriptions/subscriptions.js +449 -0
  131. package/dist/src/app/charts/subscriptions/subscriptions.js.map +1 -0
  132. package/dist/src/app/charts/tooltips/BarPlotTooltipContent.d.ts +90 -0
  133. package/dist/src/app/charts/tooltips/BarPlotTooltipContent.js +302 -0
  134. package/dist/src/app/charts/tooltips/BarPlotTooltipContent.js.map +1 -0
  135. package/dist/src/app/charts/tooltips/PoincarePlotTooltipContent.d.ts +100 -0
  136. package/dist/src/app/charts/tooltips/PoincarePlotTooltipContent.js +190 -0
  137. package/dist/src/app/charts/tooltips/PoincarePlotTooltipContent.js.map +1 -0
  138. package/dist/src/app/charts/{RasterPlotTooltipContent.js → tooltips/RasterPlotTooltipContent.js} +40 -44
  139. package/dist/src/app/charts/tooltips/RasterPlotTooltipContent.js.map +1 -0
  140. package/dist/src/app/charts/tooltips/ScatterPlotTooltipContent.js +154 -0
  141. package/dist/src/app/charts/tooltips/ScatterPlotTooltipContent.js.map +1 -0
  142. package/dist/src/app/charts/{Tooltip.d.ts → tooltips/Tooltip.d.ts} +4 -2
  143. package/dist/src/app/charts/{Tooltip.js → tooltips/Tooltip.js} +23 -28
  144. package/dist/src/app/charts/tooltips/Tooltip.js.map +1 -0
  145. package/dist/src/app/charts/{tooltipUtils.d.ts → tooltips/tooltipUtils.d.ts} +17 -11
  146. package/dist/src/app/charts/{tooltipUtils.js → tooltips/tooltipUtils.js} +52 -25
  147. package/dist/src/app/charts/tooltips/tooltipUtils.js.map +1 -0
  148. package/dist/src/app/charts/{Tracker.d.ts → trackers/Tracker.d.ts} +6 -5
  149. package/dist/src/app/charts/trackers/Tracker.js +60 -0
  150. package/dist/src/app/charts/trackers/Tracker.js.map +1 -0
  151. package/dist/src/app/charts/{trackerUtils.d.ts → trackers/trackerUtils.d.ts} +13 -8
  152. package/dist/src/app/charts/trackers/trackerUtils.js +359 -0
  153. package/dist/src/app/charts/trackers/trackerUtils.js.map +1 -0
  154. package/dist/src/app/charts/utils.d.ts +22 -32
  155. package/dist/src/app/charts/utils.js +36 -37
  156. package/dist/src/app/charts/utils.js.map +1 -1
  157. package/dist/src/index.d.ts +48 -15
  158. package/dist/src/index.js +71 -15
  159. package/dist/src/index.js.map +1 -1
  160. package/package.json +30 -20
  161. package/src/app/charts/Chart.tsx +334 -0
  162. package/src/app/charts/axes/AxesState.test.ts +34 -0
  163. package/src/app/charts/axes/AxesState.ts +112 -0
  164. package/src/app/charts/axes/AxisInterval.test.ts +143 -0
  165. package/src/app/charts/axes/AxisInterval.ts +139 -0
  166. package/src/app/charts/axes/BaseAxisRange.ts +113 -0
  167. package/src/app/charts/axes/ContinuousAxis.tsx +192 -0
  168. package/src/app/charts/axes/ContinuousAxisRange.test.ts +55 -0
  169. package/src/app/charts/axes/ContinuousAxisRange.ts +96 -0
  170. package/src/app/charts/axes/OrdinalAxis.tsx +223 -0
  171. package/src/app/charts/axes/OrdinalAxisRange.test.ts +55 -0
  172. package/src/app/charts/axes/OrdinalAxisRange.ts +112 -0
  173. package/src/app/charts/axes/axes.ts +1569 -0
  174. package/src/app/charts/d3types.ts +16 -0
  175. package/src/app/charts/filters/regexFilter.test.ts +13 -0
  176. package/src/app/charts/filters/regexFilter.ts +17 -0
  177. package/src/app/charts/hooks/useAxes.tsx +341 -0
  178. package/src/app/charts/hooks/useChart.tsx +159 -0
  179. package/src/app/charts/hooks/useDataObservable.tsx +175 -0
  180. package/src/app/charts/hooks/useInitialData.tsx +65 -0
  181. package/src/app/charts/hooks/useMouse.tsx +125 -0
  182. package/src/app/charts/hooks/usePlotDimensions.tsx +120 -0
  183. package/src/app/charts/hooks/useTooltip.tsx +112 -0
  184. package/src/app/charts/observables/ChartData.ts +31 -0
  185. package/src/app/charts/observables/iterates.test.ts +201 -0
  186. package/src/app/charts/observables/iterates.ts +203 -0
  187. package/src/app/charts/observables/ordinals.test.ts +135 -0
  188. package/src/app/charts/observables/ordinals.ts +248 -0
  189. package/src/app/charts/plots/BarPlot.tsx +1088 -0
  190. package/src/app/charts/plots/PoincarePlot.tsx +832 -0
  191. package/src/app/charts/plots/RasterPlot.tsx +676 -0
  192. package/src/app/charts/plots/ScatterPlot.tsx +653 -0
  193. package/src/app/charts/plots/plot.ts +75 -0
  194. package/src/app/charts/series/baseSeries.ts +52 -0
  195. package/src/app/charts/series/datumSeries.test.ts +60 -0
  196. package/src/app/charts/series/iterateSeries.ts +56 -0
  197. package/src/app/charts/series/ordinalSeries.ts +164 -0
  198. package/src/app/charts/series/timeSeries.ts +40 -0
  199. package/src/app/charts/series/timeSeriesChartData.ts +68 -0
  200. package/src/app/charts/styling/barPlotStyle.ts +126 -0
  201. package/src/app/charts/styling/margins.test.ts +22 -0
  202. package/src/app/charts/styling/margins.ts +58 -0
  203. package/src/app/charts/styling/svgStyle.ts +118 -0
  204. package/src/app/charts/subscriptions/subscription.test.ts +499 -0
  205. package/src/app/charts/subscriptions/subscriptions.ts +635 -0
  206. package/src/app/charts/tooltips/BarPlotTooltipContent.tsx +440 -0
  207. package/src/app/charts/tooltips/PoincarePlotTooltipContent.tsx +352 -0
  208. package/src/app/charts/tooltips/RasterPlotTooltipContent.tsx +274 -0
  209. package/src/app/charts/tooltips/ScatterPlotTooltipContent.tsx +319 -0
  210. package/src/app/charts/tooltips/Tooltip.tsx +148 -0
  211. package/src/app/charts/tooltips/tooltipUtils.ts +216 -0
  212. package/src/app/charts/trackers/Tracker.tsx +129 -0
  213. package/src/app/charts/trackers/trackerUtils.ts +494 -0
  214. package/src/app/charts/utils.ts +109 -0
  215. package/dist/src/app/charts/CategoryAxis.d.ts +0 -20
  216. package/dist/src/app/charts/CategoryAxis.js +0 -112
  217. package/dist/src/app/charts/CategoryAxis.js.map +0 -1
  218. package/dist/src/app/charts/ContinuousAxis.d.ts +0 -16
  219. package/dist/src/app/charts/ContinuousAxis.js +0 -186
  220. package/dist/src/app/charts/ContinuousAxis.js.map +0 -1
  221. package/dist/src/app/charts/RasterPlot.js.map +0 -1
  222. package/dist/src/app/charts/RasterPlotTooltipContent.js.map +0 -1
  223. package/dist/src/app/charts/ScatterPlot.js +0 -351
  224. package/dist/src/app/charts/ScatterPlot.js.map +0 -1
  225. package/dist/src/app/charts/ScatterPlotTooltipContent.js +0 -163
  226. package/dist/src/app/charts/ScatterPlotTooltipContent.js.map +0 -1
  227. package/dist/src/app/charts/Tooltip.js.map +0 -1
  228. package/dist/src/app/charts/Tracker.js +0 -65
  229. package/dist/src/app/charts/Tracker.js.map +0 -1
  230. package/dist/src/app/charts/axes.d.ts +0 -132
  231. package/dist/src/app/charts/axes.js +0 -265
  232. package/dist/src/app/charts/axes.js.map +0 -1
  233. package/dist/src/app/charts/chartData.js +0 -32
  234. package/dist/src/app/charts/chartData.js.map +0 -1
  235. package/dist/src/app/charts/continuousAxisRangeFor.d.ts +0 -20
  236. package/dist/src/app/charts/continuousAxisRangeFor.js +0 -68
  237. package/dist/src/app/charts/continuousAxisRangeFor.js.map +0 -1
  238. package/dist/src/app/charts/datumSeries.d.ts +0 -59
  239. package/dist/src/app/charts/datumSeries.js +0 -55
  240. package/dist/src/app/charts/datumSeries.js.map +0 -1
  241. package/dist/src/app/charts/datumSeries.test.js +0 -50
  242. package/dist/src/app/charts/datumSeries.test.js.map +0 -1
  243. package/dist/src/app/charts/hooks/AxesState.d.ts +0 -37
  244. package/dist/src/app/charts/hooks/AxesState.js +0 -44
  245. package/dist/src/app/charts/hooks/AxesState.js.map +0 -1
  246. package/dist/src/app/charts/margins.js.map +0 -1
  247. package/dist/src/app/charts/margins.test.js +0 -14
  248. package/dist/src/app/charts/margins.test.js.map +0 -1
  249. package/dist/src/app/charts/plot.js.map +0 -1
  250. package/dist/src/app/charts/regexFilter.d.ts +0 -9
  251. package/dist/src/app/charts/regexFilter.js +0 -17
  252. package/dist/src/app/charts/regexFilter.js.map +0 -1
  253. package/dist/src/app/charts/regexFilter.test.js +0 -11
  254. package/dist/src/app/charts/regexFilter.test.js.map +0 -1
  255. package/dist/src/app/charts/subscriptions.d.ts +0 -43
  256. package/dist/src/app/charts/subscriptions.js +0 -213
  257. package/dist/src/app/charts/subscriptions.js.map +0 -1
  258. package/dist/src/app/charts/svgStyle.d.ts +0 -27
  259. package/dist/src/app/charts/svgStyle.js +0 -32
  260. package/dist/src/app/charts/svgStyle.js.map +0 -1
  261. package/dist/src/app/charts/timeRange.test.js +0 -54
  262. package/dist/src/app/charts/timeRange.test.js.map +0 -1
  263. package/dist/src/app/charts/tooltipUtils.js.map +0 -1
  264. package/dist/src/app/charts/trackerUtils.js +0 -130
  265. package/dist/src/app/charts/trackerUtils.js.map +0 -1
  266. /package/dist/src/app/charts/{datumSeries.test.d.ts → axes/AxesState.test.d.ts} +0 -0
  267. /package/dist/src/app/charts/{margins.test.d.ts → axes/AxisInterval.test.d.ts} +0 -0
  268. /package/dist/src/app/charts/{regexFilter.test.d.ts → axes/ContinuousAxisRange.test.d.ts} +0 -0
  269. /package/dist/src/app/charts/{timeRange.test.d.ts → axes/OrdinalAxisRange.test.d.ts} +0 -0
  270. /package/dist/src/app/charts/{RasterPlotTooltipContent.d.ts → tooltips/RasterPlotTooltipContent.d.ts} +0 -0
  271. /package/dist/src/app/charts/{ScatterPlotTooltipContent.d.ts → tooltips/ScatterPlotTooltipContent.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"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AAI,UAAU,CAAC,OAAO,KAAK,SAAS,EAAE;gBACnD,oBAAoB,CAAC,GAAG,CAAC,CAAA;gBACzB,UAAU,CAAC,OAAO,GAAG,SAAS,CAAA;aACjC;SACJ;IACL,CAAC,EACD,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC,CACnH,CAAA;IAED,OAAO,IAAI,CAAA;AACf,CAAC"}
@@ -1,132 +0,0 @@
1
- import { Dimensions, Margin } from "./margins";
2
- import { ContinuousAxisRange } from "./continuousAxisRangeFor";
3
- import { Axis, ScaleBand, ScaleContinuousNumeric, ZoomTransform } from "d3";
4
- import { AxisElementSelection, SvgSelection } from "./d3types";
5
- import { AxesState } from "./hooks/AxesState";
6
- import { Series } from "./datumSeries";
7
- import { AxesAssignment } from "./plot";
8
- export interface AxesLabelFont {
9
- size: number;
10
- color: string;
11
- family: string;
12
- weight: number;
13
- }
14
- export declare const defaultAxesLabelFont: AxesLabelFont;
15
- export interface SeriesLineStyle {
16
- color: string;
17
- lineWidth: number;
18
- highlightColor: string;
19
- highlightWidth: number;
20
- margin?: number;
21
- }
22
- export declare const defaultLineStyle: SeriesLineStyle;
23
- export interface Axes<X extends BaseAxis, Y extends BaseAxis> {
24
- xAxis: X;
25
- yAxis: Y;
26
- }
27
- export interface BaseAxis {
28
- axisId: string;
29
- location: AxisLocation;
30
- selection: AxisElementSelection;
31
- }
32
- export interface ContinuousNumericAxis extends BaseAxis {
33
- scale: ScaleContinuousNumeric<number, number>;
34
- generator: Axis<number | {
35
- valueOf(): number;
36
- }>;
37
- update: (domain: [startValue: number, endValue: number], plotDimensions: Dimensions, margin: Margin) => void;
38
- }
39
- export interface CategoryAxis extends BaseAxis {
40
- scale: ScaleBand<string>;
41
- generator: Axis<string>;
42
- categorySize: number;
43
- update: (categoryNames: Array<string>, unfilteredSize: number, plotDimensions: Dimensions, margin: Margin) => number;
44
- }
45
- export declare enum AxisLocation {
46
- Left = 0,
47
- Right = 1,
48
- Bottom = 2,
49
- Top = 3
50
- }
51
- export declare function addLinearAxis(chartId: number, axisId: string, svg: SvgSelection, location: AxisLocation, plotDimensions: Dimensions, domain: [minValue: number, maxValue: number], axesLabelFont: AxesLabelFont, margin: Margin, axisLabel: string): ContinuousNumericAxis;
52
- export declare function addCategoryAxis(chartId: number, axisId: string, svg: SvgSelection, location: AxisLocation, plotDimensions: Dimensions, categories: Array<string>, axesLabelFont: AxesLabelFont, margin: Margin, axisLabel: string): CategoryAxis;
53
- /**
54
- * The result of a zoom action
55
- */
56
- export interface ZoomResult {
57
- range: ContinuousAxisRange;
58
- zoomFactor: number;
59
- }
60
- /**
61
- * Called when the user uses the scroll wheel (or scroll gesture) to zoom in or out. Zooms in/out
62
- * at the location of the mouse when the scroll wheel or gesture was applied.
63
- * @param transform The d3 zoom transformation information
64
- * @param x The x-position of the mouse when the scroll wheel or gesture is used
65
- * @param plotDimensions The current dimensions of the plot
66
- * @param axis The axis being zoomed
67
- * @param range The current range for the axis being zoomed
68
- * @return The updated range and the new zoom factor
69
- */
70
- export declare function calculateZoomFor(transform: ZoomTransform, x: number, plotDimensions: Dimensions, axis: ContinuousNumericAxis, range: ContinuousAxisRange): ZoomResult;
71
- /**
72
- * Adjusts the range and updates the plot when the plot is dragged to the left or right
73
- * @param deltaX The amount that the plot is dragged
74
- * @param plotDimensions The dimensions of the plot
75
- * @param axis The axis being zoomed
76
- * @param range The current range for the axis being zoomed
77
- * @return The updated range
78
- */
79
- export declare function calculatePanFor(deltaX: number, plotDimensions: Dimensions, axis: ContinuousNumericAxis, range: ContinuousAxisRange): ContinuousAxisRange;
80
- /**
81
- * Accepts the series, the assignment of the series to axes, and the current x-axes state, and
82
- * returns a an array of the distinct axis IDs that cover all the series in the plot.
83
- *
84
- * @param series The array of series
85
- * @param axisAssignments A map association a series name with its axis assignments
86
- * @param xAxesState The current axis state
87
- * @return an array of the distinct axes that cover all the series in the plot
88
- */
89
- export declare function axesForSeriesGen(series: Array<Series>, axisAssignments: Map<string, AxesAssignment>, xAxesState: AxesState): Array<string>;
90
- /**
91
- * Higher-order function that generates a handler for pan events, given the distinct series IDs that cover all
92
- * the axes in the chart, the margin, time-range update function, and the current state of the x-axes. This
93
- * function returns a handler function. And this handler function adjusts the time-range when the plot is dragged
94
- * to the left or right. After calling the handler function, the plot needs to be updated as well, and this is
95
- * left for the caller.
96
- *
97
- * Please note that the function generated by this function has side-effects -- it updates the time-ranges
98
- *
99
- * @param axesForSeries The distinct axes that cover all the series
100
- * @param margin The plot margin
101
- * @param setTimeRangeFor Function for setting the new time-range for a specific axis
102
- * @param xAxesState The current state of the x-axes
103
- * @return A handler function for pan events
104
- */
105
- export declare function panHandler(axesForSeries: Array<string>, margin: Margin, setTimeRangeFor: (axisId: string, timeRange: [start: number, end: number]) => void, xAxesState: AxesState): (x: number, plotDimensions: Dimensions, series: Array<string>, ranges: Map<string, ContinuousAxisRange>) => void;
106
- /**
107
- * Higher-order function that generates a handler for zoom events, given the distinct series IDs that cover all
108
- * the axes in the chart, the margin, time-range update function, and the current state of the x-axes. This
109
- * function returns a handler function. And this handler function adjusts the time-range when the plot is zoomed.
110
- * After calling the handler function, the plot needs to be updated as well, and this is left for the caller.
111
- *
112
- * Please note that the function generated by this function has side-effects -- it updates the time-ranges
113
- *
114
- * @param axesForSeries The distinct axes that cover all the series
115
- * @param margin The plot margin
116
- * @param setTimeRangeFor Function for setting the new time-range for a specific axis
117
- * @param xAxesState The current state of the x-axes
118
- * @return A handler function for pan events
119
- */
120
- export declare function zoomHandler(axesForSeries: Array<string>, margin: Margin, setTimeRangeFor: (axisId: string, timeRange: [start: number, end: number]) => void, xAxesState: AxesState): (transform: ZoomTransform, x: number, plotDimensions: Dimensions, series: Array<string>, ranges: Map<string, ContinuousAxisRange>) => void;
121
- /**
122
- * Calculates the time-ranges for each of the axes in the map
123
- * @param xAxes The map containing the axes and their associated IDs
124
- * @return a map associating the axis IDs to their time-range
125
- */
126
- export declare function timeRanges(xAxes: Map<string, ContinuousNumericAxis>): Map<string, ContinuousAxisRange>;
127
- /**
128
- * Calculates the time-intervals (start, end) for each of the x-axis
129
- * @param xAxes The x-axes representing the time
130
- * @return A map associating each x-axis with a (start, end) interval
131
- */
132
- export declare function timeIntervals(xAxes: Map<string, ContinuousNumericAxis>): Map<string, [start: number, end: number]>;
@@ -1,265 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { continuousAxisRangeFor } from "./continuousAxisRangeFor";
13
- import * as d3 from "d3";
14
- import { addContinuousNumericXAxis, addContinuousNumericYAxis } from "./ContinuousAxis";
15
- import { noop } from "./utils";
16
- export var defaultAxesLabelFont = {
17
- size: 12,
18
- color: '#d2933f',
19
- weight: 300,
20
- family: 'sans-serif'
21
- };
22
- export var defaultLineStyle = {
23
- color: '#008aad',
24
- lineWidth: 1,
25
- highlightColor: '#008aad',
26
- highlightWidth: 3,
27
- };
28
- export var AxisLocation;
29
- (function (AxisLocation) {
30
- AxisLocation[AxisLocation["Left"] = 0] = "Left";
31
- AxisLocation[AxisLocation["Right"] = 1] = "Right";
32
- AxisLocation[AxisLocation["Bottom"] = 2] = "Bottom";
33
- AxisLocation[AxisLocation["Top"] = 3] = "Top";
34
- })(AxisLocation || (AxisLocation = {}));
35
- export function addLinearAxis(chartId, axisId, svg, location, plotDimensions, domain, axesLabelFont, margin, axisLabel) {
36
- switch (location) {
37
- // y-axis
38
- case AxisLocation.Left:
39
- case AxisLocation.Right:
40
- return addContinuousNumericYAxis(chartId, axisId, svg, plotDimensions, location, d3.scaleLinear(), domain, axesLabelFont, margin, axisLabel);
41
- // x-axis
42
- case AxisLocation.Bottom:
43
- case AxisLocation.Top:
44
- return addContinuousNumericXAxis(chartId, svg, plotDimensions, location, d3.scaleLinear(), domain, axesLabelFont, margin, axisLabel, "", noop);
45
- }
46
- }
47
- export function addCategoryAxis(chartId, axisId, svg, location, plotDimensions, categories, axesLabelFont, margin, axisLabel) {
48
- switch (location) {
49
- case AxisLocation.Left:
50
- case AxisLocation.Right:
51
- return addCategoryYAxis(chartId, axisId, svg, plotDimensions, categories, axesLabelFont, margin, axisLabel, location);
52
- case AxisLocation.Bottom:
53
- case AxisLocation.Top:
54
- //todo should be the x axis
55
- return addCategoryYAxis(chartId, axisId, svg, plotDimensions, categories, axesLabelFont, margin, axisLabel, location);
56
- }
57
- }
58
- function addCategoryYAxis(chartId, axisId, svg, plotDimensions, categories, axesLabelFont, margin, axisLabel, location) {
59
- var categorySize = (plotDimensions.height - margin.top) / categories.length;
60
- var scale = d3.scaleBand()
61
- .domain(categories)
62
- .range([0, categorySize * categories.length]);
63
- // create and add the axes
64
- var generator = d3.axisLeft(scale);
65
- var selection = svg
66
- .append('g')
67
- .attr('id', "y-axis-selection-" + chartId)
68
- .attr('class', 'y-axis')
69
- .attr('transform', "translate(" + margin.left + ", " + margin.top + ")")
70
- .call(generator);
71
- svg
72
- .append('text')
73
- .attr('id', "stream-chart-y-axis-label-" + chartId)
74
- .attr('text-anchor', 'middle')
75
- .attr('font-size', axesLabelFont.size)
76
- .attr('fill', axesLabelFont.color)
77
- .attr('font-family', axesLabelFont.family)
78
- .attr('font-weight', axesLabelFont.weight)
79
- .attr('transform', "translate(" + axesLabelFont.size + ", " + (margin.top + (plotDimensions.height - margin.top - margin.bottom) / 2) + ") rotate(-90)")
80
- .text(axisLabel);
81
- var axis = { axisId: axisId, selection: selection, location: location, scale: scale, generator: generator, categorySize: categorySize, update: function () { return categorySize; } };
82
- return __assign(__assign({}, axis), { update: function (categoryNames, unfilteredSize, plotDimensions) { return updateCategoryYAxis(chartId, svg, axis, plotDimensions, unfilteredSize, categoryNames, axesLabelFont, margin); } });
83
- }
84
- function updateCategoryYAxis(chartId, svg, axis, plotDimensions, unfilteredSize, names, axesLabelFont, margin) {
85
- var categorySize = (plotDimensions.height - margin.top) / unfilteredSize;
86
- axis.scale
87
- .domain(names)
88
- .range([0, categorySize * names.length]);
89
- axis.selection.call(axis.generator);
90
- svg
91
- .select("#stream-chart-y-axis-label-" + chartId)
92
- .attr('transform', "translate(" + axesLabelFont.size + ", " + (margin.top + (plotDimensions.height - margin.top - margin.bottom) / 2) + ") rotate(-90)");
93
- return categorySize;
94
- }
95
- /**
96
- * Called when the user uses the scroll wheel (or scroll gesture) to zoom in or out. Zooms in/out
97
- * at the location of the mouse when the scroll wheel or gesture was applied.
98
- * @param transform The d3 zoom transformation information
99
- * @param x The x-position of the mouse when the scroll wheel or gesture is used
100
- * @param plotDimensions The current dimensions of the plot
101
- * @param axis The axis being zoomed
102
- * @param range The current range for the axis being zoomed
103
- * @return The updated range and the new zoom factor
104
- */
105
- export function calculateZoomFor(transform, x, plotDimensions, axis, range) {
106
- var time = axis.generator.scale().invert(x);
107
- return {
108
- range: range.scale(transform.k, time),
109
- zoomFactor: transform.k
110
- };
111
- }
112
- /**
113
- * Adjusts the range and updates the plot when the plot is dragged to the left or right
114
- * @param deltaX The amount that the plot is dragged
115
- * @param plotDimensions The dimensions of the plot
116
- * @param axis The axis being zoomed
117
- * @param range The current range for the axis being zoomed
118
- * @return The updated range
119
- */
120
- export function calculatePanFor(deltaX, plotDimensions, axis, range) {
121
- var scale = axis.generator.scale();
122
- var currentTime = range.start;
123
- var x = scale(currentTime);
124
- if (x !== undefined) {
125
- var deltaTime = scale.invert(x + deltaX) - currentTime;
126
- return range.translate(-deltaTime);
127
- }
128
- return range;
129
- }
130
- /**
131
- * Accepts the series, the assignment of the series to axes, and the current x-axes state, and
132
- * returns a an array of the distinct axis IDs that cover all the series in the plot.
133
- *
134
- * @param series The array of series
135
- * @param axisAssignments A map association a series name with its axis assignments
136
- * @param xAxesState The current axis state
137
- * @return an array of the distinct axes that cover all the series in the plot
138
- */
139
- export function axesForSeriesGen(series, axisAssignments, xAxesState) {
140
- return series.map(function (srs) { return srs.name; })
141
- // grab the x-axis assigned to the series, or use a the default x-axis if not
142
- // assignment has been made
143
- .map(function (name) { var _a; return ((_a = axisAssignments.get(name)) === null || _a === void 0 ? void 0 : _a.xAxis) || xAxesState.axisDefaultName(); })
144
- // de-dup the array of axis IDs so that we don't end up applying the pan or zoom
145
- // transformation more than once
146
- .reduce(function (accum, axisId) {
147
- if (!accum.find(function (id) { return id === axisId; })) {
148
- accum.push(axisId);
149
- }
150
- return accum;
151
- }, []);
152
- }
153
- /**
154
- * Higher-order function that generates a handler for pan events, given the distinct series IDs that cover all
155
- * the axes in the chart, the margin, time-range update function, and the current state of the x-axes. This
156
- * function returns a handler function. And this handler function adjusts the time-range when the plot is dragged
157
- * to the left or right. After calling the handler function, the plot needs to be updated as well, and this is
158
- * left for the caller.
159
- *
160
- * Please note that the function generated by this function has side-effects -- it updates the time-ranges
161
- *
162
- * @param axesForSeries The distinct axes that cover all the series
163
- * @param margin The plot margin
164
- * @param setTimeRangeFor Function for setting the new time-range for a specific axis
165
- * @param xAxesState The current state of the x-axes
166
- * @return A handler function for pan events
167
- */
168
- export function panHandler(axesForSeries, margin, setTimeRangeFor, xAxesState) {
169
- /**
170
- * Adjusts the time-range and updates the plot when the plot is dragged to the left or right
171
- * @param deltaX The amount that the plot is dragged
172
- * @param plotDimensions The dimensions of the plot
173
- * @param series An array of series names
174
- * @param ranges A map holding the axis ID and its associated time range
175
- */
176
- return function (deltaX, plotDimensions, series, ranges) {
177
- // run through the axis IDs, adjust their domain, and update the time-range set for that axis
178
- axesForSeries
179
- .forEach(function (axisId) {
180
- var xAxis = xAxesState.axisFor(axisId);
181
- var timeRange = ranges.get(axisId);
182
- if (timeRange) {
183
- // calculate the change in the time-range based on the pixel change from the drag event
184
- var range = calculatePanFor(deltaX, plotDimensions, xAxis, timeRange);
185
- if (Math.abs(range.start - timeRange.start) < 2)
186
- return;
187
- // update the time-range for the axis
188
- ranges.set(axisId, range);
189
- var start = range.start, end = range.end;
190
- setTimeRangeFor(axisId, [start, end]);
191
- // update the axis' time-range
192
- xAxis.update([start, end], plotDimensions, margin);
193
- }
194
- });
195
- // hey, don't forget to update the plot with the new time-ranges in the code calling this... :)
196
- };
197
- }
198
- /**
199
- * Higher-order function that generates a handler for zoom events, given the distinct series IDs that cover all
200
- * the axes in the chart, the margin, time-range update function, and the current state of the x-axes. This
201
- * function returns a handler function. And this handler function adjusts the time-range when the plot is zoomed.
202
- * After calling the handler function, the plot needs to be updated as well, and this is left for the caller.
203
- *
204
- * Please note that the function generated by this function has side-effects -- it updates the time-ranges
205
- *
206
- * @param axesForSeries The distinct axes that cover all the series
207
- * @param margin The plot margin
208
- * @param setTimeRangeFor Function for setting the new time-range for a specific axis
209
- * @param xAxesState The current state of the x-axes
210
- * @return A handler function for pan events
211
- */
212
- export function zoomHandler(axesForSeries, margin, setTimeRangeFor, xAxesState) {
213
- /**
214
- * Called when the user uses the scroll wheel (or scroll gesture) to zoom in or out. Zooms in/out
215
- * at the location of the mouse when the scroll wheel or gesture was applied.
216
- * @param transform The d3 zoom transformation information
217
- * @param x The x-position of the mouse when the scroll wheel or gesture is used
218
- * @param plotDimensions The dimensions of the plot
219
- * @param series An array of series names
220
- * @param ranges A map holding the axis ID and its associated time-range
221
- */
222
- return function (transform, x, plotDimensions, series, ranges) {
223
- // run through the axis IDs, adjust their domain, and update the time-range set for that axis
224
- axesForSeries
225
- .forEach(function (axisId) {
226
- var xAxis = xAxesState.axisFor(axisId);
227
- var timeRange = ranges.get(axisId);
228
- if (timeRange) {
229
- var zoom = calculateZoomFor(transform, x, plotDimensions, xAxis, timeRange);
230
- // update the axis range
231
- ranges.set(axisId, zoom.range);
232
- setTimeRangeFor(axisId, [zoom.range.start, zoom.range.end]);
233
- // update the axis' time-range
234
- xAxis.update([zoom.range.start, zoom.range.end], plotDimensions, margin);
235
- }
236
- });
237
- // hey, don't forget to update the plot with the new time-ranges in the code calling this... :)
238
- };
239
- }
240
- /**
241
- * Calculates the time-ranges for each of the axes in the map
242
- * @param xAxes The map containing the axes and their associated IDs
243
- * @return a map associating the axis IDs to their time-range
244
- */
245
- export function timeRanges(xAxes) {
246
- return new Map(Array.from(xAxes.entries())
247
- .map(function (_a) {
248
- var id = _a[0], axis = _a[1];
249
- var _b = axis.scale.domain(), start = _b[0], end = _b[1];
250
- return [id, continuousAxisRangeFor(start, end)];
251
- }));
252
- }
253
- /**
254
- * Calculates the time-intervals (start, end) for each of the x-axis
255
- * @param xAxes The x-axes representing the time
256
- * @return A map associating each x-axis with a (start, end) interval
257
- */
258
- export function timeIntervals(xAxes) {
259
- return new Map(Array.from(xAxes.entries())
260
- .map(function (_a) {
261
- var id = _a[0], axis = _a[1];
262
- return [id, axis.scale.domain()];
263
- }));
264
- }
265
- //# sourceMappingURL=axes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"axes.js","sourceRoot":"","sources":["../../../../src/app/charts/axes.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAsB,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AACrF,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB,OAAO,EAAC,yBAAyB,EAAE,yBAAyB,EAAC,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAY7B,MAAM,CAAC,IAAM,oBAAoB,GAAkB;IAC/C,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,YAAY;CACvB,CAAA;AAUD,MAAM,CAAC,IAAM,gBAAgB,GAAoB;IAC7C,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,CAAC;IACZ,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,CAAC;CACpB,CAAA;AA0BD,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,+CAAI,C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AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAyC;IAChE,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SACrC,GAAG,CAAC,UAAC,EAAU;YAAT,EAAE,QAAA,EAAE,IAAI,QAAA;QACL,IAAA,KAAe,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAjC,KAAK,QAAA,EAAE,GAAG,QAAuB,CAAA;QACxC,OAAO,CAAC,EAAE,EAAE,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;IACnD,CAAC,CAAC,CAAC,CAAA;AACX,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyC;IACnE,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SACrC,GAAG,CAAC,UAAC,EAAU;YAAT,EAAE,QAAA,EAAE,IAAI,QAAA;QAAM,OAAA,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAA+B;IAAvD,CAAuD,CAAC,CAAC,CAAA;AACtF,CAAC"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Creates an empty chart data object with all the values set to 0
3
- * @param {Array<string>} series The list of series names (identifiers) to update
4
- * @return {ChartData} An empty chart data object
5
- */
6
- export function emptyChartData(series) {
7
- return {
8
- maxTime: 0,
9
- maxTimes: new Map(series.map(function (name) { return [name, 0]; })),
10
- newPoints: new Map(series.map(function (name) { return [name, [{ time: 0, value: 0 }]]; }))
11
- };
12
- }
13
- /**
14
- * Creates an empty chart data object with all the values set to 0
15
- * @param seriesList The list of series names (identifiers) to update
16
- * @return An empty chart data object
17
- */
18
- export function initialChartData(seriesList) {
19
- var maxTime = seriesList.reduce(function (tMax, series) { return Math.max(tMax, series.last().map(function (p) { return p.time; }).getOrElse(-Infinity)); }, -Infinity);
20
- return {
21
- maxTime: maxTime,
22
- maxTimes: new Map(seriesList.map(function (series) { return [series.name, series.last().map(function (p) { return p.time; }).getOrElse(0)]; })),
23
- newPoints: new Map(seriesList.map(function (series) { return [
24
- series.name,
25
- [{
26
- time: series.last().map(function (p) { return p.time; }).getOrElse(0),
27
- value: series.last().map(function (p) { return p.value; }).getOrElse(0)
28
- }]
29
- ]; }))
30
- };
31
- }
32
- //# sourceMappingURL=chartData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chartData.js","sourceRoot":"","sources":["../../../../src/app/charts/chartData.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAqB;IAChD,OAAO;QACH,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC,IAAI,EAAE,CAAC,CAAC,EAAT,CAAS,CAAC,CAAC;QAChD,SAAS,EAAE,IAAI,GAAG,CAAuB,MAAM,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC,IAAI,EAAE,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC,EAA7B,CAA6B,CAAC,CAAC;KAC9F,CAAA;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAyB;IACtD,IAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAC7B,UAAC,IAAI,EAAE,MAAM,IAAK,OAAA,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAnE,CAAmE,EACrF,CAAC,QAAQ,CACZ,CAAA;IACD,OAAO;QACH,OAAO,SAAA;QACP,QAAQ,EAAE,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,UAAA,MAAM,IAAI,OAAA,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAA1D,CAA0D,CAAC,CAAC;QACvG,SAAS,EAAE,IAAI,GAAG,CAAuB,UAAU,CAAC,GAAG,CAAC,UAAA,MAAM,IAAI,OAAA;YAC9D,MAAM,CAAC,IAAI;YACX,CAAC;oBACG,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;oBACjD,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;iBACtD,CAAC;SACL,EANiE,CAMjE,CAAC,CAAC;KACN,CAAA;AACL,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * The time-range contract
3
- */
4
- export interface ContinuousAxisRange {
5
- start: number;
6
- end: number;
7
- original: [start: number, end: number];
8
- scaleFactor: number;
9
- matchesOriginal: (start: number, end: number) => boolean;
10
- scale: (factor: number, time: number) => ContinuousAxisRange;
11
- translate: (x: number) => ContinuousAxisRange;
12
- update: (start: number, end: number) => ContinuousAxisRange;
13
- }
14
- /**
15
- * A time-range that can be scaled and transformed, all the while maintaining it original range values.
16
- * @param _start The start of the time-range
17
- * @param _end The end of the time-range
18
- * @return A time-range object that can be scaled and transformed
19
- */
20
- export declare function continuousAxisRangeFor(_start: number, _end: number): ContinuousAxisRange;
@@ -1,68 +0,0 @@
1
- /**
2
- * A time-range that can be scaled and transformed, all the while maintaining it original range values.
3
- * @param _start The start of the time-range
4
- * @param _end The end of the time-range
5
- * @return A time-range object that can be scaled and transformed
6
- */
7
- export function continuousAxisRangeFor(_start, _end) {
8
- // form a closure on the original start and end of the time-range
9
- var originalStart = Math.min(_start, _end);
10
- var originalEnd = Math.max(_start, _end);
11
- /**
12
- * Updates the time-range based on the new start and end times
13
- * @param start The new start of the time-range
14
- * @param end The new end of the time-range
15
- * @return The updated time-range type
16
- */
17
- function updateTimeRange(start, end) {
18
- // the amount by which the time-range is currently scaled
19
- var scaleFactor = (end - start) / (originalEnd - originalStart);
20
- /**
21
- * Determines whether the specified (start, end) interval matches the original interval
22
- * @param start The start of the interval
23
- * @param end The end of the interval
24
- * @return `true` if the specified interval matches the original interval; `false` otherwise
25
- */
26
- function matchesOriginal(start, end) {
27
- return originalStart === start && originalEnd === end;
28
- }
29
- /**
30
- * Scales the time-range by the specified scale factor from the specified time-location. The equations
31
- * are written so that the zooming (scaling) occurs at the specified time, and expands/contracts equally
32
- * from that time.
33
- * @param factor The scale factor
34
- * @param time The time from which to scale the interval
35
- * @return A new continuous-axis range with updated values
36
- */
37
- function scale(factor, time) {
38
- var oldScale = scaleFactor;
39
- var dts = time - start;
40
- var dte = end - time;
41
- start = time - dts * factor / oldScale;
42
- end = time + dte * factor / oldScale;
43
- return updateTimeRange(start, end);
44
- }
45
- /**
46
- * Translates the time-range by the specified amount
47
- * @param x The amount by which to translate the time-range
48
- * @return An updated {@link ContinuousAxisRange} that has been translated by the specified amount
49
- */
50
- function translate(x) {
51
- start += x;
52
- end += x;
53
- return updateTimeRange(start, end);
54
- }
55
- return {
56
- start: start,
57
- end: end,
58
- original: [originalStart, originalEnd],
59
- matchesOriginal: matchesOriginal,
60
- scaleFactor: scaleFactor,
61
- scale: scale,
62
- translate: translate,
63
- update: updateTimeRange
64
- };
65
- }
66
- return updateTimeRange(originalStart, originalEnd);
67
- }
68
- //# sourceMappingURL=continuousAxisRangeFor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"continuousAxisRangeFor.js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AQ,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC;YACtC,eAAe,iBAAA;YACf,WAAW,aAAA;YACX,KAAK,OAAA;YACL,SAAS,WAAA;YACT,MAAM,EAAE,eAAe;SAC1B,CAAA;IACL,CAAC;IAED,OAAO,eAAe,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC"}
@@ -1,59 +0,0 @@
1
- import { Option } from "prelude-ts";
2
- /**
3
- * An immutable datum object that holds the spike (time, value) representing a neuron spike
4
- */
5
- export interface Datum {
6
- readonly time: number;
7
- readonly value: number;
8
- }
9
- export declare function datumOf(time: number, value: number): Datum;
10
- /**
11
- * A spike series holding an array of spike (time, value) datum, the name and supplemental information
12
- * needed by the `RasterChart`
13
- */
14
- export interface Series {
15
- readonly name: string;
16
- data: Array<Datum>;
17
- readonly last: () => Option<Datum>;
18
- readonly length: () => number;
19
- readonly isEmpty: () => boolean;
20
- }
21
- /**
22
- * Creates a series from the name and the optional array of `Datum`.
23
- * @param name The name of the series (i.e. neuron)
24
- * @param data The array of (time, value) pairs, where the value is the spike value (in mV)
25
- * @return A `Series` for object that can be used by the `RasterChart`
26
- * @see seriesFromTuples
27
- * @see emptySeries
28
- */
29
- export declare function seriesFrom(name: string, data?: Array<Datum>): Series;
30
- /**
31
- * Creates a series from the name and the optional array of (x, y) pairs (tuples)
32
- * @param name The name of the series
33
- * @param data The optional array of (x, y) pairs (tuples)
34
- * @return A `Series` for object that can be used by the `RasterChart`
35
- * @see seriesFrom
36
- * @see emptySeries
37
- */
38
- export declare const seriesFromTuples: (name: string, data?: Array<[number, number]>) => Series;
39
- /**
40
- * Returns an empty series with the specified name
41
- * @param name The name of the series
42
- * @return The empty series
43
- * @see seriesFrom
44
- * @see seriesFromTuples
45
- */
46
- export declare const emptySeries: (name: string) => Series;
47
- /**
48
- * Creates an array of empty series, one for each specified name
49
- * @param names The names for each of the empty series
50
- * @return An array of empty series with the specified names
51
- * @see emptySeries
52
- * @see seriesFrom
53
- * @see seriesFromTuples
54
- */
55
- export declare const emptySeriesFor: (names: Array<string>) => Array<Series>;
56
- export interface PixelDatum extends Datum {
57
- x: number;
58
- y: number;
59
- }