From 3d48b94d5e8e66665691129578fab4c55fa61d49 Mon Sep 17 00:00:00 2001 From: angus Date: Fri, 13 Dec 2019 21:27:38 +1100 Subject: [PATCH] fix(bar): add ability to use number for grid lines (#669) --- packages/bar/src/props.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/bar/src/props.js b/packages/bar/src/props.js index 36552723d..9f19ce79e 100644 --- a/packages/bar/src/props.js +++ b/packages/bar/src/props.js @@ -44,8 +44,14 @@ export const BarPropTypes = { axisLeft: axisPropType, enableGridX: PropTypes.bool.isRequired, enableGridY: PropTypes.bool.isRequired, - gridXValues: PropTypes.arrayOf(PropTypes.number), - gridYValues: PropTypes.arrayOf(PropTypes.number), + gridXValues: PropTypes.oneOfType([ + PropTypes.number, + PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), + ]), + gridYValues: PropTypes.oneOfType([ + PropTypes.number, + PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), + ]), barComponent: PropTypes.func.isRequired,