0
dimplejs를 사용하여 버블 차트를 만듭니다. 그 부분은 끝났어. 버블 안에 소유자 이름 (버블 레이블)을 추가하고 차트 외부의 목록뿐만 아니라이 기능이 작동하지 않도록하고 싶습니다. 어떻게해야합니까?dimplejs 버블 차트의 각 버블 안에 레이블 표시
all_data = [{"Size": 126, "x": 0.57713748637776141, "y": -0.23994977513487858, "Owner": "a"}, {"Size": 394, "x": -0.23305704511539499, "y": -0.39183313136189662, "Owner": "b"}, {"Size": 127, "x": 0.12093459993205866, "y": 0.56390700220806189, "Owner": "c"}, {"Size": 624, "x": -0.46501504119442505, "y": 0.06787590428871329, "Owner": "d"}]
var svg = dimple.newSvg("#chartContainer", 600, 200);
var myChart = new dimple.chart(svg, all_data);
myChart.setBounds(25, 25, 550, 150)
var x = myChart.addMeasureAxis("x", "x");
var y = myChart.addMeasureAxis("y", "y");
x.hidden = true;
y.hidden = true;
myChart.addLegend(25, 5, 550, 20, "right");
myChart.addMeasureAxis("z", "Size");
var s = myChart.addSeries("Owner", dimple.plot.bubble);
myChart.draw();
주,이 답변으로 업그레이드하도록 요구 dimple.js [버전 2+] (https://github.com/PMSI-AlignAlytics/dimple/releases) – Mark
또한 [빠른 업데이트] (http://jsfiddle.net/acjwqpsL/3/)에서 "크기"대신 거품의 "소유자". – Mark
감사합니다 John and Mark! 한 가지 더, 거품이 텍스트보다 작은 경우 텍스트를 거품 외부에 놓고 싶기 때문에 거품의 반경을 어떻게 찾습니까? – huhahihi