Browse Source

Dynamic tick font siziing - based on http://jsfiddle.net/900k/ej4ujx81/4/

pull/1422/head
Maxim Filimonov 9 years ago
parent
commit
efb90e459c
  1. 4
      c3.js

4
c3.js

@ -6977,7 +6977,7 @@
}
function textFormatted(v) {
var formatted = tickFormat ? tickFormat(v) : v;
return typeof formatted !== 'undefined' ? formatted : '';
return typeof formatted !== 'undefined' ? formatted.toString() : '';
}
function getSizeFor1Char(tick) {
if (tickTextCharSize) {
@ -7079,7 +7079,7 @@
var dy = sizeFor1Char.h;
if (i === 0) {
if (orient === 'left' || orient === 'right') {
dy = -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3);
dy = -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - sizeFor1Char.h / 4);
} else {
dy = ".71em";
}

Loading…
Cancel
Save