Commit caca8119 authored by Evgeny's avatar Evgeny

Fix issue with wrong ticks lines

parent 8cd56366
......@@ -4100,7 +4100,7 @@
if(cv <= 150){
return 3;
} else if(cv <= 300){
} else if(cv <= 200){
return 2;
} else {
return 1;
......@@ -4119,9 +4119,9 @@
cv = $$.getCurrentHeight();
}
if(cv <= 150){
if(cv <= 100){
return 3;
} else if(cv <= 300){
} else if(cv <= 200){
return 2;
} else {
return 1;
......@@ -8215,10 +8215,16 @@
switch(orient){
case "top":
case "bottom":
thinOutCoef = $$.getYThinOutCoef();
{
thinOutCoef = $$.getXThinOutCoef();
break;
}
case "left":
case "right":
thinOutCoef = $$.getXThinOutCoef();
{
thinOutCoef = $$.getYThinOutCoef();
break;
}
}
if(d % thinOutCoef !== 0){
......@@ -8306,6 +8312,7 @@
switch(orient){
case "bottom":
case "top":
{
if($$.config.grid_x_show){
var coef = $$.getXThinOutCoef();
......@@ -8313,8 +8320,11 @@
return i%coef == 0 ? 'block' : 'none';
});
}
break;
}
case "left":
case "right":
{
if($$.config.grid_y_show){
var coef = $$.getYThinOutCoef();
......@@ -8322,6 +8332,8 @@
return i%coef == 0 ? 'block' : 'none';
});
}
break;
}
}
switch (orient) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -146,10 +146,16 @@ function c3_axis(d3, params, $$) {
switch(orient){
case "top":
case "bottom":
thinOutCoef = $$.getYThinOutCoef();
{
thinOutCoef = $$.getXThinOutCoef();
break;
}
case "left":
case "right":
thinOutCoef = $$.getXThinOutCoef();
{
thinOutCoef = $$.getYThinOutCoef();
break;
}
}
if(d % thinOutCoef !== 0){
......@@ -237,6 +243,7 @@ function c3_axis(d3, params, $$) {
switch(orient){
case "bottom":
case "top":
{
if($$.config.grid_x_show){
var coef = $$.getXThinOutCoef();
......@@ -244,8 +251,11 @@ function c3_axis(d3, params, $$) {
return i%coef == 0 ? 'block' : 'none';
});
}
break;
}
case "left":
case "right":
{
if($$.config.grid_y_show){
var coef = $$.getYThinOutCoef();
......@@ -253,6 +263,8 @@ function c3_axis(d3, params, $$) {
return i%coef == 0 ? 'block' : 'none';
});
}
break;
}
}
switch (orient) {
......
......@@ -258,7 +258,7 @@ c3_chart_internal_fn.getXThinOutCoef = function(){
if(cv <= 150){
return 3;
} else if(cv <= 300){
} else if(cv <= 200){
return 2;
} else {
return 1;
......@@ -277,9 +277,9 @@ c3_chart_internal_fn.getYThinOutCoef = function(){
cv = $$.getCurrentHeight();
}
if(cv <= 150){
if(cv <= 100){
return 3;
} else if(cv <= 300){
} else if(cv <= 200){
return 2;
} else {
return 1;
......
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