日期:2014-05-16  浏览次数:20504 次

jsf页面调用jquery来实现断面图的代码

?<script type="text/javascript">

var chart,dmdateZZ,jjsw,zgsw,dmLineName,jjMax,zgMax,stnm;

dmLineName = '#{heDaoBean.lineDmZZ}';//时间

dmdateZZ = #{heDaoBean.dmZZ};//断面图数据

jjsw = #{heDaoBean.wrz};//警戒水位线Y值

jjMax= #{heDaoBean.lenghtXZZ};//警戒水位线x值

zgsw = #{heDaoBean.obhtzMax};//最高水位线y值

zgMax= #{heDaoBean.lenghtXZZ};//最高水位线x值

stnm = '#{heDaoBean.stnm}';//河道水位站站名

$j(function($) {

chart = new Highcharts.Chart({

chart: {

renderTo: 'duanmian'//此处与下面的div的id值对应

},

colors: [

'#333333',

'#FF6633',

'#FF0000'

? ],

title: {

text: '河流横断面验测成果'

},

xAxis: {

reversed : false,

labels: {

formatter: function() {

return this.value +'m';

},

style: {

color: '#89A54E'

}

},

title: {

text: '起点距'

}

},

yAxis: {

labels: {

formatter: function() {

return this.value +'m';

},

style: {

color: '#89A54E'

}

},

title: {

text: '河底高程'

}

},

plotOptions: {

line: {

lineWidth: 6,

states: {

hover: {

lineWidth: 5

}

},

marker: {

<