Skip to content

Commit

Permalink
Fix domain values
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorizzo committed Jan 3, 2020
1 parent c1c0be7 commit 8ce5c55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vue-d3-barchart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ export default {
return 5
},
min () {
let dom = this.opts.domain
let { min } = this.opts.domain
let { yValues } = this
return (dom.min === null) ? d3.min(yValues) : dom.min
return (min === null || min === undefined) ? d3.min(yValues) : min
},
max () {
let dom = this.opts.domain
let { max } = this.opts.domain
let { yValues } = this
return (dom.max === null) ? d3.max(yValues) : dom.max
return (max === null || max === undefined) ? d3.max(yValues) : max
},
mappedData () {
return this.data.map((d, i) => {
Expand Down

0 comments on commit 8ce5c55

Please sign in to comment.