稍微修改库http://g.raphaeljs.com/linechart.html
允许最大值是一个设置:
var element = this,
o = this.customAttributes.lineChart,
settings = this.lineChart.settings,
gutter = settings.gutter,
width = settings.width,
height = settings.height,
/*AeTky added: 2012.06.16*/
fixMax = settings.fixMax,
/**/
table = helpers.loadTableData(settings.data_holder), //TODO allow passing data by array
size = table.labels.length,
X = (width - gutter.left) / size,
/*AeTky added: 2012.06.16*/
max = fixMax == -1 ? Math.max.apply(Math, table.data) : fixMax,
/**/
Y = (height - gutter.bottom - gutter.top) / max,
blanket = element.set(),
p,
bgpp,
x,
y;