Skip to content

Commit 7640a53

Browse files
committed
AI feedback
1 parent 566bab0 commit 7640a53

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/data/charts/dataset/dataset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ These series types require `datasetKeys` or the `valueGetter` to return values i
6868

6969
### Scatter series
7070

71-
The scatter series requires `x` and `y` values, and optionally `colorValue` and `id` values.
71+
The scatter series requires `x` and `y` values, and optionally `colorValue`, `sizeValue`, and `id` values.
7272
You can provide these values with `datasetKeys` or with `valueGetter`.
7373

7474
```tsx

docs/data/charts/scatter/scatter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If your data is stored in an array of objects, you can use the `dataset` helper
3333
It accepts an array of objects such as `dataset={[{a: 1, b: 32, c: 873}, {a: 2, b: 41, c: 182}, ...]}`.
3434

3535
Scatter series use a different pattern than other charts: use the `datasetKeys` property with an object that has required `x` and `y` keys.
36-
You can also include optional `id` and `color` keys.
36+
You can also include optional `id`, `color`, and `size` keys.
3737

3838
See the [Dataset](/x/react-charts/dataset/) page to learn more.
3939

packages/x-charts/src/ChartsTooltip/useItemTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function useInternalItemTooltip<SeriesType extends ChartSeriesType>():
7171

7272
const colorAxisId: AxisId | undefined =
7373
'colorAxisId' in itemSeries || 'zAxisId' in itemSeries
74-
? (itemSeries.colorAxisId ?? itemSeries.zAxisId)
74+
? (itemSeries.colorAxisId ?? itemSeries.zAxisId ?? zAxisIds[0])
7575
: zAxisIds[0];
7676

7777
const mainAxis =

packages/x-charts/src/models/seriesType/scatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface ScatterSeriesType
6969
* The keys used to retrieve data from the dataset.
7070
*
7171
* When this prop is provided, both `x` and `y` must be provided.
72-
* While `color` and `id` are optional.
72+
* While `color`, `size`, and `id` are optional.
7373
*/
7474
datasetKeys?: {
7575
/**

packages/x-charts/src/models/z-axis.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ export interface ZAxisConfig<V = any> {
3131
*/
3232
max?: number;
3333
/**
34-
* The config that defined how the values should be mapped to colors.
34+
* The config that defines how the values should be mapped to colors.
3535
*/
3636
colorMap?: OrdinalColorConfig | ContinuousColorConfig | PiecewiseColorConfig;
3737
/**
38-
* The config that defined how the values should be mapped to sizes.
38+
* The config that defines how the values should be mapped to sizes.
3939
*/
4040
sizeMap?: OrdinalSizeConfig | ContinuousSizeConfig | PiecewiseSizeConfig;
4141
}

0 commit comments

Comments
 (0)