Commit b36f38f8 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix line with region

parent 1f8cd97c
......@@ -2236,8 +2236,8 @@
getBars(i).classed(CLASS.EXPANDED, false);
}
var lineOnMain = generateDrawLine(x, xx, getYScale),
lineOnSub = generateDrawLine(subX, subxx, getSubYScale);
var lineOnMain = generateDrawLine(false),
lineOnSub = generateDrawLine(true);
var areaOnMain = (function () {
var area;
......@@ -2268,15 +2268,17 @@
};
})();
function generateDrawLine(x, xValue, yScaleGetter) {
var yValue = function (d) { return yScaleGetter(d.id)(d.value); },
function generateDrawLine(isSub) {
var yScaleGetter = isSub ? getSubYScale : getYScale,
xValue = isSub ? xx : subxx,
yValue = function (d) { return yScaleGetter(d.id)(d.value); },
line = d3.svg.line()
.x(__axis_rotated ? yValue : xValue)
.y(__axis_rotated ? xValue : yValue);
if (!__line_connect_null) { line = line.defined(function (d) { return d.value != null; }); }
return function (d) {
var data = __line_connect_null ? filterRemoveNull(d.values) : d.values,
y = yScaleGetter(d.id), x0 = 0, y0 = 0;
x = isSub ? x : subX, y = yScaleGetter(d.id), x0 = 0, y0 = 0;
if (isLineType(d)) {
if (__data_regions[d.id]) {
return lineWithRegions(data, x, y, __data_regions[d.id]);
......
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