Commit 041e5939 authored by Evgeny's avatar Evgeny

Add hack for nodejs

parent 5c755497
......@@ -6435,7 +6435,20 @@
};
c3.chart.internal.fn.getBox = function(selection){
return selection.node().getBBox();
var box;
// FIXME: hack for nodejs
try {
box = selection.node().getBBox();
} catch(e){
box = {
y: 0,
x: 0,
height: 0,
width: 0
};
}
return box;
};
c3.chart.internal.fn.getLineCoordsForBar = function(center, order){
......
......@@ -10,7 +10,20 @@ c3.chart.internal.fn.drawLine = function(line, x1, x2, y1, y2){
};
c3.chart.internal.fn.getBox = function(selection){
return selection.node().getBBox();
var box;
// FIXME: hack for nodejs
try {
box = selection.node().getBBox();
} catch(e){
box = {
y: 0,
x: 0,
height: 0,
width: 0
};
}
return box;
};
c3.chart.internal.fn.getLineCoordsForBar = function(center, order){
......
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