goodnessdetail.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. var chart1;
  2. var chart2;
  3. var options1;
  4. var options2;
  5. Highcharts.setOptions({
  6. global : {
  7. useUTC : false
  8. }
  9. });
  10. String.prototype.endWith=function(oString){
  11. var reg=new RegExp(oString+"$");
  12. return reg.test(this);
  13. }
  14. $(document).ready(function(){
  15. options1 = {
  16. chart: {
  17. renderTo : 'container1',
  18. height:120,width:320,
  19. polar: true,
  20. type: 'area'
  21. },
  22. title: {
  23. text: '',
  24. x: 0
  25. },
  26. pane: {
  27. size: '80%'
  28. },
  29. legend : {
  30. layout : 'vertical',
  31. align : 'left',
  32. verticalAlign : 'left',
  33. borderWidth : 0
  34. },
  35. xAxis: {
  36. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  37. '南东', '南南东', '南','南南西', '南西',
  38. '西南西', '西', '西北西', '北西','北北西'
  39. ],
  40. tickmarkPlacement: 'on',
  41. lineWidth: 0
  42. },
  43. yAxis: {
  44. gridLineInterpolation: 'polygon',
  45. lineWidth: 0,
  46. min: 0
  47. },
  48. tooltip: {
  49. shared: true,
  50. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  51. },
  52. series: [{
  53. name: 'name1',
  54. data: [],
  55. pointPlacement: 'on'
  56. }]
  57. }
  58. options2 = {
  59. chart : {
  60. renderTo : 'container2',
  61. type : 'line'
  62. },
  63. title : {
  64. text : '功率曲线'
  65. },
  66. xAxis : {
  67. categories : [],
  68. labels : {
  69. rotation : -45,
  70. align : 'right',
  71. style : {
  72. fontSize : '13px',
  73. fontFamily : 'Verdana, sans-serif'
  74. }
  75. }
  76. },
  77. yAxis : {
  78. title : {
  79. text : '功率(MW)'
  80. }
  81. },
  82. tooltip : {
  83. headerFormat : '<b>{series.name}</b><br/>',
  84. pointFormat : ' {point.y}MW'
  85. },
  86. plotOptions : {
  87. spline : {
  88. marker : {
  89. enable : false
  90. }
  91. }
  92. },
  93. series : [ {
  94. name : '实际拟合功率',
  95. data : []
  96. }, {
  97. name : '最优拟合功率',
  98. data : []
  99. }, {
  100. name : '保证功率',
  101. data : []
  102. } ]
  103. }
  104. chart1 = new Highcharts.Chart(options1);
  105. chart2 = new Highcharts.Chart(options2);
  106. //windtowerAjax();
  107. //window.setInterval(windtowerAjax, 60000);
  108. });