Update c3.js and c3.min.js

parent af5ef4e7
...@@ -3069,7 +3069,11 @@ ...@@ -3069,7 +3069,11 @@
var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values; var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;
if (t.id === d.id || indices[t.id] !== indices[d.id]) { return; } if (t.id === d.id || indices[t.id] !== indices[d.id]) { return; }
if (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) { if (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) {
if (values[i]) { var shouldStack = i in values &&
(!$$.isBarType(d) ||
values[i].value * d.value >= 0);
if (shouldStack) {
offset += scale(values[i].value) - y0; offset += scale(values[i].value) - y0;
} }
} }
...@@ -3306,7 +3310,7 @@ ...@@ -3306,7 +3310,7 @@
c3_chart_internal_fn.updateArea = function (durationForExit) { c3_chart_internal_fn.updateArea = function (durationForExit) {
var $$ = this, d3 = $$.d3; var $$ = this, d3 = $$.d3;
$$.mainArea = $$.main.selectAll('.' + CLASS.areas).selectAll('.' + CLASS.area) $$.mainArea = $$.main.selectAll('.' + CLASS.areas).selectAll('.' + CLASS.area)
.data($$.lineData.bind($$)); .data($$.areaData.bind($$));
$$.mainArea.enter().append('path') $$.mainArea.enter().append('path')
.attr("class", $$.classArea.bind($$)) .attr("class", $$.classArea.bind($$))
.style("fill", $$.color) .style("fill", $$.color)
...@@ -3926,7 +3930,7 @@ ...@@ -3926,7 +3930,7 @@
}; };
c3_chart_internal_fn.isLineType = function (d) { c3_chart_internal_fn.isLineType = function (d) {
var config = this.config, id = isString(d) ? d : d.id; var config = this.config, id = isString(d) ? d : d.id;
var is = !config.data_types[id] || ['line', 'spline', 'area', 'area-spline', 'step', 'area-step'].indexOf(config.data_types[id]) >= 0; var is = !config.data_types[id] || ['line', 'spline', 'area-spline', 'step', 'area-step'].indexOf(config.data_types[id]) >= 0;
return is; return is;
}; };
c3_chart_internal_fn.isStepType = function (d) { c3_chart_internal_fn.isStepType = function (d) {
...@@ -3964,6 +3968,9 @@ ...@@ -3964,6 +3968,9 @@
c3_chart_internal_fn.isArcType = function (d) { c3_chart_internal_fn.isArcType = function (d) {
return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d); return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d);
}; };
c3_chart_internal_fn.areaData = function (d) {
return this.isAreaType(d) ? [d] : [];
};
c3_chart_internal_fn.lineData = function (d) { c3_chart_internal_fn.lineData = function (d) {
return this.isLineType(d) ? [d] : []; return this.isLineType(d) ? [d] : [];
}; };
......
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