0
我正嘗試創建一個帶有兩個軸和兩個數據系列的簡單圖表。dimple.js多系列**線**圖表
當我定義泡系列 - 但預期當兩個系列被定義爲線的所有作品,從數據點到y軸的虛線感到困惑
出人意料的是,我不是不能似乎可以找到任何顯示帶2 *線系列的2 * y軸的例子。
我的X軸是基於時間,但我可以使用以前的jsfiddle答案(jsfiddle.net/NCW89/)說明問題:
var svg = dimple.newSvg("#chartContainer", 600, 400),
chart = null,
s1 = null,
s2 = null,
x = null,
y1 = null,
y2 = null;
chart = new dimple.chart(svg);
x = chart.addCategoryAxis("x", "Fruit");
y1 = chart.addMeasureAxis("y", "Value");
y2 = chart.addMeasureAxis("y", "Value");
s1 = chart.addSeries("Year", dimple.plot.bubble, [x, y1]);
s1.data = [
{ "Value" : 100000, "Fruit" : "Grapefruit", "Year" : 2012 },
{ "Value" : 400000, "Fruit" : "Apple", "Year" : 2012 },
{ "Value" : 120000, "Fruit" : "Banana", "Year" : 2012 }
];
s2 = chart.addSeries("Year", dimple.plot.bubble, [x, y2]);
s2.data = [
{ "Value" : 110000, "Fruit" : "Grapefruit", "Year" : 2013 },
{ "Value" : 300000, "Fruit" : "Apple", "Year" : 2013 },
{ "Value" : 140000, "Fruit" : "Banana", "Year" : 2013 }
];
chart.draw();
改變從dimple.plot.bubble系列 - >酒窩.plot.line將顯示行爲。
似乎這樣一個常見的必需功能,我不禁感到我失去了明顯的東西。
謝謝
啊,感謝information.not多回到1.1.3的問題 - 非常有幫助,謝謝 – user3506975