Re: [問題] 關於jQuery Gchart圖表
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章