Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Fix y-axis to accept negative numbers #1427
Browse files Browse the repository at this point in the history
  • Loading branch information
wiadev committed Dec 15, 2017
1 parent ca043ba commit 1c7e2da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/charts/BarChartComponent/ranges.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export const getYRange = (height, data, fields) => {
.scaleLinear()
.range([height, 0])
.domain([
0,
d3.min(data, d => {
return d3.min(keys, key => {
return d[key];
});
}),
d3.max(data, d => {
return d3.max(keys, key => {
return d[key];
Expand Down

0 comments on commit 1c7e2da

Please sign in to comment.