var chart1; var chart2; var options1; var options2; Highcharts.setOptions({ global : { useUTC : false } }); String.prototype.endWith=function(oString){ var reg=new RegExp(oString+"$"); return reg.test(this); } $(document).ready(function(){ options1 = { chart: { renderTo : 'container1', height:120,width:320, polar: true, type: 'area' }, title: { text: '', x: 0 }, pane: { size: '80%' }, legend : { layout : 'vertical', align : 'left', verticalAlign : 'left', borderWidth : 0 }, xAxis: { categories: ['北', '北北东', '北东', '东北东','东', '东南东', '南东', '南南东', '南','南南西', '南西', '西南西', '西', '西北西', '北西','北北西' ], tickmarkPlacement: 'on', lineWidth: 0 }, yAxis: { gridLineInterpolation: 'polygon', lineWidth: 0, min: 0 }, tooltip: { shared: true, pointFormat: ' {point.y:,.0f}
' }, series: [{ name: 'name1', data: [], pointPlacement: 'on' }] } options2 = { chart : { renderTo : 'container2', type : 'line' }, title : { text : '功率曲线' }, xAxis : { categories : [], labels : { rotation : -45, align : 'right', style : { fontSize : '13px', fontFamily : 'Verdana, sans-serif' } } }, yAxis : { title : { text : '功率(MW)' } }, tooltip : { headerFormat : '{series.name}
', pointFormat : ' {point.y}MW' }, plotOptions : { spline : { marker : { enable : false } } }, series : [ { name : '实际拟合功率', data : [] }, { name : '最优拟合功率', data : [] }, { name : '保证功率', data : [] } ] } chart1 = new Highcharts.Chart(options1); chart2 = new Highcharts.Chart(options2); //windtowerAjax(); //window.setInterval(windtowerAjax, 60000); });