Browse Source

Update data.js to show\hide data labels

When you pass a format function to data.labels you cannot show and hide labels; now with a property show you can setup it.
pull/1004/head^2
Timophey 10 years ago
parent
commit
b55205f48c
  1. 2
      src/data.js

2
src/data.js

@ -256,7 +256,7 @@ c3_chart_internal_fn.hasDataLabel = function () {
var config = this.config;
if (typeof config.data_labels === 'boolean' && config.data_labels) {
return true;
} else if (typeof config.data_labels === 'object' && notEmpty(config.data_labels)) {
} else if (typeof config.data_labels === 'object' && notEmpty(config.data_labels) && config.data_labels.show) {
return true;
}
return false;

Loading…
Cancel
Save