我正在尝试使用百分比轴创建散点图。但它不起作用。
var chart = new dimple.chart(svg);
var x = chart.addCategoryAxis("x", "Fruit");
var y1 = chart.addPctAxis("y", "Value");
var y2 = chart.addPctAxis("y", "Value");
var s1 = chart.addSeries("Year", dimple.plot.bubble, [x, y1]);
s1.data = [
{ "Value" : 10, "Fruit" : "Grapefruit", "Year" : 2012 },
{ "Value" : 40, "Fruit" : "Apple", "Year" : 2012 },
{ "Value" : 12, "Fruit" : "Banana", "Year" : 2012 }
];
var s2 = chart.addSeries("Year", dimple.plot.bubble, [x, y2]);
s2.data = [
{ "Value" : 11, "Fruit" : "Grapefruit", "Year" : 2013 },
{ "Value" : 30, "Fruit" : "Apple", "Year" : 2013 },
{ "Value" : 14, "Fruit" : "Banana", "Year" : 2013 }
];
chart.draw();
以下是jsfiddle链接: http://jsfiddle.net/chetan119/NCW89/142/