Skip to content

Commit

Permalink
Drop the red columns that have a value of zero
Browse files Browse the repository at this point in the history
  • Loading branch information
dmigwi authored and chappjc committed May 14, 2019
1 parent 1712781 commit fa62d96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions public/js/helpers/chart_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function plotChart (e, barWidth) {
ctx.fillStyle = e.color

e.points.map((p) => {
if (p.yval === 0) return
var x = p.canvasx - barWidth / 2
var height = yBottom - p.canvasy
ctx.fillRect(x, p.canvasy, barWidth, height)
Expand All @@ -56,6 +57,7 @@ export function multiColumnBarPlotter (e) {
ctx.strokeStyle = strokeColors[i]

bar.map((p) => {
if (p.yval === 0) return
var xLeft = p.canvasx - (barWidth / 2) * (1 - i / (sets.length - 1))
var height = yBottom - p.canvasy
var width = barWidth / sets.length
Expand Down

0 comments on commit fa62d96

Please sign in to comment.