Commit caca8119 authored by Evgeny's avatar Evgeny

Fix issue with wrong ticks lines

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