Skip to content

Commit 79aac33

Browse files
authored
fix(ScatterChart - TypeScript): fix measures type (#7692)
1 parent 462ba83 commit 79aac33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/charts/src/components/ScatterChart/ScatterChart.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export interface ScatterChartProps extends Omit<IChartBaseProps<IScatterChartCon
103103
* </code>
104104
*/
105105
dataset?: ScatterDataObject[];
106+
//todo: use object instead of array (next major release)
106107
/**
107108
* An array of config objects. Each object is defining one axis in the chart.
108109
*
@@ -115,7 +116,7 @@ export interface ScatterChartProps extends Omit<IChartBaseProps<IScatterChartCon
115116
* - `label`: Label to display in tooltips. Falls back to the <code>accessor</code> if not present.
116117
* - `formatter`: function will be called for each data label and allows you to format it according to your needs. Also addresses labels of axis.
117118
*/
118-
measures?: MeasureConfig[];
119+
measures: [MeasureConfig, MeasureConfig, MeasureConfig, ...MeasureConfig[]];
119120
}
120121

121122
const measureDefaults = {
@@ -316,7 +317,6 @@ const ScatterChart = forwardRef<HTMLDivElement, ScatterChartProps>((props, ref)
316317
label={referenceLineX?.label}
317318
/>
318319
)}
319-
{/*ToDo: remove conditional rendering once `active` is working again (https://github.com/recharts/recharts/issues/2703)*/}
320320
{tooltipConfig?.active !== false && (
321321
<Tooltip
322322
cursor={tooltipFillOpacity}

0 commit comments

Comments
 (0)