2014-12-08 4 views

답변

2

scale-y-n 개체에서 placement 속성을 사용해보세요. ,

var myChart = { 
 
"graphset":[ 
 
    { 
 
     "type":"line", 
 
     "title":{ 
 
      "text":"Axis Placement", 
 
      "adjust-layout":true 
 
     }, 
 
     "plotarea":{ 
 
      "margins":"dynamic", 
 
      "adjust-layout":true 
 
     }, 
 
     "scale-x":{ 
 
      "label":{ 
 
       "text":"Scale X 1" 
 
      } 
 
     }, 
 
     "scale-y":{ 
 
      "values":"0:100:10", 
 
      "label":{ 
 
       "text":"Scale Y 1" 
 
      } 
 
     }, 
 
     "scale-y-2":{ 
 
      "values":"0:1000:100", 
 
      "placement":"default", 
 
      "label":{ 
 
       "text":"Scale Y 2" 
 
      } 
 
     }, 
 
     "scale-y-3":{ 
 
      "values":"0:2000:200", 
 
      "placement":"opposite", 
 
      "label":{ 
 
       "text":"Scale Y 3" 
 
      } 
 
     }, 
 
     "plot":{ 
 
      
 
     }, 
 
     "series":[ 
 
      { 
 
       "values":[69,68,54,48,70,74,98,70,72,68,49,69], 
 
       "scales":"scale-x,scale-y" 
 
      }, 
 
      { 
 
       "values":[510,530,470,600,480,520,750,520,550,470,600,480], 
 
       "scales":"scale-x,scale-y-2" 
 
      }, 
 
      { 
 
       "values":[1542,1243,1630,1440,1031,1148,1055,1246,1048,1032,1038,1038], 
 
       "scales":"scale-x,scale-y-3" 
 
      } 
 
     ] 
 
    } 
 
] 
 
}; 
 

 
zingchart.render({ 
 
    id: "myChart", 
 
    height: "300px", 
 
    width: "100%", 
 
    data: myChart 
 
});
<script src="http://www.zingchart.com/playground/lib/zingchart/zingchart-html5-min.js"></script> 
 
<div id="myChart"></div>

이 대신 라인을 이동 축 항목을 이동하는 더 간단한 방법입니다 : 다음 예에서 기본 : 우리는 추가 확장 Y 배치를 사용하여 왼쪽을 추가 할 수 있었다 틱, 레이블 등을 개별적으로 표시합니다. "기본값"은이 값의 까다로운 이름이지만 Y 축의 경우 "기본값"은 "차트의 왼쪽으로"를 의미합니다. X 축의 경우 배치 특성을 사용하면 기본값은 맨 아래를 의미합니다.

저는 ZingChart 팀에 있습니다. 따라서이 데모에 대한 질문이나 궁금한 점이 있으시면 언제든지 연락 주시기 바랍니다.

+1

이것은 효과가 있습니다. 고맙습니다. 간단한 해결책을 가져 주셔서 감사합니다 :) – BANDROID