Skip to content

Commit

Permalink
Fix bar API validations and passed to the Billboard | Fixes #903
Browse files Browse the repository at this point in the history
  • Loading branch information
matuzalemsteles committed May 17, 2018
1 parent 7745643 commit e08c01e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/clay-charts/src/ChartBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const ChartBase = {
const config = {
area: state.area,
axis,
bar: state.bar,
bindto: this.element.querySelector('[ref="chart"]'),
bubble: state.bubble,
color: color,
Expand Down Expand Up @@ -821,7 +822,14 @@ ChartBase.STATE = {
* @type {?(Object|undefined)}
*/
bar: Config.shapeOf({
width: Config.number(),
width: Config.oneOfType(
Config.number(),
Config.shapeOf({
max: config.number()
ratio: Config.number(),
})
),
padding: Config.number()
zerobased: Config.bool(),
}),

Expand Down

0 comments on commit e08c01e

Please sign in to comment.