2014-04-07 2 views
0

두 개의 축과 두 개의 데이터 시리즈로 간단한 차트를 만들려고합니다. 나는 거품 시리즈를 정의 할 때dimple.js 다중 시리즈 ** line ** 차트

이 - 두 시리즈 라인으로 정의 할 때 그러나 예상대로 모든 작품, y 축에 데이터 포인트에서 점선은

놀랍게도 혼란스러워, 나는 보이지 않을 수 없습니다 2 * 라인 시리즈의 2 * y 축을 보여주는 예제를 찾으십시오.

내 x 축 기반 시간 그러나 나는 이전 JSfiddle 응답 (jsfiddle.net/NCW89/)를 사용하여 문제를 설명 할 수 dimple.plot.bubble에서 일련의 변경

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(); 

-> 딤플을 .plot.line은 동작을 보여줍니다.

나는 분명히 뭔가 빠져 있다는 느낌을 갖지 못하는 것처럼 보편적으로 요구되는 기능처럼 보입니다.

감사

답변

1

나는 당신이 최신 버전에 도입 된 버그 아무것도 누락되지 않습니다 두려워 해요. 다음 주 또는 2 주에 버전 1.2에서 수정 될 것입니다. 불행하게도이 파괴 버전은 시리즈 특정 데이터를 설정하는 기능을 추가 한 버전이기도합니다. 당신이 그 동안 주위에 작업 할 경우 다시 버전 1.1.3로 돌아가서 데이터를 옛날 방식으로 설정해야합니다 :는 information.not에 대한 감사를

var svg = dimple.newSvg("#chartContainer", 600, 400), 
    chart = null, 
    s1 = null, 
    s2 = null, 
    x = null, 
    y1 = null, 
    y2 = null, 
    data = [ 
     { "Fruit" : "Grapefruit", "Value 1" : 100000, "Year 1" : 2012, "Value 2" : 110000, "Year 2" : 2013 }, 
     { "Fruit" : "Apple", "Value 1" : 400000, "Year 1" : 2012, "Value 2" : 300000, "Year 2" : 2013 }, 
     { "Fruit" : "Banana", "Value 1" : 120000, "Year 1" : 2012, "Value 2" : 140000, "Year 2" : 2013 } 
]; 

chart = new dimple.chart(svg, data); 
x = chart.addCategoryAxis("x", "Fruit"); 
y1 = chart.addMeasureAxis("y", "Value 1"); 
y2 = chart.addMeasureAxis("y", "Value 2"); 
s1 = chart.addSeries("Year 1", dimple.plot.line, [x, y1]); 
s2 = chart.addSeries("Year 2", dimple.plot.line, [x, y2]); 
chart.draw(); 

http://jsfiddle.net/NVV9r/1/

+0

아를 많이 1.1.3으로 돌아가는 문제 - 매우 도움이됩니다. 감사합니다. – user3506975