123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- 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: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
- },
-
-
- 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 : '<b>{series.name}</b><br/>',
- 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);
- });
|