NVD3散射图圆半径 [英] NVD3 Scatter Chart Circle Radius
本文介绍了NVD3散射图圆半径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何在NVD3散点图中设置圆的最小和最大半径。
I was wondering how I can set minimum and maximum radii of the circles in an NVD3 scatter chart.
NVD3分散: http://nvd3.org/ghpages/scatter.html
推荐答案
在图表对象上调用 .sizeRange([minArea,maxArea])
。请注意,尺寸与面积成比例,而不是半径,因此您需要使用最大/最小半径的平方(如果您想要精确,则用pi / 2调整)。
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).
这篇关于NVD3散射图圆半径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文