Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #776 from chop-dbhi/issue-773-broken-dist-charts
Browse files Browse the repository at this point in the history
Replace null values with empty strings
  • Loading branch information
bruth committed Nov 16, 2015
2 parents 7f65fba + 00f5923 commit 2a65848
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/cilantro/ui/charts/dist.js
Expand Up @@ -108,13 +108,16 @@ define([
this.model.distribution(function(resp) {
if (_this.isClosed) return;

// Convert it into the structure the chart renderer expects
// Convert it into the structure the chart renderer expects.
// Since highcharts has odd behavior when encountering nul`
// we replace null values with empty strings to make the
// highcharts behavior more predictable.
var data = _.map(resp, function(item) {
return {
count: item.count,
values: [{
label: item.label,
value: item.value
value: item.value === null ? '' : item.value
}]
};
});
Expand Down

0 comments on commit 2a65848

Please sign in to comment.