Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NVD3 Scatter Chart Circle Radius

I was wondering how I can set minimum and maximum radii of the circles in an NVD3 scatter chart.

NVD3 Scatter: http://nvd3.org/ghpages/scatter.html

like image 654
NoMachine Avatar asked Dec 09 '22 10:12

NoMachine


2 Answers

Call .sizeRange([minArea, maxArea]) on your chart object. Note that "size" is proportional to area, not radius, so you need to use the square of the maximum/minimum radius (adjusted by pi/2 if you want to be precise).

like image 71
AmeliaBR Avatar answered Dec 10 '22 23:12

AmeliaBR


As of 1.7.1, call .pointRange([minArea,maxArea]) .

like image 36
Nadim Avatar answered Dec 10 '22 22:12

Nadim