Commit adbe644e authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix x axis tick

parent ae8cf74b
......@@ -1527,6 +1527,7 @@
tickValues.push(end);
}
}
if (!isTimeSeries) { tickValues = tickValues.sort(); }
return tickValues;
}
function addHiddenTargetIds(targetIds) {
......@@ -3001,7 +3002,7 @@
// update axis tick values according to options, except for scatter plot
if (! hasScatterType(targetsToShow)) { // TODO: fix this
tickValues = generateTickValues(mapTargetsToUniqueXs(targetsToShow)).sort();
tickValues = generateTickValues(mapTargetsToUniqueXs(targetsToShow));
xAxis.tickValues(tickValues);
subXAxis.tickValues(tickValues);
}
......@@ -3029,9 +3030,11 @@
break;
}
}
d3.selectAll('.' + CLASS.axisX + ' .tick').sort(function (e1, e2) { return e1 - e2; });
d3.selectAll('.' + CLASS.axisX + ' .tick text').each(function (e, i) {
d3.select(this).style('display', i % intervalForCulling ? 'none' : 'block');
d3.selectAll('.' + CLASS.axisX + ' .tick text').each(function (e) {
var index = tickValues.indexOf(e);
if (index > 0) {
d3.select(this).style('display', index % intervalForCulling ? 'none' : 'block');
}
});
}
......
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