Browse Source

Do not hide ticks when no data shown - #151

pull/183/head
Masayuki Tanaka 11 years ago
parent
commit
40b1b76a4a
  1. 4
      c3.js
  2. 4
      c3.min.js

4
c3.js

@ -3175,7 +3175,7 @@
y2.domain(getYDomain(targetsToShow, 'y2'));
// update axis tick values according to options
if (__axis_x_tick_fit || __axis_x_tick_count) {
if ((__axis_x_tick_fit || __axis_x_tick_count) && targetsToShow.length) {
tickValues = __axis_x_tick_values ? __axis_x_tick_values : generateTickValues(mapTargetsToUniqueXs(targetsToShow));
xAxis.tickValues(tickValues);
subXAxis.tickValues(tickValues);
@ -3188,7 +3188,7 @@
transitions.axisSubX.call(subXAxis);
// show/hide if manual culling needed
if (withUpdateXDomain) {
if (withUpdateXDomain && targetsToShow.length) {
if (__axis_x_tick_culling && tickValues) {
for (i = 1; i < tickValues.length; i++) {
if (tickValues.length / i < __axis_x_tick_culling_max) {

4
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save