e99d0105614758f6660b120ca49172b915cc1917.svn-base 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. //예측 차트 옵션 2020.05.**************** kgpark
  2. $(function () {
  3. BWA.ChartOptions = BWA.ChartOptions || {};
  4. var C = BWA.ChartOptions.PlanConsumeRegressionDevelopment = BWA.ChartOptions.PlanConsumeRegressionDevelopment || {};
  5. var series = [{
  6. type: 'spline',
  7. pane: 'topPane',
  8. //axis: 'DayAhead',
  9. valueField: 'DayAheadValue',
  10. visible: true, // 시리즈만 안보이게 할수 있다. 대신 그렇게 할려면 시작은 false로 해야 한다 hcLee 2015 04 25
  11. point: { size: 8 },
  12. color: '#ff3399',
  13. name: '하루 전 예측',
  14. label: {
  15. visible: false,
  16. customizeText: function () {
  17. return this.valueText + ' kWh';
  18. }
  19. }
  20. }, {
  21. type: 'spline',
  22. pane: 'topPane',
  23. //axis: 'HourAhead',
  24. valueField: 'HourAheadValue',
  25. visible: true,
  26. color: '#000080',
  27. point: { size: 8 },
  28. name: '한시간 전 예측',
  29. label: {
  30. visible: false,
  31. customizeText: function () {
  32. return this.valueText + ' kWh';
  33. }
  34. }
  35. }];
  36. var ObservedSeries = [{
  37. type: 'bar',
  38. pane: 'topPane',
  39. valueField: 'ObservedValue',
  40. name: '실 데이터',
  41. label: {
  42. horizontalAlignment: 'left',
  43. visible: false,
  44. customizeText: function () {
  45. return this.valueText + 'kWh';
  46. }
  47. }
  48. }];
  49. C.getSeriesOptions = function () {
  50. return {
  51. palette: 'Harmony Light',
  52. valueAxis: {
  53. pane: 'topPane',
  54. title: {
  55. text: $G('electricityConsumptionUsageWithUnit')
  56. },
  57. grid: {
  58. visible: true,
  59. },
  60. showZero: true,
  61. },
  62. series: [ObservedSeries[0]].concat(series),
  63. argumentAxis: BWA.Chart.getTimeLineArgumentAxis(moment(), $Code.TimeType.QUARTERMIN),
  64. };
  65. };
  66. C.getChartOptions = function () {
  67. return {
  68. legend: {
  69. visible: true,
  70. verticalAlignment: 'top',
  71. horizontalAlignment: 'center',
  72. },
  73. argumentAxis: BWA.Chart.getTimeLineArgumentAxis(moment(), $Code.TimeType.QUARTERMIN),
  74. commonSeriesSettings: {
  75. argumentField: "DateTime",
  76. selectionStyle: {
  77. hatching: {
  78. direction: "right"
  79. }
  80. }
  81. },
  82. panes: [{
  83. name: 'topPane',
  84. border: {
  85. visible: false,
  86. left: false,
  87. right: false,
  88. top: false,
  89. color: 'gray'
  90. }
  91. }, ],
  92. defaultPane: "topPane",
  93. customizePoint: function () {
  94. },
  95. tooltip: {
  96. enabled: true,
  97. format: 'fixedPoint',
  98. precision: 2,
  99. shared: true,
  100. argumentFormat: 'shortDate',
  101. customizeTooltip: function (point) {
  102. return {
  103. text: "[" + point.argument.format("yy-MM-dd HH:mm") + "]" + "<br/>" + "<br/>" + point.valueText
  104. };
  105. }
  106. },
  107. crosshair: {
  108. enabled: true,
  109. width: 2,
  110. horizontalLine: {
  111. dashStyle: 'dash',
  112. visible: false
  113. },
  114. verticalLine: {
  115. dashStyle: 'dash',
  116. color: 'gray'
  117. },
  118. label: {
  119. visible: false,
  120. backgroundColor: "#949494",
  121. font: {
  122. color: "#fff",
  123. size: 12,
  124. }
  125. }
  126. }
  127. };
  128. };
  129. });