@databricks/appkit-ui 0.93.0 → 0.94.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.
- package/CLAUDE.md +1 -0
- package/dist/cli/commands/docs.js +231 -10
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/react/charts/types.d.ts +10 -5
- package/dist/react/charts/types.d.ts.map +1 -1
- package/dist/react/charts/types.js.map +1 -1
- package/dist/react/table/data-table.d.ts +6 -0
- package/dist/react/table/data-table.d.ts.map +1 -1
- package/dist/react/table/data-table.js +6 -0
- package/dist/react/table/data-table.js.map +1 -1
- package/docs/api/appkit-ui/data/AreaChart.md +25 -25
- package/docs/api/appkit-ui/data/BarChart.md +23 -23
- package/docs/api/appkit-ui/data/DataTable.md +2 -0
- package/docs/api/appkit-ui/data/DonutChart.md +24 -24
- package/docs/api/appkit-ui/data/HeatmapChart.md +25 -25
- package/docs/api/appkit-ui/data/LineChart.md +24 -24
- package/docs/api/appkit-ui/data/PieChart.md +24 -24
- package/docs/api/appkit-ui/data/RadarChart.md +22 -22
- package/docs/api/appkit-ui/data/ScatterChart.md +22 -22
- package/docs/plugins/analytics.md +1 -1
- package/llms.txt +1 -0
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
|
@@ -46,31 +46,31 @@ Supports both query mode (queryKey + parameters) and data mode (static data).
|
|
|
46
46
|
|
|
47
47
|
### Props[](#props "Direct link to Props")
|
|
48
48
|
|
|
49
|
-
| Prop | Type | Required | Default | Description
|
|
50
|
-
| ---------------- | --------------------------------------------------------------- | -------- | ------------ |
|
|
51
|
-
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin
|
|
52
|
-
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint
|
|
53
|
-
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size
|
|
54
|
-
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering
|
|
55
|
-
| `data` | `ChartDataInput` | | - | Arrow Table or
|
|
56
|
-
| `title` | `string` | | - | Chart title
|
|
57
|
-
| `showLegend` | `boolean` | | - | Show legend
|
|
58
|
-
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values
|
|
59
|
-
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette)
|
|
60
|
-
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`).
|
|
61
|
-
| `className` | `string` | | - | Additional CSS classes
|
|
62
|
-
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided.
|
|
63
|
-
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided.
|
|
64
|
-
| `ariaLabel` | `string` | | - | Accessibility label for screen readers
|
|
65
|
-
| `testId` | `string` | | - | Test ID for automated testing
|
|
66
|
-
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge
|
|
67
|
-
| `valueFormatter` | `ChartValueFormatter` | | - | Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series.
|
|
68
|
-
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action.
|
|
69
|
-
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it.
|
|
70
|
-
| `orientation` | `"horizontal" \| "vertical"` | | `"vertical"` | Chart orientation
|
|
71
|
-
| `showSymbol` | `boolean` | | `false` | Show data point symbols
|
|
72
|
-
| `smooth` | `boolean` | | `true` | Smooth line curves
|
|
73
|
-
| `stacked` | `boolean` | | `false` | Stack areas
|
|
49
|
+
| Prop | Type | Required | Default | Description |
|
|
50
|
+
| ---------------- | --------------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
|
|
52
|
+
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
|
|
53
|
+
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size |
|
|
54
|
+
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
|
|
55
|
+
| `data` | `ChartDataInput` | | - | Arrow Table or an array of row objects (interfaces and `as const` arrays too). |
|
|
56
|
+
| `title` | `string` | | - | Chart title |
|
|
57
|
+
| `showLegend` | `boolean` | | - | Show legend |
|
|
58
|
+
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values |
|
|
59
|
+
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette) as hex, `rgb()` or `hsl()` strings, since ECharts draws on a canvas and cannot resolve `var()` or parse `oklch()` (those draw gray); without it, series colors are the CSS variables `--chart-cat-1` to `--chart-cat-8` on `:root` (`--chart-seq-*` and `--chart-div-*` for the sequential and diverging palettes), held to the same formats. |
|
|
60
|
+
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
|
|
61
|
+
| `className` | `string` | | - | Additional CSS classes |
|
|
62
|
+
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
|
|
63
|
+
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
|
|
64
|
+
| `ariaLabel` | `string` | | - | Accessibility label for screen readers |
|
|
65
|
+
| `testId` | `string` | | - | Test ID for automated testing |
|
|
66
|
+
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
|
|
67
|
+
| `valueFormatter` | `ChartValueFormatter` | | - | `(value: string \| number, field: string) => string`. Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series. |
|
|
68
|
+
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action. |
|
|
69
|
+
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it. |
|
|
70
|
+
| `orientation` | `"horizontal" \| "vertical"` | | `"vertical"` | Chart orientation |
|
|
71
|
+
| `showSymbol` | `boolean` | | `false` | Show data point symbols |
|
|
72
|
+
| `smooth` | `boolean` | | `true` | Smooth line curves |
|
|
73
|
+
| `stacked` | `boolean` | | `false` | Stack areas |
|
|
74
74
|
|
|
75
75
|
### Usage[](#usage "Direct link to Usage")
|
|
76
76
|
|
|
@@ -43,29 +43,29 @@ Supports both query mode (queryKey + parameters) and data mode (static data).
|
|
|
43
43
|
|
|
44
44
|
### Props[](#props "Direct link to Props")
|
|
45
45
|
|
|
46
|
-
| Prop | Type | Required | Default | Description
|
|
47
|
-
| ---------------- | --------------------------------------------------------------- | -------- | ------------ |
|
|
48
|
-
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin
|
|
49
|
-
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint
|
|
50
|
-
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size
|
|
51
|
-
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering
|
|
52
|
-
| `data` | `ChartDataInput` | | - | Arrow Table or
|
|
53
|
-
| `title` | `string` | | - | Chart title
|
|
54
|
-
| `showLegend` | `boolean` | | - | Show legend
|
|
55
|
-
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values
|
|
56
|
-
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette)
|
|
57
|
-
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`).
|
|
58
|
-
| `className` | `string` | | - | Additional CSS classes
|
|
59
|
-
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided.
|
|
60
|
-
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided.
|
|
61
|
-
| `ariaLabel` | `string` | | - | Accessibility label for screen readers
|
|
62
|
-
| `testId` | `string` | | - | Test ID for automated testing
|
|
63
|
-
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge
|
|
64
|
-
| `valueFormatter` | `ChartValueFormatter` | | - | Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series.
|
|
65
|
-
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action.
|
|
66
|
-
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it.
|
|
67
|
-
| `orientation` | `"horizontal" \| "vertical"` | | `"vertical"` | Chart orientation
|
|
68
|
-
| `stacked` | `boolean` | | - | Stack bars
|
|
46
|
+
| Prop | Type | Required | Default | Description |
|
|
47
|
+
| ---------------- | --------------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
|
|
49
|
+
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
|
|
50
|
+
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size |
|
|
51
|
+
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
|
|
52
|
+
| `data` | `ChartDataInput` | | - | Arrow Table or an array of row objects (interfaces and `as const` arrays too). |
|
|
53
|
+
| `title` | `string` | | - | Chart title |
|
|
54
|
+
| `showLegend` | `boolean` | | - | Show legend |
|
|
55
|
+
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values |
|
|
56
|
+
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette) as hex, `rgb()` or `hsl()` strings, since ECharts draws on a canvas and cannot resolve `var()` or parse `oklch()` (those draw gray); without it, series colors are the CSS variables `--chart-cat-1` to `--chart-cat-8` on `:root` (`--chart-seq-*` and `--chart-div-*` for the sequential and diverging palettes), held to the same formats. |
|
|
57
|
+
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
|
|
58
|
+
| `className` | `string` | | - | Additional CSS classes |
|
|
59
|
+
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
|
|
60
|
+
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
|
|
61
|
+
| `ariaLabel` | `string` | | - | Accessibility label for screen readers |
|
|
62
|
+
| `testId` | `string` | | - | Test ID for automated testing |
|
|
63
|
+
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
|
|
64
|
+
| `valueFormatter` | `ChartValueFormatter` | | - | `(value: string \| number, field: string) => string`. Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series. |
|
|
65
|
+
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action. |
|
|
66
|
+
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it. |
|
|
67
|
+
| `orientation` | `"horizontal" \| "vertical"` | | `"vertical"` | Chart orientation |
|
|
68
|
+
| `stacked` | `boolean` | | - | Stack bars |
|
|
69
69
|
|
|
70
70
|
### Usage[](#usage "Direct link to Usage")
|
|
71
71
|
|
|
@@ -38,6 +38,8 @@ Features:
|
|
|
38
38
|
* Responsive design
|
|
39
39
|
* Supports opinionated mode (auto columns) and full-control mode (`children(table)`)
|
|
40
40
|
|
|
41
|
+
In opinionated mode the columns are the keys of the first row that match `/^[a-zA-Z_][a-zA-Z0-9_]*$/` (other keys are dropped), headed by the key in Title Case. Every cell whose value parses as a number, numeric strings included, is right-aligned and formatted: a key containing `cost`, `price`, `spend`, `revenue` or `usd` shows as USD, and any other value of 1000 or more is abbreviated (10021 shows as 10K). For ids, zip codes or years, render a `Table` from `useAnalyticsQuery` rows instead.
|
|
42
|
+
|
|
41
43
|
**Source:** [`packages/appkit-ui/src/react/table/data-table.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/table/data-table.tsx)
|
|
42
44
|
|
|
43
45
|
### Props[](#props "Direct link to Props")
|
|
@@ -40,30 +40,30 @@ Supports both query mode (queryKey + parameters) and data mode (static data).
|
|
|
40
40
|
|
|
41
41
|
### Props[](#props "Direct link to Props")
|
|
42
42
|
|
|
43
|
-
| Prop | Type | Required | Default | Description
|
|
44
|
-
| ---------------- | --------------------------------------------------------------- | -------- | ----------- |
|
|
45
|
-
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin
|
|
46
|
-
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint
|
|
47
|
-
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size
|
|
48
|
-
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering
|
|
49
|
-
| `data` | `ChartDataInput` | | - | Arrow Table or
|
|
50
|
-
| `title` | `string` | | - | Chart title
|
|
51
|
-
| `showLegend` | `boolean` | | - | Show legend
|
|
52
|
-
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values
|
|
53
|
-
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette)
|
|
54
|
-
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`).
|
|
55
|
-
| `className` | `string` | | - | Additional CSS classes
|
|
56
|
-
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided.
|
|
57
|
-
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided.
|
|
58
|
-
| `ariaLabel` | `string` | | - | Accessibility label for screen readers
|
|
59
|
-
| `testId` | `string` | | - | Test ID for automated testing
|
|
60
|
-
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge
|
|
61
|
-
| `valueFormatter` | `ChartValueFormatter` | | - | Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series.
|
|
62
|
-
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action.
|
|
63
|
-
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it.
|
|
64
|
-
| `innerRadius` | `number` | | `0` | Inner radius for donut charts (0-100%)
|
|
65
|
-
| `showLabels` | `boolean` | | `true` | Show labels on slices
|
|
66
|
-
| `labelPosition` | `"center" \| "outside" \| "inside"` | | `"outside"` | Label position
|
|
43
|
+
| Prop | Type | Required | Default | Description |
|
|
44
|
+
| ---------------- | --------------------------------------------------------------- | -------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
|
|
46
|
+
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
|
|
47
|
+
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size |
|
|
48
|
+
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
|
|
49
|
+
| `data` | `ChartDataInput` | | - | Arrow Table or an array of row objects (interfaces and `as const` arrays too). |
|
|
50
|
+
| `title` | `string` | | - | Chart title |
|
|
51
|
+
| `showLegend` | `boolean` | | - | Show legend |
|
|
52
|
+
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values |
|
|
53
|
+
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette) as hex, `rgb()` or `hsl()` strings, since ECharts draws on a canvas and cannot resolve `var()` or parse `oklch()` (those draw gray); without it, series colors are the CSS variables `--chart-cat-1` to `--chart-cat-8` on `:root` (`--chart-seq-*` and `--chart-div-*` for the sequential and diverging palettes), held to the same formats. |
|
|
54
|
+
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
|
|
55
|
+
| `className` | `string` | | - | Additional CSS classes |
|
|
56
|
+
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
|
|
57
|
+
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
|
|
58
|
+
| `ariaLabel` | `string` | | - | Accessibility label for screen readers |
|
|
59
|
+
| `testId` | `string` | | - | Test ID for automated testing |
|
|
60
|
+
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
|
|
61
|
+
| `valueFormatter` | `ChartValueFormatter` | | - | `(value: string \| number, field: string) => string`. Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series. |
|
|
62
|
+
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action. |
|
|
63
|
+
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it. |
|
|
64
|
+
| `innerRadius` | `number` | | `0` | Inner radius for donut charts (0-100%) |
|
|
65
|
+
| `showLabels` | `boolean` | | `true` | Show labels on slices |
|
|
66
|
+
| `labelPosition` | `"center" \| "outside" \| "inside"` | | `"outside"` | Label position |
|
|
67
67
|
|
|
68
68
|
### Usage[](#usage "Direct link to Usage")
|
|
69
69
|
|
|
@@ -58,31 +58,31 @@ Supports both query mode (queryKey + parameters) and data mode (static data).
|
|
|
58
58
|
|
|
59
59
|
### Props[](#props "Direct link to Props")
|
|
60
60
|
|
|
61
|
-
| Prop | Type | Required | Default | Description
|
|
62
|
-
| ---------------- | --------------------------------------------------------------- | -------- | -------- |
|
|
63
|
-
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin
|
|
64
|
-
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint
|
|
65
|
-
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size
|
|
66
|
-
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering
|
|
67
|
-
| `data` | `ChartDataInput` | | - | Arrow Table or
|
|
68
|
-
| `title` | `string` | | - | Chart title
|
|
69
|
-
| `showLegend` | `boolean` | | - | Show legend
|
|
70
|
-
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values
|
|
71
|
-
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette)
|
|
72
|
-
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`).
|
|
73
|
-
| `className` | `string` | | - | Additional CSS classes
|
|
74
|
-
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided.
|
|
75
|
-
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided.
|
|
76
|
-
| `ariaLabel` | `string` | | - | Accessibility label for screen readers
|
|
77
|
-
| `testId` | `string` | | - | Test ID for automated testing
|
|
78
|
-
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge
|
|
79
|
-
| `valueFormatter` | `ChartValueFormatter` | | - | Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series.
|
|
80
|
-
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action.
|
|
81
|
-
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it.
|
|
82
|
-
| `yAxisKey` | `string` | | - | Field key for the Y-axis categories. For heatmaps, data should have: xKey (column), yAxisKey (row), and yKey (value).
|
|
83
|
-
| `min` | `number` | | - | Min value for color scale (auto-detected if not provided)
|
|
84
|
-
| `max` | `number` | | - | Max value for color scale (auto-detected if not provided)
|
|
85
|
-
| `showLabels` | `boolean` | | `false` | Show value labels on cells
|
|
61
|
+
| Prop | Type | Required | Default | Description |
|
|
62
|
+
| ---------------- | --------------------------------------------------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
|
|
64
|
+
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
|
|
65
|
+
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size |
|
|
66
|
+
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
|
|
67
|
+
| `data` | `ChartDataInput` | | - | Arrow Table or an array of row objects (interfaces and `as const` arrays too). |
|
|
68
|
+
| `title` | `string` | | - | Chart title |
|
|
69
|
+
| `showLegend` | `boolean` | | - | Show legend |
|
|
70
|
+
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values |
|
|
71
|
+
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette) as hex, `rgb()` or `hsl()` strings, since ECharts draws on a canvas and cannot resolve `var()` or parse `oklch()` (those draw gray); without it, series colors are the CSS variables `--chart-cat-1` to `--chart-cat-8` on `:root` (`--chart-seq-*` and `--chart-div-*` for the sequential and diverging palettes), held to the same formats. |
|
|
72
|
+
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
|
|
73
|
+
| `className` | `string` | | - | Additional CSS classes |
|
|
74
|
+
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
|
|
75
|
+
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
|
|
76
|
+
| `ariaLabel` | `string` | | - | Accessibility label for screen readers |
|
|
77
|
+
| `testId` | `string` | | - | Test ID for automated testing |
|
|
78
|
+
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
|
|
79
|
+
| `valueFormatter` | `ChartValueFormatter` | | - | `(value: string \| number, field: string) => string`. Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series. |
|
|
80
|
+
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action. |
|
|
81
|
+
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it. |
|
|
82
|
+
| `yAxisKey` | `string` | | - | Field key for the Y-axis categories. For heatmaps, data should have: xKey (column), yAxisKey (row), and yKey (value). |
|
|
83
|
+
| `min` | `number` | | - | Min value for color scale (auto-detected if not provided) |
|
|
84
|
+
| `max` | `number` | | - | Max value for color scale (auto-detected if not provided) |
|
|
85
|
+
| `showLabels` | `boolean` | | `false` | Show value labels on cells |
|
|
86
86
|
|
|
87
87
|
### Usage[](#usage "Direct link to Usage")
|
|
88
88
|
|
|
@@ -45,30 +45,30 @@ Supports both query mode (queryKey + parameters) and data mode (static data).
|
|
|
45
45
|
|
|
46
46
|
### Props[](#props "Direct link to Props")
|
|
47
47
|
|
|
48
|
-
| Prop | Type | Required | Default | Description
|
|
49
|
-
| ---------------- | --------------------------------------------------------------- | -------- | ------------ |
|
|
50
|
-
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin
|
|
51
|
-
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint
|
|
52
|
-
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size
|
|
53
|
-
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering
|
|
54
|
-
| `data` | `ChartDataInput` | | - | Arrow Table or
|
|
55
|
-
| `title` | `string` | | - | Chart title
|
|
56
|
-
| `showLegend` | `boolean` | | - | Show legend
|
|
57
|
-
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values
|
|
58
|
-
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette)
|
|
59
|
-
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`).
|
|
60
|
-
| `className` | `string` | | - | Additional CSS classes
|
|
61
|
-
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided.
|
|
62
|
-
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided.
|
|
63
|
-
| `ariaLabel` | `string` | | - | Accessibility label for screen readers
|
|
64
|
-
| `testId` | `string` | | - | Test ID for automated testing
|
|
65
|
-
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge
|
|
66
|
-
| `valueFormatter` | `ChartValueFormatter` | | - | Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series.
|
|
67
|
-
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action.
|
|
68
|
-
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it.
|
|
69
|
-
| `orientation` | `"horizontal" \| "vertical"` | | `"vertical"` | Chart orientation
|
|
70
|
-
| `showSymbol` | `boolean` | | `false` | Show data point symbols
|
|
71
|
-
| `smooth` | `boolean` | | `true` | Smooth line curves
|
|
48
|
+
| Prop | Type | Required | Default | Description |
|
|
49
|
+
| ---------------- | --------------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
|
|
51
|
+
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
|
|
52
|
+
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size |
|
|
53
|
+
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
|
|
54
|
+
| `data` | `ChartDataInput` | | - | Arrow Table or an array of row objects (interfaces and `as const` arrays too). |
|
|
55
|
+
| `title` | `string` | | - | Chart title |
|
|
56
|
+
| `showLegend` | `boolean` | | - | Show legend |
|
|
57
|
+
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values |
|
|
58
|
+
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette) as hex, `rgb()` or `hsl()` strings, since ECharts draws on a canvas and cannot resolve `var()` or parse `oklch()` (those draw gray); without it, series colors are the CSS variables `--chart-cat-1` to `--chart-cat-8` on `:root` (`--chart-seq-*` and `--chart-div-*` for the sequential and diverging palettes), held to the same formats. |
|
|
59
|
+
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
|
|
60
|
+
| `className` | `string` | | - | Additional CSS classes |
|
|
61
|
+
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
|
|
62
|
+
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
|
|
63
|
+
| `ariaLabel` | `string` | | - | Accessibility label for screen readers |
|
|
64
|
+
| `testId` | `string` | | - | Test ID for automated testing |
|
|
65
|
+
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
|
|
66
|
+
| `valueFormatter` | `ChartValueFormatter` | | - | `(value: string \| number, field: string) => string`. Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series. |
|
|
67
|
+
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action. |
|
|
68
|
+
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it. |
|
|
69
|
+
| `orientation` | `"horizontal" \| "vertical"` | | `"vertical"` | Chart orientation |
|
|
70
|
+
| `showSymbol` | `boolean` | | `false` | Show data point symbols |
|
|
71
|
+
| `smooth` | `boolean` | | `true` | Smooth line curves |
|
|
72
72
|
|
|
73
73
|
### Usage[](#usage "Direct link to Usage")
|
|
74
74
|
|
|
@@ -40,30 +40,30 @@ Supports both query mode (queryKey + parameters) and data mode (static data).
|
|
|
40
40
|
|
|
41
41
|
### Props[](#props "Direct link to Props")
|
|
42
42
|
|
|
43
|
-
| Prop | Type | Required | Default | Description
|
|
44
|
-
| ---------------- | --------------------------------------------------------------- | -------- | ----------- |
|
|
45
|
-
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin
|
|
46
|
-
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint
|
|
47
|
-
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size
|
|
48
|
-
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering
|
|
49
|
-
| `data` | `ChartDataInput` | | - | Arrow Table or
|
|
50
|
-
| `title` | `string` | | - | Chart title
|
|
51
|
-
| `showLegend` | `boolean` | | - | Show legend
|
|
52
|
-
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values
|
|
53
|
-
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette)
|
|
54
|
-
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`).
|
|
55
|
-
| `className` | `string` | | - | Additional CSS classes
|
|
56
|
-
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided.
|
|
57
|
-
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided.
|
|
58
|
-
| `ariaLabel` | `string` | | - | Accessibility label for screen readers
|
|
59
|
-
| `testId` | `string` | | - | Test ID for automated testing
|
|
60
|
-
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge
|
|
61
|
-
| `valueFormatter` | `ChartValueFormatter` | | - | Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series.
|
|
62
|
-
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action.
|
|
63
|
-
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it.
|
|
64
|
-
| `innerRadius` | `number` | | `0` | Inner radius for donut charts (0-100%)
|
|
65
|
-
| `showLabels` | `boolean` | | `true` | Show labels on slices
|
|
66
|
-
| `labelPosition` | `"center" \| "outside" \| "inside"` | | `"outside"` | Label position
|
|
43
|
+
| Prop | Type | Required | Default | Description |
|
|
44
|
+
| ---------------- | --------------------------------------------------------------- | -------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
|
|
46
|
+
| `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
|
|
47
|
+
| `format` | `"auto" \| "json_array" \| "arrow_stream" \| "json" \| "arrow"` | | `"auto"` | Data format to use - "json\_array": Use JSON format (smaller payloads, simpler) - "arrow\_stream": Use Arrow format (faster for large datasets) - "auto": Automatically select based on expected data size |
|
|
48
|
+
| `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
|
|
49
|
+
| `data` | `ChartDataInput` | | - | Arrow Table or an array of row objects (interfaces and `as const` arrays too). |
|
|
50
|
+
| `title` | `string` | | - | Chart title |
|
|
51
|
+
| `showLegend` | `boolean` | | - | Show legend |
|
|
52
|
+
| `colorPalette` | `"categorical" \| "sequential" \| "diverging"` | | - | Color palette to use. Auto-selected based on chart type if not specified. - "categorical": Distinct colors for different categories (bar, pie, line) - "sequential": Gradient for magnitude/intensity (heatmap) - "diverging": Two-tone for positive/negative values |
|
|
53
|
+
| `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette) as hex, `rgb()` or `hsl()` strings, since ECharts draws on a canvas and cannot resolve `var()` or parse `oklch()` (those draw gray); without it, series colors are the CSS variables `--chart-cat-1` to `--chart-cat-8` on `:root` (`--chart-seq-*` and `--chart-div-*` for the sequential and diverging palettes), held to the same formats. |
|
|
54
|
+
| `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
|
|
55
|
+
| `className` | `string` | | - | Additional CSS classes |
|
|
56
|
+
| `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
|
|
57
|
+
| `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
|
|
58
|
+
| `ariaLabel` | `string` | | - | Accessibility label for screen readers |
|
|
59
|
+
| `testId` | `string` | | - | Test ID for automated testing |
|
|
60
|
+
| `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
|
|
61
|
+
| `valueFormatter` | `ChartValueFormatter` | | - | `(value: string \| number, field: string) => string`. Formats measure values in the chart's built-in value axes, tooltips, and value labels. `field` is the corresponding `yKey`, so one formatter can select a different format for each series. |
|
|
62
|
+
| `onDataClick` | `((datum: ChartClickDatum) => void)` | | - | Pointer-only: charts render to \<canvas>, so this does not fire for keyboard users. Provide a keyboard-accessible equivalent (e.g. a table row action) for the same action. |
|
|
63
|
+
| `selected` | `string \| string[]` | | - | Controlled selection by category name. Matching data element(s) render at full prominence while the rest are dimmed. Drive it from your own state to reflect a cross-filter or selection. Categorical charts (bar, pie/donut) show emphasis; other chart types ignore it. |
|
|
64
|
+
| `innerRadius` | `number` | | `0` | Inner radius for donut charts (0-100%) |
|
|
65
|
+
| `showLabels` | `boolean` | | `true` | Show labels on slices |
|
|
66
|
+
| `labelPosition` | `"center" \| "outside" \| "inside"` | | `"outside"` | Label position |
|
|
67
67
|
|
|
68
68
|
### Usage[](#usage "Direct link to Usage")
|
|
69
69
|
|