Merge pull request #31484 from Kerumen/victoryBar-cornerRadius

[victory] Add cornerRadius prop on VictoryBar
This commit is contained in:
Wesley Wigham
2018-12-24 21:40:30 -08:00
committed by GitHub
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -1261,6 +1261,12 @@ declare module "victory" {
export class VictoryAxis extends React.Component<VictoryAxisProps, any> {}
export interface VictoryBarProps extends VictoryCommonProps, VictoryDatableProps, VictoryMultiLabeableProps {
/**
* The cornerRadius prop specifies a radius to apply to each bar.
* If this prop is given as a single number, the radius will only be applied to the top of each bar.
* When this prop is given as a function, it will be evaluated with the arguments datum, and active.
*/
cornerRadius?: NumberOrCallback;
/**
* The event prop take an array of event objects. Event objects are composed of
* a target, an eventKey, and eventHandlers. Targets may be any valid style namespace
+1
View File
@@ -255,6 +255,7 @@ test = (
]}
barWidth={20}
barRatio={100}
cornerRadius={2}
/>
);