Update c3.js and c3.min.js

parent af5ef4e7
......@@ -3069,7 +3069,11 @@
var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;
if (t.id === d.id || indices[t.id] !== indices[d.id]) { return; }
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;
}
}
......@@ -3306,7 +3310,7 @@
c3_chart_internal_fn.updateArea = function (durationForExit) {
var $$ = this, d3 = $$.d3;
$$.mainArea = $$.main.selectAll('.' + CLASS.areas).selectAll('.' + CLASS.area)
.data($$.lineData.bind($$));
.data($$.areaData.bind($$));
$$.mainArea.enter().append('path')
.attr("class", $$.classArea.bind($$))
.style("fill", $$.color)
......@@ -3926,7 +3930,7 @@
};
c3_chart_internal_fn.isLineType = function (d) {
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;
};
c3_chart_internal_fn.isStepType = function (d) {
......@@ -3964,6 +3968,9 @@
c3_chart_internal_fn.isArcType = function (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) {
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