Commit 360e57dc authored by David Schnur's avatar David Schnur

Minor cleanup on recently-merged code, for consistency.

parent e7634c64
......@@ -665,25 +665,25 @@
}
}
}
if (s.bars.show) {
// make sure we got room for the bar on the dancing floor
var delta;
switch (s.bars.align) {
case 'left':
case "left":
delta = 0;
break;
case 'right':
case "right":
delta = -s.bars.barWidth;
break;
case 'center':
case "center":
delta = -s.bars.barWidth / 2;
break;
default:
throw 'Invalid bar alignment: ' + s.bars.align;
throw new Error("Invalid bar alignment: " + s.bars.align);
}
if (s.bars.horizontal) {
ymin += delta;
ymax += delta + s.bars.barWidth;
......@@ -2225,23 +2225,23 @@
// FIXME: figure out a way to add shadows (for instance along the right edge)
ctx.lineWidth = series.bars.lineWidth;
ctx.strokeStyle = series.color;
var barLeft;
switch (series.bars.align) {
case 'left':
case "left":
barLeft = 0;
break;
case 'right':
case "right":
barLeft = -series.bars.barWidth;
break;
case 'center':
case "center":
barLeft = -series.bars.barWidth / 2;
break;
default:
throw 'Invalid bar alignment: ' + series.bars.align;
throw new Error("Invalid bar alignment: " + series.bars.align);
}
var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;
plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, 0, fillStyleCallback, series.xaxis, series.yaxis);
ctx.restore();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment