Skip to content

Commit

Permalink
Merge pull request #55 from RhoInc/v3.0.1
Browse files Browse the repository at this point in the history
V3.0.1
  • Loading branch information
jwildfire authored Mar 13, 2017
2 parents 9770616 + 1d03a9e commit 382be7b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions build/aeTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ var aeTable = function () {
});
});

//drop filters with 0 or 1 levels and throw a warning
chart.config.variables.filters = chart.config.variables.filters.filter(function (d) {
if (d.values.length <= 1) {
console.warn(d.value_col + " filter not shown since the variable has less than 2 levels");
}
return d.values.length > 1;
});

//Clear custom controls.
selector.selectAll('ul.nav').remove();

Expand Down
3 changes: 3 additions & 0 deletions css/aeTable.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
display:block;
}

div.aeTable .controls .filterDiv.custom-filters select{
min-width: 3em;
}


/*Rate filter*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aeexplorer",
"version": "3.0.0",
"version": "3.0.1",
"description": "An interactive tool that allows users to dynamically query adverse event data in real time.",
"keywords": [
"adverse",
Expand Down
8 changes: 8 additions & 0 deletions src/chart/controls/filters/custom/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ export function init(chart) {
.map(d=>d.key);
});

//drop filters with 0 or 1 levels and throw a warning
chart.config.variables.filters = chart.config.variables.filters.filter(function(d){
if(d.values.length<=1){
console.warn(d.value_col + " filter not shown since the variable has less than 2 levels")
}
return d.values.length>1
})

//Clear custom controls.
selector.selectAll('ul.nav').remove();

Expand Down

0 comments on commit 382be7b

Please sign in to comment.