diff --git a/lib/DOMutil.js b/lib/DOMutil.js index 02b4ba85..38b35c7e 100644 --- a/lib/DOMutil.js +++ b/lib/DOMutil.js @@ -160,12 +160,16 @@ exports.drawPoint = function(x, y, group, JSONcontainer, svgContainer) { * @param className */ exports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer) { -// if (height != 0) { + if (height != 0) { + if (height < 0) { + height *= -1; + y -= height; + } var rect = exports.getSVGElement('rect',JSONcontainer, svgContainer); rect.setAttributeNS(null, "x", x - 0.5 * width); rect.setAttributeNS(null, "y", y); rect.setAttributeNS(null, "width", width); rect.setAttributeNS(null, "height", height); rect.setAttributeNS(null, "class", className); -// } + } }; \ No newline at end of file