Applying specified limit in bubble plot (#2815)

* Applying specified limit in bubble plot

* Keeping bubbles proportinate
This commit is contained in:
Maxime Beauchemin 2017-05-30 11:04:44 -07:00 committed by GitHub
parent 4ffc1f613e
commit 3a4cd3ae24
2 changed files with 3 additions and 1 deletions

View File

@ -261,7 +261,8 @@ function nvd3Vis(slice, payload) {
s += '</table>';
return s;
});
chart.pointRange([5, fd.max_bubble_size * fd.max_bubble_size]);
chart.pointRange([5, fd.max_bubble_size ** 2]);
chart.pointDomain([0, d3.max(payload.data, d => d3.max(d.values, v => v.size))]);
break;
case 'area':

View File

@ -656,6 +656,7 @@ class BubbleViz(NVD3Viz):
self.z_metric = form_data.get('size')
self.entity = form_data.get('entity')
self.series = form_data.get('series')
d['row_limit'] = form_data.get('limit')
d['metrics'] = [
self.z_metric,