@mathstack/viz 0.0.1-beta.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 (300) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +0 -0
  3. package/fesm2022/mathstack-viz.mjs +11049 -0
  4. package/fesm2022/mathstack-viz.mjs.map +1 -0
  5. package/index.d.ts +5 -0
  6. package/lib/axes/base/config/xy-axis-builder.d.ts +38 -0
  7. package/lib/axes/base/config/xy-axis-config.d.ts +18 -0
  8. package/lib/axes/base/config/xy-axis-options.d.ts +10 -0
  9. package/lib/axes/base/xy-axis-base.d.ts +49 -0
  10. package/lib/axes/baseline/axis-baseline-builder.d.ts +31 -0
  11. package/lib/axes/baseline/axis-baseline-options.d.ts +7 -0
  12. package/lib/axes/baseline/axis-baseline.d.ts +9 -0
  13. package/lib/axes/grid/grid-builder.d.ts +29 -0
  14. package/lib/axes/grid/grid-config.d.ts +8 -0
  15. package/lib/axes/grid/grid-options.d.ts +6 -0
  16. package/lib/axes/index.d.ts +13 -0
  17. package/lib/axes/label/axis-label-builder.d.ts +63 -0
  18. package/lib/axes/label/axis-label-options.d.ts +11 -0
  19. package/lib/axes/label/axis-label.d.ts +13 -0
  20. package/lib/axes/ordinal/ordinal-axis-config.d.ts +38 -0
  21. package/lib/axes/ordinal/ordinal-axis.d.ts +43 -0
  22. package/lib/axes/quantitative/quantitative-axis-config.d.ts +38 -0
  23. package/lib/axes/quantitative/quantitative-axis.d.ts +51 -0
  24. package/lib/axes/ticks/tick-wrap/tick-wrap-builder.d.ts +64 -0
  25. package/lib/axes/ticks/tick-wrap/tick-wrap-options.d.ts +8 -0
  26. package/lib/axes/ticks/tick-wrap/tick-wrap.d.ts +13 -0
  27. package/lib/axes/ticks/ticks-builder.d.ts +172 -0
  28. package/lib/axes/ticks/ticks-options.d.ts +22 -0
  29. package/lib/axes/ticks/ticks.d.ts +24 -0
  30. package/lib/axes/x/x-axis-config.d.ts +42 -0
  31. package/lib/axes/x/x-axis.d.ts +47 -0
  32. package/lib/axes/x-ordinal/x-ordinal-axis-builder.d.ts +29 -0
  33. package/lib/axes/x-ordinal/x-ordinal-axis-config.d.ts +25 -0
  34. package/lib/axes/x-ordinal/x-ordinal-axis.component.d.ts +88 -0
  35. package/lib/axes/x-quantitative/x-quantitative-axis-builder.d.ts +29 -0
  36. package/lib/axes/x-quantitative/x-quantitative-axis-config.d.ts +25 -0
  37. package/lib/axes/x-quantitative/x-quantitative-axis.component.d.ts +53 -0
  38. package/lib/axes/xy-axis.module.d.ts +10 -0
  39. package/lib/axes/y/y-axis-config.d.ts +42 -0
  40. package/lib/axes/y/y-axis.d.ts +53 -0
  41. package/lib/axes/y-ordinal/y-ordinal-axis-builder.d.ts +29 -0
  42. package/lib/axes/y-ordinal/y-ordinal-axis-config.d.ts +25 -0
  43. package/lib/axes/y-ordinal/y-ordinal-axis.component.d.ts +89 -0
  44. package/lib/axes/y-quantitative-axis/y-quantitative-axis-builder.d.ts +29 -0
  45. package/lib/axes/y-quantitative-axis/y-quantitative-axis-config.d.ts +25 -0
  46. package/lib/axes/y-quantitative-axis/y-quantitative-axis.component.d.ts +54 -0
  47. package/lib/bars/bars.component.d.ts +91 -0
  48. package/lib/bars/bars.module.d.ts +8 -0
  49. package/lib/bars/config/backgrounds/bars-backgrounds-builder.d.ts +27 -0
  50. package/lib/bars/config/backgrounds/bars-backgrounds-options.d.ts +4 -0
  51. package/lib/bars/config/backgrounds/bars-backgrounds.d.ts +6 -0
  52. package/lib/bars/config/bars-builder.d.ts +132 -0
  53. package/lib/bars/config/bars-config.d.ts +27 -0
  54. package/lib/bars/config/bars-dimensions.d.ts +11 -0
  55. package/lib/bars/config/bars-options.d.ts +16 -0
  56. package/lib/bars/config/labels/bars-labels-builder.d.ts +48 -0
  57. package/lib/bars/config/labels/bars-labels-options.d.ts +9 -0
  58. package/lib/bars/config/labels/bars-labels.d.ts +11 -0
  59. package/lib/bars/events/actions/bars-click-actions.d.ts +8 -0
  60. package/lib/bars/events/actions/bars-hover-actions.d.ts +12 -0
  61. package/lib/bars/events/actions/bars-hover-move-actions.d.ts +8 -0
  62. package/lib/bars/events/bars-events.directive.d.ts +38 -0
  63. package/lib/bars/events/bars-interaction-output.d.ts +16 -0
  64. package/lib/bars/events/bars-tooltip-positioner.d.ts +13 -0
  65. package/lib/bars/index.d.ts +12 -0
  66. package/lib/charts/chart/chart.component.d.ts +73 -0
  67. package/lib/charts/chart/chart.d.ts +4 -0
  68. package/lib/charts/chart/chart.token.d.ts +3 -0
  69. package/lib/charts/chart/config/chart-builder.d.ts +94 -0
  70. package/lib/charts/chart/config/chart-config.d.ts +16 -0
  71. package/lib/charts/chart/config/chart-options.d.ts +10 -0
  72. package/lib/charts/chart.module.d.ts +9 -0
  73. package/lib/charts/index.d.ts +8 -0
  74. package/lib/charts/map-chart/map-chart.component.d.ts +40 -0
  75. package/lib/charts/xy-chart/xy-chart.component.d.ts +40 -0
  76. package/lib/core/common-behaviors/constructor.d.ts +2 -0
  77. package/lib/core/index.d.ts +5 -0
  78. package/lib/core/types/layout.d.ts +24 -0
  79. package/lib/core/types/scale.d.ts +5 -0
  80. package/lib/core/types/values.d.ts +7 -0
  81. package/lib/core/utilities/colors.d.ts +13 -0
  82. package/lib/core/utilities/fill-utilities.d.ts +7 -0
  83. package/lib/core/utilities/type-guards.d.ts +6 -0
  84. package/lib/core/utilities/value-format.d.ts +11 -0
  85. package/lib/core/utilities/values.d.ts +16 -0
  86. package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-builder.d.ts +39 -0
  87. package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-options.d.ts +18 -0
  88. package/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position.d.ts +38 -0
  89. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/concrete-domain-padding.d.ts +5 -0
  90. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/domain-padding.d.ts +20 -0
  91. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over-options.d.ts +3 -0
  92. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over.d.ts +9 -0
  93. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel-options.d.ts +3 -0
  94. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel.d.ts +10 -0
  95. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval-options.d.ts +3 -0
  96. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval.d.ts +8 -0
  97. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig-options.d.ts +3 -0
  98. package/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig.d.ts +8 -0
  99. package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-builder.d.ts +71 -0
  100. package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-options.d.ts +5 -0
  101. package/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position.d.ts +30 -0
  102. package/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension-options.d.ts +8 -0
  103. package/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension.d.ts +28 -0
  104. package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-builder.d.ts +69 -0
  105. package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-options.d.ts +6 -0
  106. package/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value.d.ts +29 -0
  107. package/lib/data-dimensions/dimension-builder.d.ts +21 -0
  108. package/lib/data-dimensions/dimension-options.d.ts +11 -0
  109. package/lib/data-dimensions/dimension.d.ts +16 -0
  110. package/lib/data-dimensions/index.d.ts +9 -0
  111. package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-builder.d.ts +53 -0
  112. package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-options.d.ts +8 -0
  113. package/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position.d.ts +44 -0
  114. package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-builder.d.ts +45 -0
  115. package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-options.d.ts +7 -0
  116. package/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.d.ts +38 -0
  117. package/lib/data-export/data-export-config.d.ts +50 -0
  118. package/lib/data-export/data-export.d.ts +7 -0
  119. package/lib/data-export/index.d.ts +2 -0
  120. package/lib/dots/config/dots-builder.d.ts +110 -0
  121. package/lib/dots/config/dots-config.d.ts +26 -0
  122. package/lib/dots/config/dots-options.d.ts +17 -0
  123. package/lib/dots/dots.component.d.ts +55 -0
  124. package/lib/dots/dots.module.d.ts +8 -0
  125. package/lib/dots/events/actions/dots-hover-actions.d.ts +6 -0
  126. package/lib/dots/events/actions/dots-hover-move-actions.d.ts +10 -0
  127. package/lib/dots/events/dots-events.directive.d.ts +37 -0
  128. package/lib/dots/events/dots-interaction-output.d.ts +14 -0
  129. package/lib/dots/events/dots-tooltip-positioner.d.ts +13 -0
  130. package/lib/dots/index.d.ts +9 -0
  131. package/lib/events/events.directive.d.ts +43 -0
  132. package/lib/events/events.types.d.ts +34 -0
  133. package/lib/events/index.d.ts +4 -0
  134. package/lib/events/interaction-output.d.ts +33 -0
  135. package/lib/events/tooltip-positioner.d.ts +6 -0
  136. package/lib/fill-definitions/fill-definitions.d.ts +4 -0
  137. package/lib/fill-definitions/index.d.ts +1 -0
  138. package/lib/geographies/config/geographies-builder.d.ts +80 -0
  139. package/lib/geographies/config/geographies-config.d.ts +19 -0
  140. package/lib/geographies/config/geographies-options.d.ts +13 -0
  141. package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-builder.d.ts +63 -0
  142. package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-options.d.ts +16 -0
  143. package/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer.d.ts +30 -0
  144. package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-builder.d.ts +40 -0
  145. package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-options.d.ts +8 -0
  146. package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension.d.ts +18 -0
  147. package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-enums.d.ts +10 -0
  148. package/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-types.d.ts +8 -0
  149. package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-builder.d.ts +10 -0
  150. package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-options.d.ts +4 -0
  151. package/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins.d.ts +8 -0
  152. package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-builder.d.ts +14 -0
  153. package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-options.d.ts +4 -0
  154. package/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.d.ts +20 -0
  155. package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-builder.d.ts +29 -0
  156. package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-options.d.ts +5 -0
  157. package/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins.d.ts +23 -0
  158. package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-builder.d.ts +16 -0
  159. package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-options.d.ts +4 -0
  160. package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.d.ts +18 -0
  161. package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-builder.d.ts +21 -0
  162. package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-options.d.ts +5 -0
  163. package/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.d.ts +24 -0
  164. package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-builder.d.ts +26 -0
  165. package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-options.d.ts +5 -0
  166. package/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.d.ts +12 -0
  167. package/lib/geographies/config/layers/geographies-layer/geographies-layer-builder.d.ts +52 -0
  168. package/lib/geographies/config/layers/geographies-layer/geographies-layer-options.d.ts +16 -0
  169. package/lib/geographies/config/layers/geographies-layer/geographies-layer.d.ts +29 -0
  170. package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-builder.d.ts +25 -0
  171. package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-options.d.ts +11 -0
  172. package/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer.d.ts +16 -0
  173. package/lib/geographies/config/layers/labels/geographies-labels-builder.d.ts +97 -0
  174. package/lib/geographies/config/layers/labels/geographies-labels-options.d.ts +33 -0
  175. package/lib/geographies/config/layers/labels/geographies-labels.d.ts +20 -0
  176. package/lib/geographies/events/actions/geographies-click-actions.d.ts +7 -0
  177. package/lib/geographies/events/actions/geographies-hover-actions.d.ts +7 -0
  178. package/lib/geographies/events/actions/geographies-hover-move-actions.d.ts +7 -0
  179. package/lib/geographies/events/geographies-events.directive.d.ts +38 -0
  180. package/lib/geographies/events/geographies-interaction-output.d.ts +16 -0
  181. package/lib/geographies/events/geographies-tooltip-positioner.d.ts +13 -0
  182. package/lib/geographies/geographies-feature.d.ts +5 -0
  183. package/lib/geographies/geographies.component.d.ts +36 -0
  184. package/lib/geographies/geographies.module.d.ts +8 -0
  185. package/lib/geographies/index.d.ts +32 -0
  186. package/lib/grouped-bars/config/grouped-bars-builder.d.ts +29 -0
  187. package/lib/grouped-bars/config/grouped-bars-config.d.ts +10 -0
  188. package/lib/grouped-bars/config/grouped-bars-options.d.ts +5 -0
  189. package/lib/grouped-bars/events/grouped-bars-events.directive.d.ts +35 -0
  190. package/lib/grouped-bars/grouped-bars.component.d.ts +19 -0
  191. package/lib/grouped-bars/grouped-bars.module.d.ts +8 -0
  192. package/lib/grouped-bars/index.d.ts +7 -0
  193. package/lib/image-download/image-download-config.d.ts +31 -0
  194. package/lib/image-download/image-download-enums.d.ts +6 -0
  195. package/lib/image-download/image-download-options.d.ts +14 -0
  196. package/lib/image-download/image-download.service.d.ts +16 -0
  197. package/lib/image-download/index.d.ts +4 -0
  198. package/lib/lines/config/area-fills/area-fills-builder.d.ts +45 -0
  199. package/lib/lines/config/area-fills/area-fills-options.d.ts +7 -0
  200. package/lib/lines/config/area-fills/area-fills.d.ts +9 -0
  201. package/lib/lines/config/lines-builder.d.ts +101 -0
  202. package/lib/lines/config/lines-config.d.ts +37 -0
  203. package/lib/lines/config/lines-options.d.ts +18 -0
  204. package/lib/lines/config/stroke/lines-stroke-builder.d.ts +59 -0
  205. package/lib/lines/config/stroke/lines-stroke-options.d.ts +5 -0
  206. package/lib/lines/config/stroke/lines-stroke.d.ts +7 -0
  207. package/lib/lines/events/actions/lines-click-actions.d.ts +6 -0
  208. package/lib/lines/events/actions/lines-hover-move-actions.d.ts +41 -0
  209. package/lib/lines/events/actions/lines-marker-click-actions.d.ts +6 -0
  210. package/lib/lines/events/lines-events.directive.d.ts +49 -0
  211. package/lib/lines/events/lines-interaction-output.d.ts +16 -0
  212. package/lib/lines/events/lines-tooltip-positioner.d.ts +13 -0
  213. package/lib/lines/index.d.ts +11 -0
  214. package/lib/lines/lines.component.d.ts +53 -0
  215. package/lib/lines/lines.module.d.ts +8 -0
  216. package/lib/map-legend/continuous-legend/continuous-legend.component.d.ts +18 -0
  217. package/lib/map-legend/discontinuous-legend/discontinuous-legend.component.d.ts +12 -0
  218. package/lib/map-legend/index.d.ts +2 -0
  219. package/lib/map-legend/map-legend-base.d.ts +33 -0
  220. package/lib/map-legend/map-legend.component.d.ts +27 -0
  221. package/lib/map-legend/map-legend.module.d.ts +7 -0
  222. package/lib/marks/aux-marks/aux-marks.d.ts +10 -0
  223. package/lib/marks/aux-marks/config/aux-marks-builder.d.ts +11 -0
  224. package/lib/marks/aux-marks/config/aux-marks-config.d.ts +4 -0
  225. package/lib/marks/config/marks-config.d.ts +9 -0
  226. package/lib/marks/config/marks-options.d.ts +8 -0
  227. package/lib/marks/index.d.ts +15 -0
  228. package/lib/marks/map-marks/map-aux-marks/map-aux-marks.d.ts +17 -0
  229. package/lib/marks/map-marks/map-primary-marks/map-primary-marks.d.ts +20 -0
  230. package/lib/marks/marks.d.ts +31 -0
  231. package/lib/marks/primary-marks/config/primary-marks-builder.d.ts +32 -0
  232. package/lib/marks/primary-marks/config/primary-marks-config.d.ts +5 -0
  233. package/lib/marks/primary-marks/primary-marks.d.ts +23 -0
  234. package/lib/marks/xy-marks/xy-aux-marks/xy-aux-marks.d.ts +16 -0
  235. package/lib/marks/xy-marks/xy-marks-config.d.ts +4 -0
  236. package/lib/marks/xy-marks/xy-marks.d.ts +6 -0
  237. package/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks-config.d.ts +4 -0
  238. package/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks.d.ts +20 -0
  239. package/lib/point-markers/index.d.ts +2 -0
  240. package/lib/point-markers/point-markers-builder.d.ts +47 -0
  241. package/lib/point-markers/point-markers-options.d.ts +6 -0
  242. package/lib/point-markers/point-markers.d.ts +8 -0
  243. package/lib/quantitative-rules/config/labels/quantitative-rules-labels-builder.d.ts +60 -0
  244. package/lib/quantitative-rules/config/labels/quantitative-rules-labels-options.d.ts +9 -0
  245. package/lib/quantitative-rules/config/labels/quantitative-rules-labels.d.ts +11 -0
  246. package/lib/quantitative-rules/config/quantitative-rules-builder.d.ts +52 -0
  247. package/lib/quantitative-rules/config/quantitative-rules-config.d.ts +12 -0
  248. package/lib/quantitative-rules/config/quantitative-rules-dimensions.d.ts +8 -0
  249. package/lib/quantitative-rules/config/quantitative-rules-options.d.ts +10 -0
  250. package/lib/quantitative-rules/index.d.ts +6 -0
  251. package/lib/quantitative-rules/quantitative-rules.component.d.ts +27 -0
  252. package/lib/quantitative-rules/quantitative-rules.module.d.ts +7 -0
  253. package/lib/stacked-area/config/stacked-area-builder.d.ts +85 -0
  254. package/lib/stacked-area/config/stacked-area-config.d.ts +36 -0
  255. package/lib/stacked-area/config/stacked-area-options.d.ts +21 -0
  256. package/lib/stacked-area/events/actions/stacked-area-hover-move-actions.d.ts +7 -0
  257. package/lib/stacked-area/events/stacked-area-events.directive.d.ts +38 -0
  258. package/lib/stacked-area/events/stacked-area-interaction-output.d.ts +28 -0
  259. package/lib/stacked-area/events/stacked-area-tooltip-positioner.d.ts +16 -0
  260. package/lib/stacked-area/index.d.ts +7 -0
  261. package/lib/stacked-area/stacked-area.component.d.ts +51 -0
  262. package/lib/stacked-area/stacked-area.module.d.ts +8 -0
  263. package/lib/stacked-bars/config/stacked-bars-builder.d.ts +26 -0
  264. package/lib/stacked-bars/config/stacked-bars-config.d.ts +16 -0
  265. package/lib/stacked-bars/config/stacked-bars-options.d.ts +7 -0
  266. package/lib/stacked-bars/events/actions/stacked-bars-click-actions.d.ts +8 -0
  267. package/lib/stacked-bars/events/actions/stacked-bars-hover-actions.d.ts +8 -0
  268. package/lib/stacked-bars/events/actions/stacked-bars-hover-move-actions.d.ts +8 -0
  269. package/lib/stacked-bars/events/stacked-bars-events.directive.d.ts +39 -0
  270. package/lib/stacked-bars/index.d.ts +10 -0
  271. package/lib/stacked-bars/stacked-bars.component.d.ts +26 -0
  272. package/lib/stacked-bars/stacked-bars.module.d.ts +8 -0
  273. package/lib/stroke/base/stroke-base-options.d.ts +7 -0
  274. package/lib/stroke/base/stroke-base.d.ts +8 -0
  275. package/lib/stroke/index.d.ts +2 -0
  276. package/lib/stroke/stroke-builder.d.ts +56 -0
  277. package/lib/stroke/stroke-options.d.ts +4 -0
  278. package/lib/stroke/stroke.d.ts +6 -0
  279. package/lib/svg-text-wrap/index.d.ts +2 -0
  280. package/lib/svg-text-wrap/svg-text-wrap-builder.d.ts +58 -0
  281. package/lib/svg-text-wrap/svg-text-wrap-options.d.ts +8 -0
  282. package/lib/svg-text-wrap/svg-text-wrap.d.ts +13 -0
  283. package/lib/tooltips/config/tooltip.d.ts +5 -0
  284. package/lib/tooltips/html-tooltip/config/html-tooltip-builder.d.ts +57 -0
  285. package/lib/tooltips/html-tooltip/config/html-tooltip-config.d.ts +15 -0
  286. package/lib/tooltips/html-tooltip/config/html-tooltip-options.d.ts +11 -0
  287. package/lib/tooltips/html-tooltip/config/position/tooltip-position-builder.d.ts +34 -0
  288. package/lib/tooltips/html-tooltip/config/position/tooltip-position.d.ts +23 -0
  289. package/lib/tooltips/html-tooltip/config/size/tooltip-size-builder.d.ts +16 -0
  290. package/lib/tooltips/html-tooltip/config/size/tooltip-size-options.d.ts +8 -0
  291. package/lib/tooltips/html-tooltip/config/size/tooltip-size.d.ts +10 -0
  292. package/lib/tooltips/html-tooltip/html-tooltip.directive.d.ts +43 -0
  293. package/lib/tooltips/html-tooltip/html-tooltip.module.d.ts +10 -0
  294. package/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.d.ts +7 -0
  295. package/lib/tooltips/index.d.ts +11 -0
  296. package/lib/xy-background/index.d.ts +2 -0
  297. package/lib/xy-background/xy-background.component.d.ts +9 -0
  298. package/lib/xy-background/xy-background.module.d.ts +7 -0
  299. package/package.json +40 -0
  300. package/public-api.d.ts +23 -0
@@ -0,0 +1,39 @@
1
+ import { ScaleTime } from 'd3';
2
+ import { DataDimensionBuilder } from '../../dimension-builder';
3
+ import { DateChartPositionDimension } from './date-chart-position';
4
+ export declare class DateChartPositionDimensionBuilder<Datum> extends DataDimensionBuilder<Datum, Date> {
5
+ private _domain;
6
+ private _formatSpecifier;
7
+ private _scaleFn;
8
+ constructor();
9
+ /**
10
+ * OPTIONAL. Sets the domain of the scale.
11
+ *
12
+ * If not provided, the domain will be determined by the data.
13
+ */
14
+ domain(domain: null): this;
15
+ domain(domain: [Date, Date]): this;
16
+ /**
17
+ * OPTIONAL. Sets a format specifier that will be applied to values from this dimension for display purposes, for example, in a tooltip.
18
+ *
19
+ * This is a string that is passed to D3's timeFormat function.
20
+ *
21
+ * @default '%Y %m'
22
+ */
23
+ formatSpecifier(formatSpecifier: null): this;
24
+ formatSpecifier(formatSpecifier: string): this;
25
+ /**
26
+ * OPTIONAL. This is a D3 scale function that maps values from the dimension's domain to the dimension's range.
27
+ *
28
+ * @default d3.scaleUtc
29
+ */
30
+ scaleFn(scaleFn: null): this;
31
+ scaleFn(scaleFn: (domain?: Iterable<Date>, range?: Iterable<number>) => ScaleTime<number, number>): this;
32
+ /**
33
+ * @internal This function is for internal use only and should never be called by the user.
34
+ *
35
+ * @param dimensionName A user-intelligible name for the dimension being built. Used for error messages. Should be title cased.
36
+ */
37
+ _build(dimensionName: string): DateChartPositionDimension<Datum>;
38
+ private validateBuilder;
39
+ }
@@ -0,0 +1,18 @@
1
+ import { ScaleTime } from 'd3';
2
+ import { DataDimensionOptions } from '../../dimension-options';
3
+ export interface DateChartPositionDimensionOptions<Datum> extends DataDimensionOptions<Datum, Date> {
4
+ /**
5
+ * An optional, user-provided range of values that is used as the domain of the dimension's scale.
6
+ *
7
+ * If not provided by the user, it remains undefined.
8
+ */
9
+ domain: [Date, Date];
10
+ /**
11
+ * A format specifier that will be applied to the value of this dimension for display purposes.
12
+ */
13
+ readonly formatSpecifier: string;
14
+ /**
15
+ * The scale function for the dimension. This is a D3 scale function that maps values from the dimension's domain to the dimension's range.
16
+ */
17
+ scaleFn: (domain?: Iterable<Date>, range?: Iterable<number>) => ScaleTime<number, number>;
18
+ }
@@ -0,0 +1,38 @@
1
+ import { ScaleTime } from 'd3';
2
+ import { DataDimension } from '../../dimension';
3
+ import { DateChartPositionDimensionOptions } from './date-chart-position-options';
4
+ /**
5
+ * A dimension that transforms Date values into a position on a chart.
6
+ *
7
+ * This dimension is used for the positional dimensions of a chart, such as x and y. The underlying scale will always be a [D3 time scale](https://d3js.org/d3-scale/time). The range of the scale will be a dimension from the chart.
8
+ *
9
+ * The generic is the type of the data that will be passed to the dimension.
10
+ *
11
+ * TESTABLE FUNCTIONALITY
12
+ *
13
+ * - It extracts values for the dimension from data.
14
+ * - tested in: lines.cy.ts
15
+ * - It sets the domain of the dimension.
16
+ * - tested in: lines.cy.ts
17
+ * - It creates and returns a scale from a range.
18
+ * - tested in: lines.cy.ts
19
+ * - It checks if a value is in valid.
20
+ * - tested in: lines.cy.ts
21
+ * - The domain will be unique values from the user-provided domain if the user provides a domain.
22
+ * - tested in: date-chart-position.spec.ts
23
+ * - The domain will be unique values from the data if no custom domain is given by the user.
24
+ * - tested in: date-chart-position.spec.ts
25
+ * - The domain can be set in reverse order.
26
+ * - tested in: date-chart-position.spec.ts
27
+ */
28
+ export declare class DateChartPositionDimension<Datum> extends DataDimension<Datum, Date> implements DateChartPositionDimensionOptions<Datum> {
29
+ private calculatedDomain;
30
+ readonly domain: [Date, Date];
31
+ readonly formatSpecifier: string;
32
+ scaleFn: (domain?: Iterable<Date>, range?: Iterable<number>) => ScaleTime<number, number>;
33
+ constructor(options: DateChartPositionDimensionOptions<Datum>);
34
+ setPropertiesFromData(data: Datum[]): void;
35
+ protected setDomain(): void;
36
+ getScaleFromRange(range: [number, number]): ScaleTime<number, number>;
37
+ isValidValue(x: unknown): boolean;
38
+ }
@@ -0,0 +1,5 @@
1
+ import { PercentOverDomainPadding } from './percent-over/percent-over';
2
+ import { PixelDomainPadding } from './pixel/pixel';
3
+ import { RoundUpToIntervalDomainPadding } from './round-to-interval/round-to-interval';
4
+ import { RoundUpToSigFigDomainPadding } from './round-to-sig-fig/round-to-sig-fig';
5
+ export type ConcreteDomainPadding = RoundUpToSigFigDomainPadding | RoundUpToIntervalDomainPadding | PercentOverDomainPadding | PixelDomainPadding;
@@ -0,0 +1,20 @@
1
+ import { ScaleContinuousNumeric } from 'd3';
2
+ import { ValueExtent } from '../../../../core/types/values';
3
+ export declare enum DomainPaddingType {
4
+ roundUp = "roundUp",
5
+ roundInterval = "roundInterval",
6
+ percentOver = "percentOver",
7
+ numPixels = "numPixels"
8
+ }
9
+ export interface PaddedDomainArguments {
10
+ value?: number;
11
+ valueType: keyof typeof ValueExtent;
12
+ scaleFn?: (domain?: Iterable<number>, range?: Iterable<number>) => ScaleContinuousNumeric<number, number>;
13
+ unpaddedDomain?: [number, number];
14
+ dimensionRange?: [number, number];
15
+ }
16
+ export declare abstract class DomainPadding {
17
+ abstract getPaddedValue(args: PaddedDomainArguments): number;
18
+ getPaddedDomain(unpaddedDomain: [number, number], scaleFn: any, dimensionRange?: [number, number]): [number, number];
19
+ protected getPaddedDomainForPositiveAndNegativeValues(domainMinArgs: PaddedDomainArguments, domainMaxArgs: PaddedDomainArguments, ...args: any): [number, number];
20
+ }
@@ -0,0 +1,3 @@
1
+ export interface PercentOverDomainPaddingOptions {
2
+ percentOver: number;
3
+ }
@@ -0,0 +1,9 @@
1
+ import { DomainPadding, DomainPaddingType, PaddedDomainArguments } from '../domain-padding';
2
+ import { PercentOverDomainPaddingOptions } from './percent-over-options';
3
+ export declare class PercentOverDomainPadding extends DomainPadding implements PercentOverDomainPaddingOptions {
4
+ readonly percentOver: number;
5
+ readonly type: DomainPaddingType.percentOver;
6
+ constructor(options: PercentOverDomainPaddingOptions);
7
+ getPaddedValue(args: PaddedDomainArguments): number;
8
+ private getQuantitativeDomainMaxPercentOver;
9
+ }
@@ -0,0 +1,3 @@
1
+ export interface PixelDomainPaddingOptions {
2
+ numPixels: number;
3
+ }
@@ -0,0 +1,10 @@
1
+ import { ScaleContinuousNumeric } from 'd3';
2
+ import { DomainPadding, DomainPaddingType, PaddedDomainArguments } from '../domain-padding';
3
+ import { PixelDomainPaddingOptions } from './pixel-options';
4
+ export declare class PixelDomainPadding extends DomainPadding implements PixelDomainPaddingOptions {
5
+ readonly numPixels: number;
6
+ readonly type: DomainPaddingType.numPixels;
7
+ constructor(options: PixelDomainPaddingOptions);
8
+ getPaddedValue(args: PaddedDomainArguments): number;
9
+ protected getPaddedDomainForPositiveAndNegativeValues(domainMinArgs: PaddedDomainArguments, domainMaxArgs: PaddedDomainArguments, unpaddedDomain: [number, number], scaleFn: (domain?: Iterable<number>, range?: Iterable<number>) => ScaleContinuousNumeric<number, number>, dimensionRange: [number, number]): [number, number];
10
+ }
@@ -0,0 +1,3 @@
1
+ export interface RoundUpToIntervalDomainPaddingOptions {
2
+ interval: (maxValue: number) => number;
3
+ }
@@ -0,0 +1,8 @@
1
+ import { DomainPadding, DomainPaddingType, PaddedDomainArguments } from '../domain-padding';
2
+ import { RoundUpToIntervalDomainPaddingOptions } from './round-to-interval-options';
3
+ export declare class RoundUpToIntervalDomainPadding extends DomainPadding {
4
+ readonly type: DomainPaddingType.roundInterval;
5
+ readonly interval: (maxValue: number) => number;
6
+ constructor(options: RoundUpToIntervalDomainPaddingOptions);
7
+ getPaddedValue(args: PaddedDomainArguments): number;
8
+ }
@@ -0,0 +1,3 @@
1
+ export interface RoundUpToSigFigDomainPaddingOptions {
2
+ sigFigures: (d: number) => number;
3
+ }
@@ -0,0 +1,8 @@
1
+ import { DomainPadding, DomainPaddingType, PaddedDomainArguments } from '../domain-padding';
2
+ import { RoundUpToSigFigDomainPaddingOptions } from './round-to-sig-fig-options';
3
+ export declare class RoundUpToSigFigDomainPadding extends DomainPadding implements RoundUpToSigFigDomainPaddingOptions {
4
+ readonly sigFigures: (d: number) => number;
5
+ readonly type: DomainPaddingType.roundUp;
6
+ constructor(options: RoundUpToSigFigDomainPaddingOptions);
7
+ getPaddedValue(args: PaddedDomainArguments): number;
8
+ }
@@ -0,0 +1,71 @@
1
+ import { ScaleContinuousNumeric } from 'd3';
2
+ import { DataDimensionBuilder } from '../../dimension-builder';
3
+ import { NumberChartPositionDimension } from './number-chart-position';
4
+ export declare class NumberChartPositionDimensionBuilder<Datum> extends DataDimensionBuilder<Datum, number> {
5
+ private _domain;
6
+ private _formatSpecifier;
7
+ private _includeZeroInDomain;
8
+ private _domainPadding;
9
+ private _scaleFn;
10
+ constructor();
11
+ /**
12
+ * OPTIONAL. Sets the domain of the scale.
13
+ *
14
+ * Should be in the form of [min, max].
15
+ *
16
+ * If not provided, the domain will be determined by the data.
17
+ */
18
+ domain(domain: [number, number]): this;
19
+ domain(domain: null): this;
20
+ /**
21
+ * OPTIONAL. Sets a format specifier that will be applied to the value of this dimension for display purposes.
22
+ */
23
+ formatSpecifier(formatSpecifier: string): this;
24
+ formatSpecifier(formatSpecifier: null): this;
25
+ /**
26
+ * OPTIONAL. Sets a boolean that indicates whether the domain of the dimension's scale should include zero.
27
+ *
28
+ * @default true
29
+ */
30
+ includeZeroInDomain(includeZeroInDomain: boolean): this;
31
+ /**
32
+ * OPTIONAL. Adds additional space between data values and the edge of a chart by increasing the max value of the quantitative domain.
33
+ *
34
+ * For example, if the domain is [0, 100] and the percent is 0.1, the new domain will be [0, 110].
35
+ *
36
+ * @default 0.1
37
+ */
38
+ domainPaddingPercentOver(percentOver?: number): this;
39
+ /**
40
+ * OPTIONAL. Adds additional space between data values and the edge of a chart by increasing the max value of the quantitative domain so that it exceeds its original value by the specified number of pixels.
41
+ *
42
+ * @default 40
43
+ */
44
+ domainPaddingPixels(numPixels?: number): this;
45
+ /**
46
+ * OPTIONAL. Adds additional space between data values and the edge of a chart by increasing the max value to a number that is rounded up to the specified interval.
47
+ *
48
+ * @default () => 1
49
+ */
50
+ domainPaddingRoundUpToInterval(interval?: (d: number) => number): this;
51
+ /**
52
+ * OPTIONAL. Adds additional space between data values and the edge of a chart by increasing the max value to a number that is rounded up to the specified number of significant figures.
53
+ *
54
+ * @default () => 1
55
+ */
56
+ domainPaddingRoundUpToSigFig(sigFigures?: (d: number) => number): this;
57
+ /**
58
+ * OPTIONAL. This is a D3 scale function that maps values from the dimension's domain to the dimension's range.
59
+ *
60
+ * @default d3.scaleLinear
61
+ */
62
+ scaleFn(scaleFn: null): this;
63
+ scaleFn(scaleFn: (domain?: Iterable<number>, range?: Iterable<number>) => ScaleContinuousNumeric<number, number>): this;
64
+ /**
65
+ * @internal This method is not intended to be used by consumers of this library.
66
+ *
67
+ * @param dimensionName A user-intelligible name for the dimension being built. Used for error messages. Should be title cased.
68
+ */
69
+ _build(dimensionName: string): NumberChartPositionDimension<Datum>;
70
+ private validateBuilder;
71
+ }
@@ -0,0 +1,5 @@
1
+ import { NumberDimensionOptions } from '../number-dimension/number-dimension-options';
2
+ import { ConcreteDomainPadding } from './domain-padding/concrete-domain-padding';
3
+ export interface NumberChartPositionDimensionOptions<Datum> extends NumberDimensionOptions<Datum, number> {
4
+ domainPadding?: ConcreteDomainPadding;
5
+ }
@@ -0,0 +1,30 @@
1
+ import { ScaleContinuousNumeric } from 'd3';
2
+ import { NumberDimension } from '../number-dimension/number-dimension';
3
+ import { ConcreteDomainPadding } from './domain-padding/concrete-domain-padding';
4
+ import { NumberChartPositionDimensionOptions } from './number-chart-position-options';
5
+ /**
6
+ * A dimension that transforms number values into a position on a chart.
7
+ *
8
+ * This dimension is used for the positional dimensions of a chart, such as x and y. The resultant scale will confirm to the ScaleContinuousNumeric interface from @types/d3. The range of the scale will be a dimension from the chart.
9
+ *
10
+ * The generic is the type of the data that will be passed to the dimension.
11
+ *
12
+ * TESTABLE FUNCTIONALITY
13
+ *
14
+ * - It extracts values for the dimension from data.
15
+ * - tested in: bars.cy.ts, dots.cy.ts, lines.cy.ts, stacked-bars.cy.ts
16
+ * - It sets the domain of the dimension.
17
+ * - tested in: bars.cy.ts, dots.cy.ts, lines.cy.ts, stacked-bars.cy.ts
18
+ * - It creates and returns a scale from a range and the a padded domain if domain padding is provided.
19
+ * - tested in: quantitative-domain-padding.cy.ts
20
+ * - It creates and returns a scale from a range and the regular domain if domain padding is not provided.
21
+ * - tested in: bars.cy.ts, dots.cy.ts, lines.cy.ts, stacked-bars.cy.ts
22
+ */
23
+ export declare class NumberChartPositionDimension<Datum> extends NumberDimension<Datum> implements NumberChartPositionDimensionOptions<Datum> {
24
+ readonly domainPadding?: ConcreteDomainPadding;
25
+ readonly scaleFn: (domain?: Iterable<number>, range?: Iterable<number>) => ScaleContinuousNumeric<number, number>;
26
+ constructor(options: NumberChartPositionDimensionOptions<Datum>);
27
+ setPropertiesFromData(data: Datum[]): void;
28
+ getScaleFromRange(range: [number, number]): ScaleContinuousNumeric<number, number, never>;
29
+ private getPaddedQuantitativeDomain;
30
+ }
@@ -0,0 +1,8 @@
1
+ import { ScaleContinuousNumeric } from 'd3';
2
+ import { DataDimensionOptions } from '../../dimension-options';
3
+ export interface NumberDimensionOptions<Datum, Range> extends DataDimensionOptions<Datum, number> {
4
+ domain: [number, number];
5
+ formatSpecifier: string;
6
+ includeZeroInDomain: boolean;
7
+ scaleFn: (domain?: Iterable<number>, range?: Iterable<Range>) => ScaleContinuousNumeric<Range, Range>;
8
+ }
@@ -0,0 +1,28 @@
1
+ import { DataDimension } from '../../dimension';
2
+ /**
3
+ * An abstract dimension that for dimensions whose input values are numbers. It assumes that the domain is two numbers.
4
+ *
5
+ * The generic is the type of the data that will be passed to the dimension.
6
+ *
7
+ * TESTABLE FUNCTIONALITY
8
+ *
9
+ * - The domain will be the user=provided domain if the user provides a domain.
10
+ * - tested in: number-dimension.spec.ts
11
+ * - The domain will be [min, max] of values if the user does not provide a domain.
12
+ * - tested in: number-dimension.spec.ts
13
+ * - The domain will include 0 if includeZeroInDomain is true.
14
+ * - tested in: number-dimension.spec.ts
15
+ * - domainIncludesZero will be true if 0 is in the domain.
16
+ * - tested in: number-dimension.spec.ts
17
+ */
18
+ export declare abstract class NumberDimension<Datum> extends DataDimension<Datum, number> {
19
+ protected calculatedDomain: [number, number];
20
+ readonly domain: [number, number];
21
+ domainIncludesZero: boolean;
22
+ readonly formatSpecifier: string;
23
+ readonly includeZeroInDomain: boolean;
24
+ setDomain(valuesOverride?: [number, number]): void;
25
+ protected getCalculatedDomain(domain: [number, number]): [number, number];
26
+ protected setDomainIncludesZero(): void;
27
+ isValidValue(x: unknown): boolean;
28
+ }
@@ -0,0 +1,69 @@
1
+ import { ScaleContinuousNumeric } from 'd3';
2
+ import { VisualValue } from '../../../core';
3
+ import { DataDimensionBuilder } from '../../dimension-builder';
4
+ import { NumberVisualValueDimension } from './number-visual-value';
5
+ export declare class NumberVisualValueDimensionBuilder<Datum, Range extends VisualValue> extends DataDimensionBuilder<Datum, number> {
6
+ private _domain;
7
+ private _formatSpecifier;
8
+ private _includeZeroInDomain;
9
+ private _range;
10
+ private _scale;
11
+ private _scaleFn;
12
+ constructor();
13
+ /**
14
+ * OPTIONAL. Sets the domain of the scale.
15
+ *
16
+ * Should be in the form of [min, max].
17
+ *
18
+ * If not provided, the domain will be determined by the data.
19
+ */
20
+ domain(domain: null): this;
21
+ domain(domain: [number, number]): this;
22
+ /**
23
+ * OPTIONAL. Sets a format specifier that will be applied to the value of this dimension for display purposes.
24
+ */
25
+ formatSpecifier(formatSpecifier: null): this;
26
+ formatSpecifier(formatSpecifier: string): this;
27
+ /**
28
+ * OPTIONAL. Sets a boolean that indicates whether the domain of the dimension's scale should include zero.
29
+ *
30
+ * @default false
31
+ */
32
+ includeZeroInDomain(includeZeroInDomain: boolean): this;
33
+ /**
34
+ * OPTIONAL. Sets a range of visual values that will be the output from D3 scale linear.
35
+ *
36
+ * If not provided, a scale must be provided.
37
+ *
38
+ * For example, this could be a range of colors or sizes.
39
+ *
40
+ * To have all marks use the same visual value, use an array with a single element.
41
+ */
42
+ range(range: null): this;
43
+ range(range: [Range, Range]): this;
44
+ /**
45
+ * OPTIONAL. This is a D3 scale function that maps values from the dimension's domain to the dimension's range.
46
+ *
47
+ * If the user provides a custom scale function through the `scale` method, this will be ignored.
48
+ *
49
+ * @default d3.scaleLinear
50
+ */
51
+ scaleFn(scaleFn: null): this;
52
+ scaleFn(scaleFn: (domain?: Iterable<number>, range?: Iterable<Range>) => ScaleContinuousNumeric<Range, Range>): this;
53
+ /**
54
+ * OPTIONAL. Allows a user to set a completely custom scale that transforms the value returned by this dimension's valueAccessor into a visual value (string or number).
55
+ *
56
+ * If not provided, a range must be provided.
57
+ *
58
+ * If provided, this will override any values provided to domain, range, and scaleFn.
59
+ */
60
+ scale(scale: null): this;
61
+ scale(scale: (value: number) => Range): this;
62
+ /**
63
+ * @internal This method is not intended to be used by consumers of this library.
64
+ *
65
+ * @param dimensionName A user-intelligible name for the dimension being built. Used for error messages. Should be title cased.
66
+ */
67
+ _build(dimensionName: string): NumberVisualValueDimension<Datum, Range>;
68
+ private validateBuilder;
69
+ }
@@ -0,0 +1,6 @@
1
+ import { VisualValue } from '../../../core/types/values';
2
+ import { NumberDimensionOptions } from '../number-dimension/number-dimension-options';
3
+ export interface NumberVisualValueDimensionOptions<Datum, Range extends VisualValue> extends NumberDimensionOptions<Datum, Range> {
4
+ range: [Range, Range];
5
+ scale: (value: number) => Range;
6
+ }
@@ -0,0 +1,29 @@
1
+ import { ScaleContinuousNumeric } from 'd3';
2
+ import { VisualValue } from '../../../core';
3
+ import { NumberDimension } from '../number-dimension/number-dimension';
4
+ import { NumberVisualValueDimensionOptions } from './number-visual-value-options';
5
+ /**
6
+ * A dimension that transforms number values into a value of type number or string.
7
+ *
8
+ * This dimension is intended to be used to set a visual property of an element in a chart.
9
+ *
10
+ * The first generic is the type of the data that will be passed to the dimension. The second generic is the type of the range of the scale / the output value.
11
+ *
12
+ * TESTABLE FUNCTIONALITY
13
+ *
14
+ * - It extracts values for the dimension from data.
15
+ * - tested in: dots.cy.ts
16
+ * - It sets the domain of the dimension.
17
+ * - tested in: dots.cy.ts
18
+ * - It set the scale from the calculated domain and the user-provided range of the user does not provide a scale.
19
+ * - tested in: dots.cy.ts
20
+ */
21
+ export declare class NumberVisualValueDimension<Datum, Range extends VisualValue> extends NumberDimension<Datum> {
22
+ readonly range: [Range, Range];
23
+ private scale;
24
+ readonly scaleFn: (domain?: Iterable<number>, range?: Iterable<Range>) => ScaleContinuousNumeric<Range, Range>;
25
+ constructor(options: NumberVisualValueDimensionOptions<Datum, Range>);
26
+ getScale(): (value: number) => Range;
27
+ setPropertiesFromData(data: Datum[]): void;
28
+ private setScale;
29
+ }
@@ -0,0 +1,21 @@
1
+ import { DataValue } from '../core/types/values';
2
+ export declare abstract class DataDimensionBuilder<Datum, TDataValue extends DataValue> {
3
+ protected _formatFunction: (d: Datum) => string;
4
+ protected _valueAccessor: (d: Datum) => TDataValue;
5
+ /**
6
+ * OPTIONAL. Sets a function that will be applied to the value of this dimension for display purposes.
7
+ *
8
+ * If provided, this function will be used instead of the format specifier (available only for quantitative dimensions)
9
+ */
10
+ formatFunction(formatFunction: null): this;
11
+ formatFunction(formatFunction: (d: Datum) => string): this;
12
+ /**
13
+ * Sets a user-provided method that extracts the value for this dimension from a datum.
14
+ *
15
+ * REQUIRED. for quantitative dimensions.
16
+ *
17
+ * OPTIONAL. for categorical and ordinal dimensions, though if not provided, the properties of those dimensions cannot reflect the data values.
18
+ */
19
+ valueAccessor(valueAccessor: (d: Datum) => TDataValue): this;
20
+ protected validateValueAccessor(dimensionName: string): void;
21
+ }
@@ -0,0 +1,11 @@
1
+ import { DataValue } from '../core/types/values';
2
+ export interface DataDimensionOptions<Datum, TDataValue extends DataValue> {
3
+ /**
4
+ * A function that will be applied to the value of this dimension for display purposes. If provided, this function will be used instead of the format specifier (available only for quantitative dimensions)
5
+ */
6
+ formatFunction: (d: Datum) => string;
7
+ /**
8
+ * A user-provided method that extracts the value for this dimension from a datum. If the dimension is continuous (number of Date), a user *must* provide this method.
9
+ */
10
+ valueAccessor: (d: Datum) => TDataValue;
11
+ }
@@ -0,0 +1,16 @@
1
+ import { DataValue } from '../core/types/values';
2
+ import { DataDimensionOptions } from './dimension-options';
3
+ export declare abstract class DataDimension<Datum, TDataValue extends DataValue> implements DataDimensionOptions<Datum, TDataValue> {
4
+ readonly dimensionType: 'number' | 'ordinal' | 'date';
5
+ readonly formatFunction: (d: Datum) => string;
6
+ readonly valueAccessor: (d: Datum) => TDataValue;
7
+ /**
8
+ * An array of values for this dimension, extracted from the data using the value accessor.
9
+ * @see {@link valueAccessor}
10
+ */
11
+ values: TDataValue[];
12
+ abstract setPropertiesFromData(data: Datum[], ...args: any): void;
13
+ protected abstract setDomain(...args: any): void;
14
+ protected setValues(data: Datum[]): void;
15
+ constructor(dimensionType: 'number' | 'ordinal' | 'date');
16
+ }
@@ -0,0 +1,9 @@
1
+ export * from '../fill-definitions/fill-definitions';
2
+ export * from './continuous-quantitative/date-chart-position/date-chart-position-options';
3
+ export * from './continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over-options';
4
+ export * from './continuous-quantitative/number-chart-position/domain-padding/pixel/pixel-options';
5
+ export * from './continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval-options';
6
+ export * from './continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig-options';
7
+ export * from './continuous-quantitative/number-chart-position/number-chart-position-options';
8
+ export * from './ordinal/ordinal-chart-position/ordinal-chart-position-options';
9
+ export * from './ordinal/ordinal-visual-value/ordinal-visual-value-options';
@@ -0,0 +1,53 @@
1
+ import { DataValue } from '../../../core/types/values';
2
+ import { DataDimensionBuilder } from '../../dimension-builder';
3
+ import { OrdinalChartPositionDimension } from './ordinal-chart-position';
4
+ export declare class OrdinalChartPositionDimensionBuilder<Datum, Domain extends DataValue> extends DataDimensionBuilder<Datum, Domain> {
5
+ private _align;
6
+ private _domain;
7
+ private _paddingInner;
8
+ private _paddingOuter;
9
+ constructor();
10
+ /**
11
+ * OPTIONAL. Sets the alignment of the ordinal scale and is provided to [D3's align method](https://d3js.org/d3-scale/band#band_align)
12
+ *
13
+ * The value must be between 0 and 1.
14
+ *
15
+ * @default 0.5.
16
+ */
17
+ align(align: null): this;
18
+ align(align: number): this;
19
+ /**
20
+ * OPTIONAL. Sets an array of ordinal values that will be used to define the domain of the scale.
21
+ *
22
+ * If not provided, the domain will be determined by the data.
23
+ */
24
+ domain(domain: null): this;
25
+ domain(domain: Domain[]): this;
26
+ /**
27
+ * OPTIONAL. Sets the inner padding of the ordinal scale and is provided to [D3's paddingInner method](https://d3js.org/d3-scale/band#band_paddingInner)
28
+ *
29
+ * Will have no effect if the scale is a point scale.
30
+ *
31
+ * The value must be between 0 and 1.
32
+ *
33
+ * @default 0.1.
34
+ */
35
+ paddingInner(paddingInner: null): this;
36
+ paddingInner(paddingInner: number): this;
37
+ /**
38
+ * OPTIONAL. Sets the outer padding of the ordinal scale and is provided to [D3's paddingOuter method](https://d3js.org/d3-scale/band#band_paddingOuter)
39
+ *
40
+ * The value must be between 0 and 1.
41
+ *
42
+ * @default 0.1.
43
+ */
44
+ paddingOuter(paddingOuter: null): this;
45
+ paddingOuter(paddingOuter: number): this;
46
+ /**
47
+ * @internal This method is not intended to be used by consumers of this library.
48
+ *
49
+ * @param dimensionName A user-intelligible name for the dimension being built. Used for error messages. Should be title cased.
50
+ */
51
+ _build(scaleType: 'band' | 'point', dimensionName: string): OrdinalChartPositionDimension<Datum, Domain>;
52
+ private validateDimension;
53
+ }
@@ -0,0 +1,8 @@
1
+ import { DataValue } from '../../../core/types/values';
2
+ import { DataDimensionOptions } from '../../dimension-options';
3
+ export interface OrdinalChartPositionDimensionOptions<Datum, Domain extends DataValue> extends DataDimensionOptions<Datum, Domain> {
4
+ align: number;
5
+ domain: Domain[];
6
+ paddingInner: number;
7
+ paddingOuter: number;
8
+ }
@@ -0,0 +1,44 @@
1
+ import { ScaleBand, ScalePoint } from 'd3';
2
+ import { DataValue } from '../../../core/types/values';
3
+ import { DataDimension } from '../../dimension';
4
+ import { OrdinalChartPositionDimensionOptions } from './ordinal-chart-position-options';
5
+ /**
6
+ * A dimension that transforms string / number / Date values into a position on a chart.
7
+ *
8
+ * This dimension is used for the positional dimensions of a chart, such as x and y. The underlying scale will always be a [D3 band scale](https://d3js.org/d3-scale/band). The range of the scale will be a dimension from the chart.
9
+ *
10
+ * The first generic is the type of the data that will be passed to the dimension. The second generic is the type of the value that will be used to position the data on the chart.
11
+ *
12
+ * TESTABLE FUNCTIONALITY
13
+ *
14
+ * - It extracts values for the dimension from data.
15
+ * - tested in: bars.cy.ts, dots.cy.ts, stacked-bars.cy.ts
16
+ * - It sets the domain of the dimension.
17
+ * - tested in: bars.cy.ts, dots.cy.ts
18
+ * - It checks if a value is in the domain.
19
+ * - tested in: bars.cy.ts
20
+ * - It creates a scale from a range.
21
+ * - tested in: bars.cy.ts, dots.cy.ts
22
+ * - The domain will be unique values from the user-provided domain if the user provides a domain.
23
+ * - tested in: ordinal-chart-position.spec.ts
24
+ * - The domain will be unique values from the data if no custom domain is given by the user.
25
+ * - tested in: ordinal-chart-position.spec.ts
26
+ * - The domain can be set in reverse order.
27
+ * - tested in: ordinal-chart-position.spec.ts
28
+ */
29
+ export declare class OrdinalChartPositionDimension<Datum, Domain extends DataValue> extends DataDimension<Datum, Domain> implements OrdinalChartPositionDimensionOptions<Datum, Domain> {
30
+ readonly align: number;
31
+ private _calculatedDomain;
32
+ readonly domain: Domain[];
33
+ private internSetDomain;
34
+ readonly paddingInner: number;
35
+ readonly paddingOuter: number;
36
+ private scaleFn;
37
+ readonly valueAccessor: (d: Datum, ...args: any) => Domain;
38
+ constructor(scaleType: 'band' | 'point', options: OrdinalChartPositionDimensionOptions<Datum, Domain>);
39
+ get calculatedDomain(): Domain[];
40
+ setPropertiesFromData(data: Datum[], reverseDomain?: boolean): void;
41
+ protected setDomain(reverseDomain: boolean): void;
42
+ domainIncludes(value: Domain): boolean;
43
+ getScaleFromRange(range: [number, number]): ScaleBand<Domain> | ScalePoint<Domain>;
44
+ }