Update c3.js and c3.min.js

parent 2fe0603f
......@@ -3726,6 +3726,8 @@
var data = [];
data.noNegative = true;
targets.forEach(function(target){
data.push($$.cloneTarget(target));
});
......@@ -3733,7 +3735,12 @@
for(var k = 0; k < targets[0].values.length; k++) {
var tt = 0;
for(c in targets) {
tt = tt + targets[c].values[k].value;
if(targets[c].values[k]){
if(targets[c].values[k].value < 0){
data.noNegative = false;
}
tt = tt + Math.abs(targets[c].values[k].value);
}
}
tr[k] = tt;
}
......@@ -5044,9 +5051,11 @@
// if we don't need to tune
if($$.config.normalized){
$$.data.targets = $$.normalize($$.data._targets);
if($$.data.targets.noNegative){
$$.cachedRedraw();
return;
}
}
var apply = function(){
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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