I am able to display the bubbles in the graph, all are forced to converge in the center forming a huge circle. However, for some data inputs, where there are more data or some circles are bigger than others, the whole circle is clipped by the area. Also, if data are smaller or some circles are smaller, the whole circle looks smaller on the area. Please advise how to properly scale my circles so that whatever the data size is, the whole big circle will fit just perfectly in the area.
var chartElement = d3.select('#graph'); var width = chartElement._groups[0][0].clientWidth; var height = chartElement._groups[0][0].clientHeight; var scale = d3.scalePow().range([height / 85, height / 8.5]).domain([0, maxVal]); I just take a guess of height/85 and height/8.5 for the range. But it doesn't work on other data sets.
0 comments:
Post a Comment