Skip to content

Commit

Permalink
adds support for non-zero bar chart axes (closes #480)
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed May 23, 2016
1 parent 1527e34 commit 9090844
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/viz/types/bar.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ bar = (vars) ->
x = d3.scale.linear()

data = []
zero = 0
oppMethod = vars[opposite]
zero = d3.min oppMethod.scale.viz.domain()

if vars[discrete].persist.position.value and not vars.axes.stacked
ids = uniques d3.merge(nested.map (d) -> d.values), vars.id.value, fetchValue, vars, vars.id.value, false
Expand Down Expand Up @@ -107,8 +108,6 @@ bar = (vars) ->
else
mod = x(i % bars)

oppMethod = vars[opposite]

if vars.axes.stacked
value = d.d3plus[opposite]
base = d.d3plus[opposite+"0"]
Expand Down

0 comments on commit 9090844

Please sign in to comment.