Browse Source

fixed error caused by function in config.data_order

pull/602/head
michalkop93 10 years ago
parent
commit
7d882e12fa
  1. 4
      c3.js
  2. 2
      c3.min.js
  3. 4
      src/data.js

4
c3.js

@ -1617,11 +1617,11 @@
};
c3_chart_internal_fn.isOrderDesc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'desc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'desc';
};
c3_chart_internal_fn.isOrderAsc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'asc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'asc';
};
c3_chart_internal_fn.orderTargets = function (targets) {
var $$ = this, config = $$.config, orderAsc = $$.isOrderAsc(), orderDesc = $$.isOrderDesc();

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

4
src/data.js

@ -206,11 +206,11 @@ c3_chart_internal_fn.hasPositiveValueInTargets = function (targets) {
};
c3_chart_internal_fn.isOrderDesc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'desc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'desc';
};
c3_chart_internal_fn.isOrderAsc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'asc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'asc';
};
c3_chart_internal_fn.orderTargets = function (targets) {
var $$ = this, config = $$.config, orderAsc = $$.isOrderAsc(), orderDesc = $$.isOrderDesc();

Loading…
Cancel
Save