@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.
@@ -44,28 +44,28 @@ Supports both query mode (queryKey + parameters) and data mode (static data).
44
44
 
45
45
  ### Props[​](#props "Direct link to Props")
46
46
 
47
- | Prop | Type | Required | Default | Description |
48
- | ---------------- | --------------------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
49
- | `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
50
- | `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
51
- | `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 |
52
- | `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
53
- | `data` | `ChartDataInput` | | - | Arrow Table or JSON array |
54
- | `title` | `string` | | - | Chart title |
55
- | `showLegend` | `boolean` | | - | Show legend |
56
- | `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 |
57
- | `colors` | `string[]` | | - | Custom colors for series (overrides colorPalette) |
58
- | `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
59
- | `className` | `string` | | - | Additional CSS classes |
60
- | `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
61
- | `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
62
- | `ariaLabel` | `string` | | - | Accessibility label for screen readers |
63
- | `testId` | `string` | | - | Test ID for automated testing |
64
- | `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
65
- | `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. |
66
- | `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. |
67
- | `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. |
68
- | `showArea` | `boolean` | | `true` | Show area fill |
47
+ | Prop | Type | Required | Default | Description |
48
+ | ---------------- | --------------------------------------------------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
49
+ | `queryKey` | `string` | | - | Analytics query key registered with analytics plugin |
50
+ | `parameters` | `Record<string, unknown>` | | - | Query parameters passed to the analytics endpoint |
51
+ | `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 |
52
+ | `transformer` | `(<T>(data: T) => T)` | | - | Transform raw data before rendering |
53
+ | `data` | `ChartDataInput` | | - | Arrow Table or an array of row objects (interfaces and `as const` arrays too). |
54
+ | `title` | `string` | | - | Chart title |
55
+ | `showLegend` | `boolean` | | - | Show legend |
56
+ | `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 |
57
+ | `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. |
58
+ | `height` | `number` | | - | Chart height in pixels. Defaults to filling its parent (see `chartSizeStyle`). |
59
+ | `className` | `string` | | - | Additional CSS classes |
60
+ | `xKey` | `string` | | - | X-axis field key. Auto-detected from schema if not provided. |
61
+ | `yKey` | `string \| string[]` | | - | Y-axis field key(s). Auto-detected from schema if not provided. |
62
+ | `ariaLabel` | `string` | | - | Accessibility label for screen readers |
63
+ | `testId` | `string` | | - | Test ID for automated testing |
64
+ | `options` | `Record<string, unknown>` | | - | Additional ECharts options to merge |
65
+ | `valueFormatter` | `ChartValueFormatter` | | - | `(value: string \| number, field: string) =&gt; 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. |
66
+ | `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. |
67
+ | `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. |
68
+ | `showArea` | `boolean` | | `true` | Show area fill |
69
69
 
70
70
  ### Usage[​](#usage "Direct link to Usage")
71
71
 
@@ -46,28 +46,28 @@ 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 JSON array |
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
- | `symbolSize` | `number` | | `8` | Symbol size |
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) =&gt; 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
+ | `symbolSize` | `number` | | `8` | Symbol size |
71
71
 
72
72
  ### Usage[​](#usage "Direct link to Usage")
73
73
 
@@ -266,7 +266,7 @@ Editing `definitions.json` is picked up on the next request — no server restar
266
266
 
267
267
  ### useAnalyticsQuery[​](#useanalyticsquery "Direct link to useAnalyticsQuery")
268
268
 
269
- React hook that subscribes to an analytics query over SSE and returns its latest result.
269
+ React hook that subscribes to an analytics query over SSE and returns its latest result. Wrap `parameters` in `useMemo` (see [Memoization](#memoization)): the query re-runs whenever the parameters object is a new reference.
270
270
 
271
271
  ```ts
272
272
  import { useAnalyticsQuery } from "@databricks/appkit-ui/react";
package/llms.txt CHANGED
@@ -7,6 +7,7 @@ npx @databricks/appkit docs <query>
7
7
  ```
8
8
 
9
9
  - View documentation index: `npx @databricks/appkit docs`
10
+ - Look up components, hooks and functions by name: `npx @databricks/appkit docs BarChart DataTable Select useAnalyticsQuery sql`
10
11
  - View a section: `npx @databricks/appkit docs "appkit-ui API reference"`
11
12
  - Full index (all API entries): `npx @databricks/appkit docs --full`
12
13
  - View specific doc: `npx @databricks/appkit docs ./docs/plugins/analytics.md`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@databricks/appkit-ui",
3
3
  "type": "module",
4
- "version": "0.93.0",
4
+ "version": "0.94.0",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": [
7
7
  "**/*.css"