2014-10-09 1 views
0

Google 웹 앱에서 차트를 추가하기 위해 4-5 솔루션을 평가할 것입니다.Google 차트가있는 버그 여러 vAxis textStyle 및 textPosition

HighCharts도 좋지만 Google Charts에서는 Google Charts를 사용하여 어떤 vAxis가 표시되는지 (스타일과 함께 표시되는지) 어떤 표시가 아닌지를 설정할 수 없습니다.

var options = { 
     title: '', 
     backgroundColor:'#555', 
     chartArea: { 
      backgroundColor: '#555', 
      alignment: 'center', 
      } 
     }, 
     legend:{position:'top'}, 
     vAxis: { 
      0: { title: "", logScale: true, maxValue: 1150, minValue: 600, textStyle: {color:'black'} }, 
      1: { title: "", logScale: true, textPosition: 'none', maxValue: 32, minValue: 30 }, 
      2: { title: "", logScale: true, textPosition: 'none', maxValue: 2000, minValue: 1000 }, 
      3: { title: "", logScale: true, textPosition: 'none', maxValue: 5 }, 
      4: { title: "", logScale: true, textPosition: 'none', maxValue: 5 }, 
      5: { title: "", logScale: true, textPosition: 'none', maxValue: 5200, minValue: 4200 }, 
      6: { title: "", logScale: true, textPosition: 'none', maxValue: 14, minValue: 13 }, 
      7: { title: "", logScale: true, textPosition: 'none', maxValue: 17000, minvalue: 12000 } 
      , textStyle: { color: 'orange' } 
     }, 
     hAxis: { title: "", textColor: "#fff" }, 

문자 유형 : {색상 : '오렌지'} 모든 백 시즈에가 잘 작동

여기 내 옵션 코드입니다. 만약 내가 textPosition : "none"을 쓰면 Idem. 그러나 각 vAxis에 대해 textStyle 및 textPosition이 작동하지 않습니다. 여기서 textStyle : {color : 'black'}은 효과가 없습니다 (textStyle : {color : 'orange'}를 삭제하더라도).

누구나 그 문제에 직면 했습니까? 내가 그걸 어떻게 바로 잡을 수 있니?

감사합니다.

+0

여기에 코드가 있습니까? 당신은 단지 전설 – juvian

답변

1

솔루션은 매우 간단합니다. 복수 vAxes에 사용해야하는 vAxes 대신 vAxis을 사용하고 있습니다. 올바른 사용법은 다음과 같습니다.

vAxes: { 
     0: { title: "", logScale: true, maxValue: 1150, minValue: 600, textStyle: {color:'black'} }, 
     1: { title: "", logScale: true, textPosition: 'none', maxValue: 32, minValue: 30 }, 
     2: { title: "", logScale: true, textPosition: 'none', maxValue: 2000, minValue: 1000 }, 
     3: { title: "", logScale: true, textPosition: 'none', maxValue: 5 }, 
     4: { title: "", logScale: true, textPosition: 'none', maxValue: 5 }, 
     5: { title: "", logScale: true, textPosition: 'none', maxValue: 5200, minValue: 4200 }, 
     6: { title: "", logScale: true, textPosition: 'none', maxValue: 14, minValue: 13 }, 
     7: { title: "", logScale: true, textPosition: 'none', maxValue: 17000, minvalue: 12000 } 
     , textStyle: { color: 'orange' } 
    }, 
+0

감사합니다 :) 나는 xxxxx입니다! – Netah

+0

글쎄, 그 두 가지 옵션을 실수 꽤 쉽습니다. proyect와 행운을 비네;) – juvian

관련 문제