Skip to content

Commit

Permalink
Applying specified limit in bubble plot (#2815)
Browse files Browse the repository at this point in the history
* Applying specified limit in bubble plot

* Keeping bubbles proportinate
  • Loading branch information
mistercrunch authored May 30, 2017
1 parent 4ffc1f6 commit 3a4cd3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/assets/visualizations/nvd3_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 1 addition & 0 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ def query_obj(self):
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,
Expand Down

0 comments on commit 3a4cd3a

Please sign in to comment.