|
|
@@ -151,10 +151,16 @@ nv.models.growingPieChart = function() {
|
|
|
.datum(data)
|
|
|
.call(legend);
|
|
|
|
|
|
- if ( margin.top != legend.height()) {
|
|
|
- margin.top = legend.height();
|
|
|
- availableHeight = (height || parseInt(container.style('height')) || 400)
|
|
|
- - margin.top - margin.bottom;
|
|
|
+ if (legend.height() > 50) {
|
|
|
+ wrap.select('.nv-legendWrap').style('visibility', 'hidden');
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ wrap.select('.nv-legendWrap').style('visibility', 'visible');
|
|
|
+ if (margin.top != legend.height()) {
|
|
|
+ margin.top = legend.height();
|
|
|
+ availableHeight = (height || parseInt(container.style('height')) || 400)
|
|
|
+ - margin.top - margin.bottom;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
wrap.select('.nv-legendWrap')
|