Re: [問題] 關於jQuery Gchart圖表

看板Ajax作者 (you stay there)時間14年前 (2011/09/23 03:47), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《TainakaRitsu (田井中 律)》之銘言: : http://keith-wood.name/gChart.html : Chart Types裡的Vertica grouped bar(barVertGrouped) : 預設的數值是0-100,但是超過100就呈現滿格狀態 : 變成數值輸入950跟輸入101的圖長相都一樣 : 程式碼如下 : $('#typedChart').gchart({type: 'barVertGrouped',format: 'png', : dataLabels: ['2002', '2004', '2005', '2006'], legend: 'right', : series: [$.gchart.series('IE', [950, 91, 88, 86], 'red'), : $.gchart.series('Netscape', [300, 200, 100, 0], 'green'), : $.gchart.series('Firefox', [0, 4, 8, 9], 'blue') : ], ^這裡不用逗號了 : }); $.gchart.series function 就有定義參數 $.gchart.series(label, data, colour, fillColour, minValue, maxValue, thickness, segments) ----- $('#typedChart').gchart({ type: 'barVertGrouped', format: 'png', dataLabels: ['2002', '2004', '2005', '2006'], legend: 'right', series: [ $.gchart.series('IE', [950, 91, 88, 86], 'red', null , 0, 1000), $.gchart.series('Netscape', [300, 200, 100, 0], 'green', null, 0, 1000), $.gchart.series('Firefox', [0, 4, 8, 500], 'blue', null, 0, 1000) ] }); ----- 若沒minValue, maxValue參數可用 把你帶的數字換算一下比例也可以有同樣效果 : 已google了很多文件還是找不到可以調整比例的解法 : 想請教有沒有相關的文件或是方法可以參考 感謝 這裡 http://keith-wood.name/gChartRef.html#seriesf -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.252.78.65
文章代碼(AID): #1EUv31j6 (Ajax)
討論串 (同標題文章)
文章代碼(AID): #1EUv31j6 (Ajax)