Commit a0801cb4 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Merge master fix

parent 3ce01be5
......@@ -176,8 +176,15 @@ function c3_axis(d3, isCategory) {
return axis;
};
axis.tickValues = function (x) {
if (!arguments.length) { return tickValues; }
tickValues = x;
if (typeof x === 'function') {
tickValues = function () {
return x(scale.domain());
};
}
else {
if (!arguments.length) { return tickValues; }
tickValues = x;
}
return axis;
};
return axis;
......
......@@ -169,9 +169,12 @@ c3_chart_internal_fn.generateDrawArea = function (areaIndices, isSub) {
};
area = config[__axis_rotated] ? area.x0(value0).x1(value1).y(xValue) : area.x(xValue).y0(value0).y1(value1);
if (!config[__line_connect_null]) {
area = area.defined(function (d) { return d.value !== null; });
}
return function (d) {
var data = $$.filterRemoveNull(d.values), x0 = 0, y0 = 0, path;
var data = config[__line_connect_null] ? $$.filterRemoveNull(d.values) : d.values, x0 = 0, y0 = 0, path;
if ($$.isAreaType(d)) {
path = area.interpolate($$.getInterpolate(d))(data);
} else {
......
......@@ -84,7 +84,7 @@ c3_chart_internal_fn.showTooltip = function (selectedData, mouse) {
if (tooltipRight > chartRight) {
tooltipLeft -= tooltipRight - chartRight;
}
if (tooltipTop + tHeight > $$.getCurrentHeight()) {
if (tooltipTop + tHeight > $$.getCurrentHeight() && tooltipTop > tHeight + 30) {
tooltipTop -= tHeight + 30;
}
}
......
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