From 0713bb4b3a5eb09c4176d2c63e91206699df67d1 Mon Sep 17 00:00:00 2001 From: John Lenz Date: Fri, 4 Sep 2020 14:35:21 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#47277=20recharts:?= =?UTF-8?q?=20add=20allowDuplicatedCategory=20prop=20by=20@wuzzeb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XAxis, YAxis, PolarAngleAxis, and PolarRadiusAxis all support the allowDuplicatedCategory prop, but the existing types only have it specified for XAxis. Add the prop to YAxis, PolarAngleAxis, and PolarRadiusAxis as well. See * https://github.com/recharts/recharts/blob/v1.8.5/src/cartesian/YAxis.js#L13 * https://github.com/recharts/recharts/blob/v1.8.5/src/polar/PolarAngleAxis.js#L50 * https://github.com/recharts/recharts/blob/v1.8.5/src/polar/PolarRadiusAxis.js#L53 --- types/recharts/index.d.ts | 3 +++ types/recharts/recharts-tests.tsx | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 172c38ed8d..7065bf0df9 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -552,6 +552,7 @@ export interface PolarAngleAxisProps extends EventAttributes, Partial { } @@ -592,6 +593,7 @@ export interface PolarRadiusAxisProps extends EventAttributes, Partial; scale?: ScaleType | RechartsFunction; allowDataOverflow?: boolean; + allowDuplicatedCategory?: boolean; } export class PolarRadiusAxis extends React.Component { } @@ -1073,6 +1075,7 @@ export interface YAxisProps extends EventAttributes { reversed?: boolean; // see label section at http://recharts.org/#/en-US/api/YAxis label?: string | number | Label | LabelProps; + allowDuplicatedCategory?: boolean; stroke?: string; } diff --git a/types/recharts/recharts-tests.tsx b/types/recharts/recharts-tests.tsx index c2b8c67bd1..003ebdb2fe 100644 --- a/types/recharts/recharts-tests.tsx +++ b/types/recharts/recharts-tests.tsx @@ -5,7 +5,8 @@ import { CartesianGrid, Line, LineChart, PieChart, Pie, Sector, XAxis, YAxis, Tooltip, ReferenceLine, ReferenceArea, ResponsiveContainer, Label, LabelList, Brush, - ScatterChart, ZAxis, Legend, Scatter, Bar, BarChart, Text, Area, AreaChart, Customized + ScatterChart, ZAxis, Legend, Scatter, Bar, BarChart, Text, Area, AreaChart, Customized, + RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar } from 'recharts'; interface ComponentState { @@ -154,7 +155,7 @@ class Component extends React.Component<{}, ComponentState> { - + @@ -242,6 +243,12 @@ class Component extends React.Component<{}, ComponentState> { + + + + + + ); }