Browse Source

New option for do not want to generateTickValues.

I found tick value auto generate and flash effect when using axis.x.tick.fit or count with redraw. 

I'm just want to keep tick value. And I think that default should be false.  

So if user set { autoGenerate: true } that will do generate tick value.

C3 is great!! Thanks.
pull/682/head
Yong-Hoo-Shin 10 years ago
parent
commit
9a46bd1b54
  1. 3
      c3.js

3
c3.js

@ -468,7 +468,9 @@
$$.updateXDomain(targetsToShow, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain); $$.updateXDomain(targetsToShow, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain);
if (!config.axis_x_tick_values) { if (!config.axis_x_tick_values) {
if (config.axis_x_tick_fit || config.axis_x_tick_count) { if (config.axis_x_tick_fit || config.axis_x_tick_count) {
if ( config.axis_x_tick_autoGenerate ){
tickValues = $$.generateTickValues($$.mapTargetsToUniqueXs(targetsToShow), config.axis_x_tick_count, $$.isTimeSeries()); tickValues = $$.generateTickValues($$.mapTargetsToUniqueXs(targetsToShow), config.axis_x_tick_count, $$.isTimeSeries());
}
} else { } else {
tickValues = undefined; tickValues = undefined;
} }
@ -975,6 +977,7 @@
axis_x_type: 'indexed', axis_x_type: 'indexed',
axis_x_localtime: true, axis_x_localtime: true,
axis_x_categories: [], axis_x_categories: [],
axis_x_tick_autoGenerate: false,
axis_x_tick_centered: false, axis_x_tick_centered: false,
axis_x_tick_format: undefined, axis_x_tick_format: undefined,
axis_x_tick_culling: {}, axis_x_tick_culling: {},

Loading…
Cancel
Save