@galaxy-io/dls 1.2.6 → 1.3.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 (297) hide show
  1. package/README.md +2 -0
  2. package/dist/avatar/Avatar.d.ts +2 -1
  3. package/dist/avatar/Avatar.js +103 -14
  4. package/dist/buttons/Button.d.ts +6 -1
  5. package/dist/buttons/Button.js +8 -4
  6. package/dist/charts/BarChart.d.ts +30 -20
  7. package/dist/charts/BarChart.js +216 -250
  8. package/dist/charts/ChartAxis.d.ts +47 -22
  9. package/dist/charts/ChartAxis.js +81 -60
  10. package/dist/charts/ChartEmptyState.d.ts +17 -0
  11. package/dist/charts/ChartEmptyState.js +29 -0
  12. package/dist/charts/ChartFrame.d.ts +82 -0
  13. package/dist/charts/ChartFrame.js +86 -0
  14. package/dist/charts/ChartLegend.d.ts +27 -4
  15. package/dist/charts/ChartLegend.js +46 -23
  16. package/dist/charts/ChartPrimitives.d.ts +195 -0
  17. package/dist/charts/ChartPrimitives.js +268 -0
  18. package/dist/charts/ChartTooltip.d.ts +27 -6
  19. package/dist/charts/ChartTooltip.js +56 -50
  20. package/dist/charts/LineChart.d.ts +42 -20
  21. package/dist/charts/LineChart.js +186 -237
  22. package/dist/charts/PieChart.d.ts +48 -32
  23. package/dist/charts/PieChart.js +159 -171
  24. package/dist/charts/barChartGeometry.d.ts +87 -0
  25. package/dist/charts/barChartGeometry.js +218 -0
  26. package/dist/charts/chartFormat.d.ts +19 -0
  27. package/dist/charts/chartFormat.js +59 -0
  28. package/dist/charts/chartScales.d.ts +84 -0
  29. package/dist/charts/chartScales.js +111 -0
  30. package/dist/charts/chartTheme.d.ts +18 -0
  31. package/dist/charts/chartTheme.js +26 -0
  32. package/dist/charts/constants.d.ts +225 -18
  33. package/dist/charts/constants.js +240 -32
  34. package/dist/charts/lineChartGeometry.d.ts +54 -0
  35. package/dist/charts/lineChartGeometry.js +143 -0
  36. package/dist/charts/pieChartGeometry.d.ts +48 -0
  37. package/dist/charts/pieChartGeometry.js +89 -0
  38. package/dist/charts/types.d.ts +522 -54
  39. package/dist/charts/types.js +136 -0
  40. package/dist/charts/useChartDimensions.d.ts +40 -0
  41. package/dist/charts/useChartDimensions.js +53 -0
  42. package/dist/charts/useChartFormatters.d.ts +19 -0
  43. package/dist/charts/useChartFormatters.js +20 -0
  44. package/dist/charts/useChartInteraction.d.ts +71 -0
  45. package/dist/charts/useChartInteraction.js +130 -0
  46. package/dist/charts/useChartTooltipPosition.d.ts +53 -0
  47. package/dist/charts/useChartTooltipPosition.js +39 -0
  48. package/dist/hooks/useElementClientSize.d.ts +20 -0
  49. package/dist/hooks/useElementClientSize.js +43 -0
  50. package/dist/inputs/CheckboxInput.d.ts +7 -2
  51. package/dist/inputs/CheckboxInput.js +30 -14
  52. package/dist/inputs/Input.d.ts +5 -2
  53. package/dist/inputs/Input.js +20 -17
  54. package/dist/inputs/MultiSelectInput.js +1 -1
  55. package/dist/inputs/RadioInput.js +7 -2
  56. package/dist/styles.css +68 -75
  57. package/dist/table/InfiniteSpreadsheet.d.ts +6 -0
  58. package/dist/table/InfiniteSpreadsheet.js +235 -0
  59. package/dist/table/InfiniteTable.d.ts +7 -88
  60. package/dist/table/InfiniteTable.js +366 -577
  61. package/dist/{spreadsheet → table}/SpreadsheetCell.d.ts +6 -4
  62. package/dist/table/SpreadsheetCell.js +71 -0
  63. package/dist/{spreadsheet → table}/SpreadsheetCellEditor.js +27 -21
  64. package/dist/table/SpreadsheetHeaderCell.d.ts +23 -0
  65. package/dist/table/SpreadsheetHeaderCell.js +91 -0
  66. package/dist/table/SpreadsheetMenuItem.d.ts +14 -0
  67. package/dist/table/SpreadsheetMenuItem.js +33 -0
  68. package/dist/table/SpreadsheetPrimitives.d.ts +172 -0
  69. package/dist/table/SpreadsheetPrimitives.js +105 -0
  70. package/dist/table/SpreadsheetRow.d.ts +33 -0
  71. package/dist/table/SpreadsheetRow.js +73 -0
  72. package/dist/{spreadsheet → table}/SpreadsheetRowActionCell.d.ts +5 -7
  73. package/dist/table/SpreadsheetRowActionCell.js +51 -0
  74. package/dist/table/TableExpandCell.d.ts +11 -0
  75. package/dist/table/TableExpandCell.js +24 -0
  76. package/dist/table/TableExpandedRow.d.ts +16 -0
  77. package/dist/table/TableExpandedRow.js +77 -0
  78. package/dist/table/TableHeaderCellContent.d.ts +30 -0
  79. package/dist/table/TableHeaderCellContent.js +48 -0
  80. package/dist/table/TablePrimitives.d.ts +307 -0
  81. package/dist/table/TablePrimitives.js +298 -0
  82. package/dist/table/TableSelectCell.d.ts +18 -0
  83. package/dist/table/TableSelectCell.js +26 -0
  84. package/dist/table/TableStatusRow.d.ts +18 -0
  85. package/dist/table/TableStatusRow.js +50 -0
  86. package/dist/table/VirtualizedInfiniteTable.d.ts +11 -27
  87. package/dist/table/VirtualizedInfiniteTable.js +182 -317
  88. package/dist/table/types.d.ts +249 -0
  89. package/dist/table/types.js +51 -0
  90. package/dist/table/useInfiniteScrollSentinel.d.ts +24 -0
  91. package/dist/table/useInfiniteScrollSentinel.js +53 -0
  92. package/dist/{spreadsheet/hooks → table}/useSpreadsheetEditing.d.ts +1 -1
  93. package/dist/{spreadsheet/hooks → table}/useSpreadsheetEditing.js +1 -1
  94. package/dist/table/useTableColumnLayout.d.ts +28 -0
  95. package/dist/table/useTableColumnLayout.js +63 -0
  96. package/dist/table/useTableColumnResize.d.ts +38 -0
  97. package/dist/table/useTableColumnResize.js +155 -0
  98. package/dist/table/useTableKeyboardNavigation.d.ts +25 -0
  99. package/dist/table/useTableKeyboardNavigation.js +83 -0
  100. package/dist/table/useTableRowExpansion.d.ts +24 -0
  101. package/dist/table/useTableRowExpansion.js +62 -0
  102. package/dist/table/useTableRowSelection.d.ts +27 -0
  103. package/dist/table/useTableRowSelection.js +94 -0
  104. package/dist/table/utils.d.ts +50 -0
  105. package/dist/table/utils.js +78 -0
  106. package/dist/text/MarkdownText.js +45 -27
  107. package/dist/theme/variants/dark.js +1 -1
  108. package/dist/widget/Widget.d.ts +2 -0
  109. package/dist/widget/Widget.js +14 -7
  110. package/package.json +1 -5
  111. package/dist/assets/components/enrichment/PerplexityIcon.d.ts +0 -3
  112. package/dist/assets/components/enrichment/PerplexityIcon.js +0 -35
  113. package/dist/assets/components/enrichment/TavilyIcon.d.ts +0 -3
  114. package/dist/assets/components/enrichment/TavilyIcon.js +0 -15
  115. package/dist/assets/components/onboarding/TenantSetupDark.d.ts +0 -3
  116. package/dist/assets/components/onboarding/TenantSetupDark.js +0 -498
  117. package/dist/assets/components/onboarding/TenantSetupLight.d.ts +0 -3
  118. package/dist/assets/components/onboarding/TenantSetupLight.js +0 -482
  119. package/dist/assets/components/onboarding/UserSetupDark.d.ts +0 -3
  120. package/dist/assets/components/onboarding/UserSetupDark.js +0 -1086
  121. package/dist/assets/components/onboarding/UserSetupLight.d.ts +0 -3
  122. package/dist/assets/components/onboarding/UserSetupLight.js +0 -1024
  123. package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.d.ts +0 -3
  124. package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.js +0 -466
  125. package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.d.ts +0 -3
  126. package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.js +0 -460
  127. package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.d.ts +0 -3
  128. package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.js +0 -336
  129. package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.d.ts +0 -3
  130. package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.js +0 -336
  131. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.d.ts +0 -3
  132. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.js +0 -153
  133. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.d.ts +0 -3
  134. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.js +0 -153
  135. package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.d.ts +0 -3
  136. package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.js +0 -117
  137. package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.d.ts +0 -3
  138. package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.js +0 -117
  139. package/dist/assets/components/projects/MappingMethodBlankDark.d.ts +0 -3
  140. package/dist/assets/components/projects/MappingMethodBlankDark.js +0 -150
  141. package/dist/assets/components/projects/MappingMethodBlankDarkHovered.d.ts +0 -3
  142. package/dist/assets/components/projects/MappingMethodBlankDarkHovered.js +0 -150
  143. package/dist/assets/components/projects/MappingMethodBlankLight.d.ts +0 -3
  144. package/dist/assets/components/projects/MappingMethodBlankLight.js +0 -150
  145. package/dist/assets/components/projects/MappingMethodBlankLightHovered.d.ts +0 -3
  146. package/dist/assets/components/projects/MappingMethodBlankLightHovered.js +0 -150
  147. package/dist/assets/components/projects/MappingMethodJsonDark.d.ts +0 -3
  148. package/dist/assets/components/projects/MappingMethodJsonDark.js +0 -90
  149. package/dist/assets/components/projects/MappingMethodJsonDarkHovered.d.ts +0 -3
  150. package/dist/assets/components/projects/MappingMethodJsonDarkHovered.js +0 -90
  151. package/dist/assets/components/projects/MappingMethodJsonLight.d.ts +0 -3
  152. package/dist/assets/components/projects/MappingMethodJsonLight.js +0 -90
  153. package/dist/assets/components/projects/MappingMethodJsonLightHovered.d.ts +0 -3
  154. package/dist/assets/components/projects/MappingMethodJsonLightHovered.js +0 -90
  155. package/dist/assets/components/projects/ProjectsEmptyStateDark.d.ts +0 -3
  156. package/dist/assets/components/projects/ProjectsEmptyStateDark.js +0 -454
  157. package/dist/assets/components/projects/ProjectsEmptyStateLight.d.ts +0 -3
  158. package/dist/assets/components/projects/ProjectsEmptyStateLight.js +0 -456
  159. package/dist/assets/components/root/CreateProjectActionCardDark.d.ts +0 -3
  160. package/dist/assets/components/root/CreateProjectActionCardDark.js +0 -1796
  161. package/dist/assets/components/root/CreateProjectActionCardDarkHovered.d.ts +0 -3
  162. package/dist/assets/components/root/CreateProjectActionCardDarkHovered.js +0 -1796
  163. package/dist/assets/components/root/CreateProjectActionCardLight.d.ts +0 -3
  164. package/dist/assets/components/root/CreateProjectActionCardLight.js +0 -1786
  165. package/dist/assets/components/root/CreateProjectActionCardLightHovered.d.ts +0 -3
  166. package/dist/assets/components/root/CreateProjectActionCardLightHovered.js +0 -1786
  167. package/dist/assets/components/root/CreateSourceActionCardDark.d.ts +0 -3
  168. package/dist/assets/components/root/CreateSourceActionCardDark.js +0 -879
  169. package/dist/assets/components/root/CreateSourceActionCardDarkHovered.d.ts +0 -3
  170. package/dist/assets/components/root/CreateSourceActionCardDarkHovered.js +0 -879
  171. package/dist/assets/components/root/CreateSourceActionCardLight.d.ts +0 -3
  172. package/dist/assets/components/root/CreateSourceActionCardLight.js +0 -889
  173. package/dist/assets/components/root/CreateSourceActionCardLightHovered.d.ts +0 -3
  174. package/dist/assets/components/root/CreateSourceActionCardLightHovered.js +0 -889
  175. package/dist/assets/components/sources/AttioIcon.d.ts +0 -3
  176. package/dist/assets/components/sources/AttioIcon.js +0 -11
  177. package/dist/assets/components/sources/BigquerySourceIcon.d.ts +0 -3
  178. package/dist/assets/components/sources/BigquerySourceIcon.js +0 -39
  179. package/dist/assets/components/sources/BrowserbaseSourceIcon.d.ts +0 -3
  180. package/dist/assets/components/sources/BrowserbaseSourceIcon.js +0 -35
  181. package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.d.ts +0 -3
  182. package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.js +0 -13
  183. package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.d.ts +0 -3
  184. package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.js +0 -13
  185. package/dist/assets/components/sources/ConfluenceSourceIcon.d.ts +0 -3
  186. package/dist/assets/components/sources/ConfluenceSourceIcon.js +0 -30
  187. package/dist/assets/components/sources/GithubSourceIcon.d.ts +0 -3
  188. package/dist/assets/components/sources/GithubSourceIcon.js +0 -27
  189. package/dist/assets/components/sources/GoogleDriveIcon.d.ts +0 -3
  190. package/dist/assets/components/sources/GoogleDriveIcon.js +0 -45
  191. package/dist/assets/components/sources/HubspotSourceIcon.d.ts +0 -3
  192. package/dist/assets/components/sources/HubspotSourceIcon.js +0 -14
  193. package/dist/assets/components/sources/JiraSourceIcon.d.ts +0 -3
  194. package/dist/assets/components/sources/JiraSourceIcon.js +0 -54
  195. package/dist/assets/components/sources/LinearSourceIcon.d.ts +0 -3
  196. package/dist/assets/components/sources/LinearSourceIcon.js +0 -14
  197. package/dist/assets/components/sources/MysqlLogoSourceIconDark.d.ts +0 -3
  198. package/dist/assets/components/sources/MysqlLogoSourceIconDark.js +0 -17
  199. package/dist/assets/components/sources/NetsuiteSourceIcon.d.ts +0 -3
  200. package/dist/assets/components/sources/NetsuiteSourceIcon.js +0 -32
  201. package/dist/assets/components/sources/NotionIcon.d.ts +0 -3
  202. package/dist/assets/components/sources/NotionIcon.js +0 -20
  203. package/dist/assets/components/sources/PostgresqlIcon.d.ts +0 -3
  204. package/dist/assets/components/sources/PostgresqlIcon.js +0 -61
  205. package/dist/assets/components/sources/S3Icon.d.ts +0 -3
  206. package/dist/assets/components/sources/S3Icon.js +0 -76
  207. package/dist/assets/components/sources/SalesforceSourceIcon.d.ts +0 -3
  208. package/dist/assets/components/sources/SalesforceSourceIcon.js +0 -23
  209. package/dist/assets/components/sources/SlackIcon.d.ts +0 -3
  210. package/dist/assets/components/sources/SlackIcon.js +0 -32
  211. package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.d.ts +0 -3
  212. package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.js +0 -14
  213. package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.d.ts +0 -3
  214. package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.js +0 -14
  215. package/dist/assets/components/sources/WikipediaSourceIcon.d.ts +0 -3
  216. package/dist/assets/components/sources/WikipediaSourceIcon.js +0 -1490
  217. package/dist/avatar/AvatarEmpty.d.ts +0 -7
  218. package/dist/avatar/AvatarEmpty.js +0 -99
  219. package/dist/avatar/types.d.ts +0 -5
  220. package/dist/avatar/types.js +0 -9
  221. package/dist/charts/utils.d.ts +0 -29
  222. package/dist/charts/utils.js +0 -62
  223. package/dist/icons/BackIcon.d.ts +0 -3
  224. package/dist/icons/BackIcon.js +0 -13
  225. package/dist/icons/CloseIcon.d.ts +0 -3
  226. package/dist/icons/CloseIcon.js +0 -13
  227. package/dist/icons/CreateIcon.d.ts +0 -3
  228. package/dist/icons/CreateIcon.js +0 -13
  229. package/dist/icons/ForwardIcon.d.ts +0 -3
  230. package/dist/icons/ForwardIcon.js +0 -13
  231. package/dist/icons/HelpIcon.d.ts +0 -3
  232. package/dist/icons/HelpIcon.js +0 -14
  233. package/dist/icons/ProjectsIcon.d.ts +0 -3
  234. package/dist/icons/ProjectsIcon.js +0 -12
  235. package/dist/icons/SearchIcon.d.ts +0 -3
  236. package/dist/icons/SearchIcon.js +0 -12
  237. package/dist/icons/SourcesIcon.d.ts +0 -3
  238. package/dist/icons/SourcesIcon.js +0 -12
  239. package/dist/icons/TextIcon.d.ts +0 -4
  240. package/dist/icons/TextIcon.js +0 -22
  241. package/dist/icons/WebScrapeIcon.d.ts +0 -4
  242. package/dist/icons/WebScrapeIcon.js +0 -22
  243. package/dist/icons/WebhookIcon.d.ts +0 -4
  244. package/dist/icons/WebhookIcon.js +0 -22
  245. package/dist/icons/sources/AttioLogomark.d.ts +0 -4
  246. package/dist/icons/sources/AttioLogomark.js +0 -8
  247. package/dist/icons/sources/BrowserbaseLogomark.d.ts +0 -4
  248. package/dist/icons/sources/BrowserbaseLogomark.js +0 -8
  249. package/dist/icons/sources/ClickhouseLogomark.d.ts +0 -4
  250. package/dist/icons/sources/ClickhouseLogomark.js +0 -16
  251. package/dist/icons/sources/ConfluenceLogomark.d.ts +0 -4
  252. package/dist/icons/sources/ConfluenceLogomark.js +0 -8
  253. package/dist/icons/sources/GithubLogomark.d.ts +0 -4
  254. package/dist/icons/sources/GithubLogomark.js +0 -8
  255. package/dist/icons/sources/GoogleBigqueryLogomark.d.ts +0 -4
  256. package/dist/icons/sources/GoogleBigqueryLogomark.js +0 -8
  257. package/dist/icons/sources/GoogleDriveLogomark.d.ts +0 -4
  258. package/dist/icons/sources/GoogleDriveLogomark.js +0 -8
  259. package/dist/icons/sources/HubspotLogomark.d.ts +0 -4
  260. package/dist/icons/sources/HubspotLogomark.js +0 -8
  261. package/dist/icons/sources/JiraLogomark.d.ts +0 -4
  262. package/dist/icons/sources/JiraLogomark.js +0 -8
  263. package/dist/icons/sources/LinearLogomark.d.ts +0 -4
  264. package/dist/icons/sources/LinearLogomark.js +0 -8
  265. package/dist/icons/sources/MySQLLogomark.d.ts +0 -4
  266. package/dist/icons/sources/MySQLLogomark.js +0 -8
  267. package/dist/icons/sources/NetsuiteLogomark.d.ts +0 -4
  268. package/dist/icons/sources/NetsuiteLogomark.js +0 -8
  269. package/dist/icons/sources/NotionLogomark.d.ts +0 -4
  270. package/dist/icons/sources/NotionLogomark.js +0 -8
  271. package/dist/icons/sources/PostgresLogomark.d.ts +0 -4
  272. package/dist/icons/sources/PostgresLogomark.js +0 -8
  273. package/dist/icons/sources/S3Logomark.d.ts +0 -4
  274. package/dist/icons/sources/S3Logomark.js +0 -8
  275. package/dist/icons/sources/SalesforceLogomark.d.ts +0 -4
  276. package/dist/icons/sources/SalesforceLogomark.js +0 -8
  277. package/dist/icons/sources/SlackLogoIconmark.d.ts +0 -4
  278. package/dist/icons/sources/SlackLogoIconmark.js +0 -8
  279. package/dist/icons/sources/SnowflakeLogomark.d.ts +0 -4
  280. package/dist/icons/sources/SnowflakeLogomark.js +0 -16
  281. package/dist/icons/sources/WikipediaLogomark.d.ts +0 -4
  282. package/dist/icons/sources/WikipediaLogomark.js +0 -8
  283. package/dist/spreadsheet/InfiniteSpreadsheet.d.ts +0 -3
  284. package/dist/spreadsheet/InfiniteSpreadsheet.js +0 -265
  285. package/dist/spreadsheet/SpreadsheetAddColumnButton.d.ts +0 -6
  286. package/dist/spreadsheet/SpreadsheetAddColumnButton.js +0 -32
  287. package/dist/spreadsheet/SpreadsheetCell.js +0 -115
  288. package/dist/spreadsheet/SpreadsheetHeaderCell.d.ts +0 -18
  289. package/dist/spreadsheet/SpreadsheetHeaderCell.js +0 -141
  290. package/dist/spreadsheet/SpreadsheetRow.d.ts +0 -21
  291. package/dist/spreadsheet/SpreadsheetRow.js +0 -68
  292. package/dist/spreadsheet/SpreadsheetRowActionCell.js +0 -78
  293. package/dist/spreadsheet/hooks/useColumnResize.d.ts +0 -6
  294. package/dist/spreadsheet/hooks/useColumnResize.js +0 -46
  295. package/dist/spreadsheet/types.d.ts +0 -92
  296. package/dist/spreadsheet/types.js +0 -21
  297. /package/dist/{spreadsheet → table}/SpreadsheetCellEditor.d.ts +0 -0
@@ -1,264 +1,230 @@
1
- import { useGalaxyTheme, withTheme } from "../theme/GalaxyTheme.js";
2
- import Text, { TextSize, TextWeight } from "../text/Text.js";
3
- import FlexWrapper, { AlignItems, FlexDirection, JustifyContent } from "../containers/FlexWrapper.js";
4
- import { useElementWidth } from "../hooks/useElementWidth.js";
5
- import Wrapper from "../containers/Wrapper.js";
6
- import { DEFAULT_BAR_PADDING_INNER, DEFAULT_BAR_PADDING_OUTER, getChartPalette } from "./constants.js";
7
- import { buildBandScale, buildLinearScale, defaultLabelFormatter, defaultValueFormatter, getGroupedMax, getPlotDimensions, getStackedMax, resolveMargin, resolveSeriesColor, roundedTopRectPath } from "./utils.js";
8
- import ChartLegend from "./ChartLegend.js";
9
- import ChartTooltip from "./ChartTooltip.js";
10
- import { XAxis, YAxis } from "./ChartAxis.js";
11
- /* empty css */
12
- import { styled } from "@linaria/react";
13
- import { useCallback, useMemo, useRef, useState } from "react";
14
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { useGalaxyTheme } from "../theme/GalaxyTheme.js";
2
+ import { BarChartNormalization, ChartMarkState } from "./types.js";
3
+ import { addAxisTitleSpace, getValueTicks } from "./chartScales.js";
4
+ import { useChartInteraction } from "./useChartInteraction.js";
5
+ import { useChartFormatters } from "./useChartFormatters.js";
6
+ import { useChartDimensions } from "./useChartDimensions.js";
7
+ import { resolveChartPaletteColor, resolveSeriesColor } from "./chartTheme.js";
8
+ import { buildBarChartGeometry, roundedRectPath } from "./barChartGeometry.js";
9
+ import { ChartBarPath, ChartHitTarget } from "./ChartPrimitives.js";
10
+ import ChartFrame from "./ChartFrame.js";
11
+ import { ChartCategoryAxis, ChartValueAxis } from "./ChartAxis.js";
12
+ import { useCallback, useMemo, useRef } from "react";
13
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
14
  //#region src/charts/BarChart.tsx
16
- var BarChartMode = /* @__PURE__ */ function(BarChartMode) {
17
- BarChartMode["GROUPED"] = "GROUPED";
18
- BarChartMode["STACKED"] = "STACKED";
19
- return BarChartMode;
20
- }({});
21
- var _exp = () => ({ $fillWidth }) => $fillWidth ? "flex" : "inline-flex";
22
- var _exp2 = () => ({ $fillWidth }) => $fillWidth ? "100%" : "auto";
23
- var ChartWrapper = withTheme(/*#__PURE__*/ styled("div")({
24
- name: "ChartWrapper",
25
- class: "c16zjhoz",
26
- propsAsIs: false,
27
- vars: {
28
- "c16zjhoz-0": [_exp()],
29
- "c16zjhoz-1": [_exp2()]
30
- }
31
- }));
32
- var BarChart = ({ data, series, width, height, margin: marginOverride, fillWidth = false, aspectRatio, mode = "STACKED", barRadius = 4, barPaddingInner = DEFAULT_BAR_PADDING_INNER, barPaddingOuter = DEFAULT_BAR_PADDING_OUTER, valueFormatter = defaultValueFormatter, labelFormatter = defaultLabelFormatter, tooltipRenderer, noTooltip = false, showLegend = true, showValues = false, showGrid = true, ariaLabel }) => {
15
+ /**
16
+ * Bar chart with a three-level data model.
17
+ *
18
+ * Grouping and stacking are properties of the data rather than a mode: several
19
+ * `bars` in a group render side by side, several `components` in a bar stack,
20
+ * and a chart doing both at once needs no extra configuration.
21
+ */
22
+ var BarChart = ({ series, groups, width, height, fillWidth, fillHeight, aspectRatio, margin, normalization = BarChartNormalization.NONE, valueUnit, valueFormatter, labelFormatter, valueDomain, categoryLabelMode, categoryAxisTitle, valueAxisTitle, showGrid = true, showLegend = true, noTooltip = false, tooltipRenderer, isLoading = false, contentWhenEmpty, ariaLabel, ariaDescription, onPinnedChange }) => {
33
23
  const { theme } = useGalaxyTheme();
34
24
  const containerRef = useRef(null);
35
- const svgRef = useRef(null);
36
- const [tooltip, setTooltip] = useState(null);
37
- const [hoveredDatumIndex, setHoveredDatumIndex] = useState(null);
38
- const measuredWidth = useElementWidth(containerRef);
39
- const resolvedWidth = fillWidth ? measuredWidth ?? 0 : width ?? 0;
40
- const resolvedHeight = aspectRatio ? resolvedWidth / aspectRatio : height ?? 0;
41
- const palette = useMemo(() => getChartPalette(theme), [theme]);
42
- const margin = useMemo(() => resolveMargin(marginOverride), [marginOverride]);
43
- const { plotWidth, plotHeight } = useMemo(() => getPlotDimensions(resolvedWidth, resolvedHeight, margin), [
44
- resolvedWidth,
45
- resolvedHeight,
46
- margin
47
- ]);
48
- const seriesKeys = useMemo(() => series.map((s) => s.key), [series]);
49
- const labels = useMemo(() => data.map((d) => d.label), [data]);
50
- const xScale = useMemo(() => buildBandScale(labels, [0, plotWidth], barPaddingInner, barPaddingOuter), [
51
- labels,
52
- plotWidth,
53
- barPaddingInner,
54
- barPaddingOuter
55
- ]);
56
- const yMax = useMemo(() => mode === "STACKED" ? getStackedMax(data, seriesKeys) : getGroupedMax(data, seriesKeys), [
57
- data,
58
- seriesKeys,
59
- mode
25
+ const dimensions = useChartDimensions({
26
+ containerRef,
27
+ width,
28
+ height,
29
+ fillWidth,
30
+ fillHeight,
31
+ aspectRatio,
32
+ margin: addAxisTitleSpace(margin, {
33
+ hasValueTitle: Boolean(valueAxisTitle),
34
+ hasCategoryTitle: Boolean(categoryAxisTitle)
35
+ })
36
+ });
37
+ const { plotWidth, plotHeight } = dimensions;
38
+ const { formatValue, formatLabel } = useChartFormatters({
39
+ valueFormatter,
40
+ valueUnit,
41
+ labelFormatter
42
+ });
43
+ /**
44
+ * Axis and tooltip formatting for a percent-normalized chart.
45
+ *
46
+ * Normalization rescales values into 0–1, so the caller's formatter which
47
+ * describes their real units — would label the axis `0.2`, `0.4`. Unless they
48
+ * asked for something specific, show shares as percentages.
49
+ */
50
+ const formatAxisValue = useMemo(() => {
51
+ if (normalization !== BarChartNormalization.PERCENT) return formatValue;
52
+ if (valueFormatter || valueUnit) return formatValue;
53
+ return (value) => `${Math.round(value * 100)}%`;
54
+ }, [
55
+ normalization,
56
+ valueFormatter,
57
+ valueUnit,
58
+ formatValue
60
59
  ]);
61
- const yScale = useMemo(() => buildLinearScale(yMax, [plotHeight, 0]), [yMax, plotHeight]);
62
- const innerScale = useMemo(() => {
63
- if (mode !== "GROUPED") return null;
64
- return buildBandScale(seriesKeys, [0, xScale.bandwidth()], .05, 0);
60
+ const metricKeys = useMemo(() => Object.keys(series), [series]);
61
+ /**
62
+ * True when any bar carries more than one component.
63
+ *
64
+ * This is what decides the colour grammar. In a stacked chart the segments
65
+ * are the thing being compared, so they take the palette and every stack
66
+ * repeats the same ramp; in an unstacked one the metrics are, so each bar
67
+ * takes its metric's colour. Applying the metric colour to a stack would
68
+ * paint every segment identically.
69
+ */
70
+ const isStacked = useMemo(() => groups.some((group) => group.bars.some((bar) => bar.components.length > 1)), [groups]);
71
+ const resolveColor = useCallback(({ metric, componentIndex, isStacked: barIsStacked, explicit }) => {
72
+ if (explicit) return resolveChartPaletteColor(theme, explicit);
73
+ if (barIsStacked) return resolveSeriesColor(theme, componentIndex);
74
+ return resolveSeriesColor(theme, metricKeys.indexOf(metric), series[metric]?.color);
65
75
  }, [
66
- mode,
67
- seriesKeys,
68
- xScale
76
+ theme,
77
+ metricKeys,
78
+ series
79
+ ]);
80
+ const geometry = useMemo(() => buildBarChartGeometry({
81
+ groups,
82
+ plotWidth,
83
+ plotHeight,
84
+ normalization,
85
+ isStacked,
86
+ valueDomain,
87
+ resolveColor
88
+ }), [
89
+ groups,
90
+ plotWidth,
91
+ plotHeight,
92
+ normalization,
93
+ isStacked,
94
+ valueDomain,
95
+ resolveColor
69
96
  ]);
70
- const handleBarMouseEnter = useCallback((datumIndex, x, y) => {
71
- const datum = data[datumIndex];
72
- if (!datum) return;
73
- setHoveredDatumIndex(datumIndex);
74
- setTooltip({
75
- label: datum.label,
76
- items: series.map((s, i) => ({
77
- seriesKey: s.key,
78
- seriesName: s.name,
79
- value: datum.values[s.key] ?? 0,
80
- color: resolveSeriesColor(s, i, palette)
81
- })),
82
- x: x + margin.left,
83
- y: y + margin.top
97
+ const valueTicks = useMemo(() => getValueTicks(geometry.valueScale, valueDomain), [geometry.valueScale, valueDomain]);
98
+ const isEmpty = groups.length === 0;
99
+ const legendItems = useMemo(() => {
100
+ if (!isStacked) return metricKeys.map((metric) => ({
101
+ key: metric,
102
+ label: series[metric].label,
103
+ color: resolveColor({
104
+ metric,
105
+ barIndex: 0,
106
+ componentIndex: 0,
107
+ isStacked: false,
108
+ explicit: series[metric].color
109
+ })
110
+ }));
111
+ const seen = /* @__PURE__ */ new Map();
112
+ for (const group of groups) for (const bar of group.bars) bar.components.forEach((component, componentIndex) => {
113
+ if (!seen.has(component.key)) seen.set(component.key, {
114
+ label: component.label,
115
+ index: componentIndex,
116
+ explicit: component.color
117
+ });
84
118
  });
119
+ return [...seen.entries()].map(([key, { label, index, explicit }]) => ({
120
+ key,
121
+ label,
122
+ color: resolveColor({
123
+ metric: metricKeys[0],
124
+ barIndex: 0,
125
+ componentIndex: index,
126
+ isStacked: true,
127
+ explicit
128
+ })
129
+ }));
85
130
  }, [
86
- data,
131
+ isStacked,
132
+ metricKeys,
87
133
  series,
88
- palette,
89
- margin
134
+ groups,
135
+ resolveColor
90
136
  ]);
91
- const handleBarMouseLeave = useCallback(() => {
92
- setHoveredDatumIndex(null);
93
- setTooltip(null);
94
- }, []);
95
- const handleBarFocus = useCallback((datumIndex, x, y) => {
96
- handleBarMouseEnter(datumIndex, x, y);
97
- }, [handleBarMouseEnter]);
98
- const handleBarBlur = useCallback(() => {
99
- handleBarMouseLeave();
100
- }, [handleBarMouseLeave]);
101
- if (resolvedWidth === 0 || resolvedHeight === 0) return /* @__PURE__ */ jsx(ChartWrapper, {
102
- ref: containerRef,
103
- $fillWidth: fillWidth
137
+ const legendKeys = useMemo(() => legendItems.map((item) => item.key), [legendItems]);
138
+ const interaction = useChartInteraction({
139
+ categoryCount: geometry.bands.length,
140
+ seriesKeys: legendKeys,
141
+ disabled: noTooltip || isLoading || isEmpty,
142
+ onPinnedChange
104
143
  });
105
- const renderStackedBars = () => {
106
- return data.map((datum, datumIndex) => {
107
- const x = xScale(datum.label) ?? 0;
108
- const bandWidth = xScale.bandwidth();
109
- let cumulativeY = plotHeight;
110
- return /* @__PURE__ */ jsx("g", { children: series.map((s, seriesIndex) => {
111
- const value = datum.values[s.key] ?? 0;
112
- if (value === 0) return null;
113
- const barHeight = plotHeight - yScale(value);
114
- const barY = cumulativeY - barHeight;
115
- cumulativeY = barY;
116
- const color = resolveSeriesColor(s, seriesIndex, palette);
117
- const isTopSegment = seriesIndex === series.length - 1 || series.slice(seriesIndex + 1).every((next) => (datum.values[next.key] ?? 0) === 0);
118
- const isDimmed = hoveredDatumIndex !== null && hoveredDatumIndex !== datumIndex;
119
- return /* @__PURE__ */ jsxs("g", { children: [isTopSegment ? /* @__PURE__ */ jsx("path", {
120
- d: roundedTopRectPath(x, barY, bandWidth, barHeight, barRadius),
121
- fill: color,
122
- opacity: isDimmed ? .3 : 1,
123
- style: { transition: `opacity 150ms ease-in-out` },
124
- onMouseEnter: () => handleBarMouseEnter(datumIndex, x + bandWidth / 2, barY),
125
- onMouseLeave: handleBarMouseLeave,
126
- onFocus: () => handleBarFocus(datumIndex, x + bandWidth / 2, barY),
127
- onBlur: handleBarBlur,
128
- tabIndex: 0,
129
- role: "graphics-symbol",
130
- "aria-roledescription": "bar",
131
- "aria-label": `${s.name} for ${datum.label}: ${valueFormatter(value)}`
132
- }) : /* @__PURE__ */ jsx("rect", {
133
- x,
134
- y: barY,
135
- width: bandWidth,
136
- height: barHeight,
137
- fill: color,
138
- opacity: isDimmed ? .3 : 1,
139
- style: { transition: `opacity 150ms ease-in-out` },
140
- onMouseEnter: () => handleBarMouseEnter(datumIndex, x + bandWidth / 2, barY),
141
- onMouseLeave: handleBarMouseLeave,
142
- onFocus: () => handleBarFocus(datumIndex, x + bandWidth / 2, barY),
143
- onBlur: handleBarBlur,
144
- tabIndex: 0,
145
- role: "graphics-symbol",
146
- "aria-roledescription": "bar",
147
- "aria-label": `${s.name} for ${datum.label}: ${valueFormatter(value)}`
148
- }), showValues && isTopSegment && /* @__PURE__ */ jsx("foreignObject", {
149
- x,
150
- y: barY - 20,
151
- width: bandWidth,
152
- height: 20,
153
- children: /* @__PURE__ */ jsx(FlexWrapper, {
154
- justifyContent: JustifyContent.CENTER,
155
- alignItems: AlignItems.END,
156
- fillWidth: true,
157
- fillHeight: true,
158
- children: /* @__PURE__ */ jsx(Text, {
159
- size: TextSize.CAPTION,
160
- weight: TextWeight.MEDIUM,
161
- children: valueFormatter(value)
162
- })
163
- })
164
- })] }, s.key);
165
- }) }, datum.label);
166
- });
167
- };
168
- const renderGroupedBars = () => {
169
- if (!innerScale) return null;
170
- return data.map((datum, datumIndex) => {
171
- const groupX = xScale(datum.label) ?? 0;
172
- const isDimmed = hoveredDatumIndex !== null && hoveredDatumIndex !== datumIndex;
173
- return /* @__PURE__ */ jsx("g", {
174
- transform: `translate(${groupX}, 0)`,
175
- children: series.map((s, seriesIndex) => {
176
- const value = datum.values[s.key] ?? 0;
177
- if (value === 0) return null;
178
- const barX = innerScale(s.key) ?? 0;
179
- const barWidth = innerScale.bandwidth();
180
- const barHeight = plotHeight - yScale(value);
181
- const barY = yScale(value);
182
- const color = resolveSeriesColor(s, seriesIndex, palette);
183
- return /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("path", {
184
- d: roundedTopRectPath(barX, barY, barWidth, barHeight, barRadius),
185
- fill: color,
186
- opacity: isDimmed ? .3 : 1,
187
- style: { transition: `opacity 150ms ease-in-out` },
188
- onMouseEnter: () => handleBarMouseEnter(datumIndex, groupX + barX + barWidth / 2, barY),
189
- onMouseLeave: handleBarMouseLeave,
190
- onFocus: () => handleBarFocus(datumIndex, groupX + barX + barWidth / 2, barY),
191
- onBlur: handleBarBlur,
192
- tabIndex: 0,
193
- role: "graphics-symbol",
194
- "aria-roledescription": "bar",
195
- "aria-label": `${s.name} for ${datum.label}: ${valueFormatter(value)}`
196
- }), showValues && /* @__PURE__ */ jsx("foreignObject", {
197
- x: barX,
198
- y: barY - 20,
199
- width: barWidth,
200
- height: 20,
201
- children: /* @__PURE__ */ jsx(FlexWrapper, {
202
- justifyContent: JustifyContent.CENTER,
203
- alignItems: AlignItems.END,
204
- fillWidth: true,
205
- fillHeight: true,
206
- children: /* @__PURE__ */ jsx(Text, {
207
- size: TextSize.CAPTION,
208
- weight: TextWeight.MEDIUM,
209
- children: valueFormatter(value)
210
- })
211
- })
212
- })] }, s.key);
213
- })
214
- }, datum.label);
215
- });
216
- };
217
- const defaultAriaLabel = `Bar chart with ${data.length} categories and ${series.length} series`;
218
- return /* @__PURE__ */ jsxs(ChartWrapper, {
219
- ref: containerRef,
220
- $fillWidth: fillWidth,
221
- children: [/* @__PURE__ */ jsxs(Wrapper, {
222
- position: "relative",
223
- children: [/* @__PURE__ */ jsx("svg", {
224
- ref: svgRef,
225
- width: resolvedWidth,
226
- height: resolvedHeight,
227
- role: "img",
228
- "aria-label": ariaLabel ?? defaultAriaLabel,
229
- children: /* @__PURE__ */ jsxs("g", {
230
- transform: `translate(${margin.left}, ${margin.top})`,
231
- children: [
232
- /* @__PURE__ */ jsx(YAxis, {
233
- scale: yScale,
234
- transform: "translate(0, 0)",
235
- plotWidth,
236
- formatter: valueFormatter,
237
- showGrid,
238
- theme
239
- }),
240
- /* @__PURE__ */ jsx(XAxis, {
241
- scale: xScale,
242
- transform: `translate(0, ${plotHeight})`,
243
- plotWidth,
244
- formatter: labelFormatter
245
- }),
246
- mode === "STACKED" ? renderStackedBars() : renderGroupedBars()
247
- ]
248
- })
249
- }), !noTooltip && (tooltipRenderer ? tooltip && tooltipRenderer(tooltip) : /* @__PURE__ */ jsx(ChartTooltip, {
250
- data: tooltip,
251
- valueFormatter
252
- }))]
253
- }), showLegend && /* @__PURE__ */ jsxs(FlexWrapper, {
254
- direction: FlexDirection.ROW,
255
- gap: 0,
256
- children: [/* @__PURE__ */ jsx(Wrapper, { minWidth: margin.left }), /* @__PURE__ */ jsx(ChartLegend, {
257
- series,
258
- palette
259
- })]
260
- })]
144
+ const tooltipModel = useMemo(() => {
145
+ if (noTooltip || interaction.activeIndex === null) return null;
146
+ const band = geometry.bands[interaction.activeIndex];
147
+ const group = groups[interaction.activeIndex];
148
+ if (!band || !group) return null;
149
+ const rows = geometry.rects.filter((rect) => rect.groupIndex === interaction.activeIndex).map((rect) => ({
150
+ key: rect.id,
151
+ label: rect.label,
152
+ group: series[rect.metric]?.label,
153
+ value: rect.value,
154
+ formattedValue: formatValue(rect.value),
155
+ color: rect.color
156
+ }));
157
+ return {
158
+ label: formatLabel(group.label),
159
+ rows,
160
+ anchorX: band.anchorX,
161
+ anchorY: band.anchorY
162
+ };
163
+ }, [
164
+ noTooltip,
165
+ interaction.activeIndex,
166
+ geometry,
167
+ groups,
168
+ series,
169
+ formatValue,
170
+ formatLabel
171
+ ]);
172
+ const categoryPositions = useMemo(() => geometry.bands.map((band) => band.x), [geometry.bands]);
173
+ const categoryStep = geometry.bands[0]?.width ?? 0;
174
+ return /* @__PURE__ */ jsxs(ChartFrame, {
175
+ containerRef,
176
+ dimensions,
177
+ fillWidth,
178
+ fillHeight,
179
+ interaction,
180
+ ariaLabel: ariaLabel ?? `Bar chart with ${groups.length} categories and ${metricKeys.length} series`,
181
+ ariaDescription,
182
+ axes: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ChartValueAxis, {
183
+ ticks: valueTicks,
184
+ scale: geometry.valueScale,
185
+ plotWidth,
186
+ plotHeight,
187
+ marginLeft: dimensions.margin.left,
188
+ formatter: formatAxisValue,
189
+ showGrid,
190
+ title: valueAxisTitle
191
+ }), /* @__PURE__ */ jsx(ChartCategoryAxis, {
192
+ labels: groups.map((group) => group.label),
193
+ positions: categoryPositions,
194
+ step: categoryStep,
195
+ plotWidth,
196
+ plotHeight,
197
+ formatter: formatLabel,
198
+ mode: categoryLabelMode,
199
+ title: categoryAxisTitle
200
+ })] }),
201
+ noTooltip,
202
+ tooltipModel,
203
+ tooltipRenderer,
204
+ anchorHalfWidth: categoryStep / 2,
205
+ isEmpty,
206
+ isLoading,
207
+ contentWhenEmpty,
208
+ showLegend,
209
+ legendItems,
210
+ children: [geometry.rects.map((rect) => /* @__PURE__ */ jsx(ChartBarPath, {
211
+ d: roundedRectPath(rect.x, rect.y, rect.width, rect.height, rect.radius, rect.corners),
212
+ fill: rect.color,
213
+ "data-state": isLoading ? ChartMarkState.MUTED : interaction.getMarkState({
214
+ categoryIndex: rect.groupIndex,
215
+ seriesKey: isStacked ? rect.componentKey : rect.metric
216
+ })
217
+ }, rect.id)), !noTooltip && !isLoading && geometry.bands.map((band) => /* @__PURE__ */ jsx(ChartHitTarget, {
218
+ x: band.x,
219
+ y: band.y,
220
+ width: band.width,
221
+ height: band.height,
222
+ "data-interactive": "true",
223
+ onMouseEnter: () => interaction.onCategoryEnter(band.groupIndex),
224
+ onMouseLeave: interaction.onCategoryLeave,
225
+ onClick: () => interaction.onCategoryClick(band.groupIndex)
226
+ }, band.groupIndex))]
261
227
  });
262
228
  };
263
229
  //#endregion
264
- export { BarChartMode, BarChart as default };
230
+ export { BarChart as default };
@@ -1,28 +1,53 @@
1
- import type { ScaleBand, ScaleLinear, ScalePoint } from "d3-scale";
2
- import type { Theme } from "../theme/types";
1
+ import { ChartCategoryLabelMode } from "./types";
3
2
  import type { ChartLabelFormatter, ChartValueFormatter } from "./types";
4
- interface XAxisProps {
5
- scale: ScaleBand<string>;
6
- transform: string;
3
+ /**
4
+ * Axes for the cartesian charts.
5
+ *
6
+ * Neither axis draws a domain line or tick marks — the grid lines carry the
7
+ * structure, and the one at zero is what makes bars read as resting on a
8
+ * baseline rather than floating.
9
+ */
10
+ interface ChartValueAxisProps {
11
+ ticks: number[];
12
+ /** Maps a tick value to its y position in plot coordinates. */
13
+ scale: (value: number) => number;
7
14
  plotWidth: number;
8
- formatter?: ChartLabelFormatter;
9
- }
10
- export declare const XAxis: ({ scale, transform, formatter }: XAxisProps) => import("react").JSX.Element;
11
- interface XAxisPointProps {
12
- scale: ScalePoint<string>;
13
- transform: string;
14
- plotWidth: number;
15
- formatter?: ChartLabelFormatter;
15
+ /**
16
+ * The chart's left margin. The label box is this minus the tick gap, so the
17
+ * axis follows the margin instead of hardcoding an offset a custom margin
18
+ * used to push these labels outside the viewport.
19
+ */
20
+ marginLeft: number;
21
+ /** Needed to centre a rotated axis title along the gutter. */
22
+ plotHeight: number;
23
+ formatter: ChartValueFormatter;
24
+ showGrid?: boolean;
25
+ /**
26
+ * Rotated title in the left gutter.
27
+ *
28
+ * Space for it must already be reserved by `addAxisTitleSpace`, since the
29
+ * margin is resolved before this renders.
30
+ */
31
+ title?: string;
16
32
  }
17
- export declare const XAxisPoint: ({ scale, transform, formatter, }: XAxisPointProps) => import("react").JSX.Element;
18
- interface YAxisProps {
19
- scale: ScaleLinear<number, number>;
20
- transform: string;
33
+ export declare const ChartValueAxis: ({ ticks, scale, plotWidth, plotHeight, marginLeft, formatter, showGrid, title, }: ChartValueAxisProps) => import("react").JSX.Element;
34
+ interface ChartCategoryAxisProps {
35
+ labels: string[];
36
+ /** Left edge of each category's slot, in plot coordinates. */
37
+ positions: number[];
38
+ /** Width of one category slot. */
39
+ step: number;
40
+ /** Needed to span an axis title across the full plot. */
21
41
  plotWidth: number;
22
- tickCount?: number;
23
- formatter?: ChartValueFormatter;
24
- showGrid?: boolean;
25
- theme: Theme;
42
+ plotHeight: number;
43
+ formatter: ChartLabelFormatter;
44
+ mode?: ChartCategoryLabelMode;
45
+ /**
46
+ * Title below the tick labels.
47
+ *
48
+ * Space for it must already be reserved by `addAxisTitleSpace`.
49
+ */
50
+ title?: string;
26
51
  }
27
- export declare const YAxis: ({ scale, transform, plotWidth, tickCount, formatter, showGrid, theme, }: YAxisProps) => import("react").JSX.Element;
52
+ export declare const ChartCategoryAxis: ({ labels, positions, step, plotWidth, plotHeight, formatter, mode, title, }: ChartCategoryAxisProps) => import("react").JSX.Element;
28
53
  export {};