Commit 0a2f754b authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix connect_null to connectNull - #516 #81

parent ce208470
...@@ -997,7 +997,7 @@ ...@@ -997,7 +997,7 @@
point_focus_expand_enabled: true, point_focus_expand_enabled: true,
point_focus_expand_r: undefined, point_focus_expand_r: undefined,
point_select_r: undefined, point_select_r: undefined,
line_connect_null: false, line_connectNull: false,
// bar // bar
bar_width: undefined, bar_width: undefined,
bar_width_ratio: 0.6, bar_width_ratio: 0.6,
...@@ -2575,9 +2575,9 @@ ...@@ -2575,9 +2575,9 @@
}; };
line = config.axis_rotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue); line = config.axis_rotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue);
if (!config.line_connect_null) { line = line.defined(function (d) { return d.value != null; }); } if (!config.line_connectNull) { line = line.defined(function (d) { return d.value != null; }); }
return function (d) { return function (d) {
var data = config.line_connect_null ? $$.filterRemoveNull(d.values) : d.values, var data = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values,
x = isSub ? $$.x : $$.subX, y = yScaleGetter.call($$, d.id), x0 = 0, y0 = 0, path; x = isSub ? $$.x : $$.subX, y = yScaleGetter.call($$, d.id), x0 = 0, y0 = 0, path;
if ($$.isLineType(d)) { if ($$.isLineType(d)) {
if (config.data_regions[d.id]) { if (config.data_regions[d.id]) {
...@@ -2735,12 +2735,12 @@ ...@@ -2735,12 +2735,12 @@
}; };
area = config.axis_rotated ? area.x0(value0).x1(value1).y(xValue) : area.x(xValue).y0(value0).y1(value1); area = config.axis_rotated ? area.x0(value0).x1(value1).y(xValue) : area.x(xValue).y0(value0).y1(value1);
if (!config.line_connect_null) { if (!config.line_connectNull) {
area = area.defined(function (d) { return d.value !== null; }); area = area.defined(function (d) { return d.value !== null; });
} }
return function (d) { return function (d) {
var data = config.line_connect_null ? $$.filterRemoveNull(d.values) : d.values, x0 = 0, y0 = 0, path; var data = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values, x0 = 0, y0 = 0, path;
if ($$.isAreaType(d)) { if ($$.isAreaType(d)) {
path = area.interpolate($$.getInterpolate(d))(data); path = area.interpolate($$.getInterpolate(d))(data);
} else { } else {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -131,7 +131,7 @@ c3_chart_internal_fn.getDefaultConfig = function () { ...@@ -131,7 +131,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
point_focus_expand_enabled: true, point_focus_expand_enabled: true,
point_focus_expand_r: undefined, point_focus_expand_r: undefined,
point_select_r: undefined, point_select_r: undefined,
line_connect_null: false, line_connectNull: false,
// bar // bar
bar_width: undefined, bar_width: undefined,
bar_width_ratio: 0.6, bar_width_ratio: 0.6,
......
...@@ -70,9 +70,9 @@ c3_chart_internal_fn.generateDrawLine = function (lineIndices, isSub) { ...@@ -70,9 +70,9 @@ c3_chart_internal_fn.generateDrawLine = function (lineIndices, isSub) {
}; };
line = config.axis_rotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue); line = config.axis_rotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue);
if (!config.line_connect_null) { line = line.defined(function (d) { return d.value != null; }); } if (!config.line_connectNull) { line = line.defined(function (d) { return d.value != null; }); }
return function (d) { return function (d) {
var data = config.line_connect_null ? $$.filterRemoveNull(d.values) : d.values, var data = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values,
x = isSub ? $$.x : $$.subX, y = yScaleGetter.call($$, d.id), x0 = 0, y0 = 0, path; x = isSub ? $$.x : $$.subX, y = yScaleGetter.call($$, d.id), x0 = 0, y0 = 0, path;
if ($$.isLineType(d)) { if ($$.isLineType(d)) {
if (config.data_regions[d.id]) { if (config.data_regions[d.id]) {
...@@ -230,12 +230,12 @@ c3_chart_internal_fn.generateDrawArea = function (areaIndices, isSub) { ...@@ -230,12 +230,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); area = config.axis_rotated ? area.x0(value0).x1(value1).y(xValue) : area.x(xValue).y0(value0).y1(value1);
if (!config.line_connect_null) { if (!config.line_connectNull) {
area = area.defined(function (d) { return d.value !== null; }); area = area.defined(function (d) { return d.value !== null; });
} }
return function (d) { return function (d) {
var data = config.line_connect_null ? $$.filterRemoveNull(d.values) : d.values, x0 = 0, y0 = 0, path; var data = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values, x0 = 0, y0 = 0, path;
if ($$.isAreaType(d)) { if ($$.isAreaType(d)) {
path = area.interpolate($$.getInterpolate(d))(data); path = area.interpolate($$.getInterpolate(d))(data);
} else { } else {
......
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