Commit 6cea1c00 authored by Evgeny's avatar Evgeny

Fix grid thin out

parent 46631051
......@@ -3864,20 +3864,11 @@
xgridData = $$.generateGridData(config.grid_x_type, $$.x),
tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;
if($$.shouldThinOutXGrid()){
var tmp = [];
for(var i = 0; i < xgridData.length; i++){
if(i % 2 === 0){
tmp.push(xgridData[i]);
}
}
if(xgridData.length % 2 === 1){
tmp.push(xgridData[xgridData.length-1]);
}
xgridData = tmp;
if($$.shouldThinOutXGrid()){
xgridData = xgridData.filter(function(v, i){
return i % 2 == 0;
});
}
$$.xgridAttr = config.axis_rotated ? {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,20 +32,11 @@ c3_chart_internal_fn.updateXGrid = function (withoutUpdate) {
xgridData = $$.generateGridData(config.grid_x_type, $$.x),
tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;
if($$.shouldThinOutXGrid()){
var tmp = [];
for(var i = 0; i < xgridData.length; i++){
if(i % 2 === 0){
tmp.push(xgridData[i]);
}
}
if(xgridData.length % 2 === 1){
tmp.push(xgridData[xgridData.length-1]);
}
xgridData = tmp;
if($$.shouldThinOutXGrid()){
xgridData = xgridData.filter(function(v, i){
return i % 2 == 0;
});
}
$$.xgridAttr = config.axis_rotated ? {
......
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