我試圖使用dimple.js's3.stacked = false
切換來抑制給定月份的數據聚合,但它不會這樣做。如何在dimple.js中正確地進行聚合抑制?下面的代碼不應該加上05/2013的利潤,至少這是我想實現的。如何在dimple.js中使用series.stack = false來抑制聚合;每個系列的不同符號
我試圖使用s3 = chart.addSeries("Profit in each unit", dimple.plot.bubble, [x,y3]);
中的「利潤」而不是「每個單元中的利潤」,然後沒有聚合,但氣泡在s3系列中改變顏色。如何在「每個單位中的利潤」泡沫中實現一種顏色並且不聚合?
另外,是否有可能爲每個系列使用不同的符號,如正方形,菱形等除了氣泡?
var svg = dimple.newSvg("body", 800, 400);
var data = [
{"Month":"01/2013", "Revenue":2000, "Profit":2000, "Units":4},
{"Month":"02/2013", "Revenue":3201, "Profit":2000, "Units":3},
{"Month":"03/2013", "Revenue":1940, "Profit":14000, "Units":5},
{"Month":"04/2013", "Revenue":2500, "Profit":3200, "Units":1},
{"Month":"05/2013", "Revenue":800, "Profit":1200, "Units":4},
{"Month":"05/2013", "Revenue":800, "Profit":5300, "Units":4}
];
var chart = new dimple.chart(svg, data);
chart.setBounds(60,20,680,330);
var x = chart.addCategoryAxis("x", "Month");
var y1 = chart.addMeasureAxis("y", "Revenue");
var y2 = chart.addMeasureAxis("y", "Units");
var y3 = chart.addMeasureAxis(y1, "Profit");
chart.addSeries("Sales Units", dimple.plot.bubble, [x,y2]);
chart.addSeries("Sales Revenue", dimple.plot.bubble, [x,y1]);
s3 = chart.addSeries("Profit in each unit", dimple.plot.bubble, [x,y3]);
s3.stacked = false;
chart.assignColor("Sales Units", "white", "red", 0.5);
chart.assignColor("Sales Revenue", "#FF00FF");
chart.assignColor("Profit in each unit", "green");
x.dateParseFormat = "%m/%Y";
x.addOrderRule("Date");
chart.draw();