Commit 8af0b900 authored by Evgeny's avatar Evgeny

Fix axis bug for XY chart

parent 65197230
......@@ -5097,7 +5097,7 @@
return;
}
var ticks = $$.getXAxisTickValues() || [];
var ticks = $$.getXAxisTickValues() || $$.config.axis_x_categories || [];
var widthForTick = $$.getCurrentWidth() / ticks.length;
var maxTickWidth = $$.getMaxTickWidth('x');
......@@ -5134,7 +5134,7 @@
c3_chart_internal_fn.getTicksCoef = function(){
var $$ = this;
var ticks = $$.getXAxisTickValues() || [];
var ticks = $$.getXAxisTickValues() || $$.config.axis_x_categories || [];
var ticksNum = ticks.length;
if($$.config.axis_rotated){
......@@ -8520,7 +8520,7 @@
function splitTickText(d, maxWidth) {
var tickText, thinOutCoef;
if(params.isCaregory){
if(params.isCategory){
tickText = $$.categoryName(d);
tickText = textFormatted(tickText);
} else {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -462,7 +462,7 @@ c3_chart_internal_fn.tuneAxisTicks = function(){
return;
}
var ticks = $$.getXAxisTickValues() || [];
var ticks = $$.getXAxisTickValues() || $$.config.axis_x_categories || [];
var widthForTick = $$.getCurrentWidth() / ticks.length;
var maxTickWidth = $$.getMaxTickWidth('x');
......@@ -499,7 +499,7 @@ c3_chart_internal_fn.getMaxTickWidthAllowed = function(){
c3_chart_internal_fn.getTicksCoef = function(){
var $$ = this;
var ticks = $$.getXAxisTickValues() || [];
var ticks = $$.getXAxisTickValues() || $$.config.axis_x_categories || [];
var ticksNum = ticks.length;
if($$.config.axis_rotated){
......
......@@ -162,7 +162,7 @@ function c3_axis(d3, params, $$) {
function splitTickText(d, maxWidth) {
var tickText, thinOutCoef;
if(params.isCaregory){
if(params.isCategory){
tickText = $$.categoryName(d);
tickText = textFormatted(tickText);
} else {
......
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