我想在我的 dojox 图表气泡旁边或内部添加一个描述性标签。我在文档中看不到它是如何完成的。
Js 小提琴示例:
http://jsfiddle.net/martlark/ErNEM/
这里是一些来自堆栈溢出问题的示例代码:Need example of dojo scatter or bubble chart
require([
"dojox/charting/Chart",
"dojox/charting/themes/MiamiNice",
"dojox/charting/plot2d/Bubble",
"dojox/charting/plot2d/Markers",
"dojox/charting/axis2d/Default",
"dojo/domReady!"
],function(Chart,theme){
var d1 = [];
for (var i = 0; i <= 10; i += 1){
d1.push({x: i, y: parseInt(Math.random() * 50), size: parseInt(Math.random() * 10)});
// or you can put "size:1" for simplicity
}
var chart = new Chart("container");
chart.addPlot("default", {
type:"Bubble"
});
chart.addAxis("x");
chart.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major"});
// Add the series of data
chart.addSeries("Demo", d1);
chart.render();
});