Merge pull request #33089 from ponciusz/master

recharts - Added radius to Bar props. let set up global radius for all dataSets
This commit is contained in:
Andrew Casey
2019-02-22 10:54:16 -08:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -201,6 +201,7 @@ export interface BarProps extends EventAttributes, Partial<PresentationAttribute
dataKey: DataKey; // As the source code states, dataKey will replace valueKey in 1.1.0 and it'll be required (it's already required in current implementation).
className?: string;
fill?: string;
radius?: number | number[];
layout?: LayoutType;
xAxisId?: string | number;
yAxisId?: string | number;
+1 -1
View File
@@ -204,7 +204,7 @@ class Component extends React.Component<{}, ComponentState> {
<Bar dataKey="pv" fill="#8884d8">
<LabelList dataKey="name" position="insideTop" angle={45} />
</Bar>
<Bar dataKey="uv" fill="#82ca9d">
<Bar dataKey="uv" fill="#82ca9d" radius={[10, 10, 0, 0]}>
<LabelList dataKey="uv" position="top" />
</Bar>
</BarChart>