作者No (you stay there)
看板Ajax
标题Re: [问题] 关於jQuery Gchart图表
时间Fri Sep 23 03:47:10 2011
※ 引述《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