|
@ -160,12 +160,16 @@ exports.drawPoint = function(x, y, group, JSONcontainer, svgContainer) { |
|
|
* @param className |
|
|
* @param className |
|
|
*/ |
|
|
*/ |
|
|
exports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer) { |
|
|
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); |
|
|
var rect = exports.getSVGElement('rect',JSONcontainer, svgContainer); |
|
|
rect.setAttributeNS(null, "x", x - 0.5 * width); |
|
|
rect.setAttributeNS(null, "x", x - 0.5 * width); |
|
|
rect.setAttributeNS(null, "y", y); |
|
|
rect.setAttributeNS(null, "y", y); |
|
|
rect.setAttributeNS(null, "width", width); |
|
|
rect.setAttributeNS(null, "width", width); |
|
|
rect.setAttributeNS(null, "height", height); |
|
|
rect.setAttributeNS(null, "height", height); |
|
|
rect.setAttributeNS(null, "class", className); |
|
|
rect.setAttributeNS(null, "class", className); |
|
|
// }
|
|
|
|
|
|
|
|
|
} |
|
|
}; |
|
|
}; |