Added radius to Bar props. let set up global radius for all dataSets

This commit is contained in:
kalbrycht
2019-02-15 09:46:46 +00:00
parent b429791b8b
commit f7f5ff2612
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 | any[];
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>