d9b357fcd28df556b82e717d79ebbeadcb8f96cf.svn-base 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. $(function() {
  2. BWA.ChartOptions = BWA.ChartOptions || {};
  3. BWA.ChartOptions.ElecAnalysis = BWA.ChartOptions.ElecAnalysis || {};
  4. BWA.ChartOptions.ElecAnalysis.getChartElec1Options = function (codeTimeType) {
  5. return {
  6. palette: "Bright",
  7. legend: {
  8. visible: true,
  9. verticalAlignment: 'top',
  10. horizontalAlignment: 'center'
  11. },
  12. argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  13. commonSeriesSettings: {
  14. argumentField: "DateTime",
  15. selectionStyle: {
  16. hatching: {
  17. direction: "left"
  18. }
  19. }
  20. },
  21. valueAxis: [
  22. {
  23. name: 'current', //
  24. label: {
  25. visible: true,
  26. },
  27. title: {
  28. text: '현재전력 (KW)'
  29. }
  30. },
  31. {
  32. name: 'contract', //
  33. position: 'right',
  34. label: {
  35. //font: { color: '#c96374' },
  36. visible: true,
  37. },
  38. title: {
  39. text: '계약전력 (KW)'
  40. }
  41. },
  42. {
  43. name: 'target', //
  44. position: 'right',
  45. label: {
  46. visible: true,
  47. },
  48. title: {
  49. text: '목표전력 (KW)'
  50. }
  51. }
  52. ],
  53. series: [{
  54. axis: 'current',
  55. name: '현재전력',
  56. type: 'bar',
  57. argumentField: "DateTime",
  58. valueField: 'current', //
  59. label: {
  60. visible: false,
  61. },
  62. point: { size: 8 }
  63. }, {
  64. axis: 'contract',
  65. type: 'line',
  66. name: '계약전력',
  67. argumentField: "DateTime",
  68. valueField: 'contract', //
  69. label: {
  70. visible: false,
  71. },
  72. point: { size: 4 },
  73. },
  74. {
  75. axis: 'target',
  76. name: '목표전력',
  77. type: 'line',
  78. valueField: 'target',
  79. point: { size: 4, symbol: 'triangle' },
  80. label: {
  81. visible: false,
  82. }
  83. }],
  84. tooltip: {
  85. enabled: true,
  86. },
  87. };
  88. };
  89. BWA.ChartOptions.ElecAnalysis.getChartElec2Options = function (codeTimeType) {
  90. return {
  91. palette: "Bright",
  92. legend: {
  93. visible: true,
  94. verticalAlignment: 'top',
  95. horizontalAlignment: 'center'
  96. },
  97. argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  98. commonSeriesSettings: {
  99. argumentField: "DateTime",
  100. selectionStyle: {
  101. hatching: {
  102. direction: "left"
  103. }
  104. }
  105. },
  106. valueAxis: [
  107. {
  108. name: 'week_avg', //
  109. label: {
  110. visible: true,
  111. },
  112. title: {
  113. text: '요일평균 (KW)'
  114. }
  115. },
  116. {
  117. name: 'contract', //
  118. position: 'right',
  119. label: {
  120. //font: { color: '#c96374' },
  121. visible: true,
  122. },
  123. title: {
  124. text: '계약전력 (KW)'
  125. }
  126. },
  127. {
  128. name: 'target', //
  129. position: 'right',
  130. label: {
  131. visible: true,
  132. },
  133. title: {
  134. text: '목표전력 (KW)'
  135. }
  136. }
  137. ],
  138. series: [{
  139. axis: 'week_avg',
  140. name: '요일평균',
  141. type: 'bar',
  142. argumentField: "DateTime",
  143. valueField: 'current', //
  144. label: {
  145. visible: false,
  146. },
  147. point: { size: 8 }
  148. }, {
  149. axis: 'contract',
  150. type: 'line',
  151. name: '계약전력',
  152. argumentField: "DateTime",
  153. valueField: 'contract', //
  154. label: {
  155. visible: false,
  156. },
  157. point: { size: 4 },
  158. },
  159. {
  160. axis: 'target',
  161. name: '목표전력',
  162. type: 'line',
  163. valueField: 'target',
  164. point: { size: 4, symbol: 'triangle' },
  165. label: {
  166. visible: false,
  167. }
  168. }],
  169. tooltip: {
  170. enabled: true,
  171. },
  172. };
  173. };
  174. BWA.ChartOptions.ElecAnalysis.getChartLoadOptions = function (codeTimeType) {
  175. return {
  176. palette: "Default",
  177. legend: {
  178. visible: true,
  179. verticalAlignment: 'top',
  180. horizontalAlignment: 'center'
  181. },
  182. argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  183. commonSeriesSettings: {
  184. argumentField: "DateTime",
  185. selectionStyle: {
  186. hatching: {
  187. direction: "left"
  188. }
  189. }
  190. },
  191. valueAxis: [{
  192. label: {
  193. visible: true,
  194. },
  195. title: {
  196. text: '부하율 (%)'
  197. }
  198. },
  199. {
  200. name: 'avg', //
  201. position: 'right',
  202. label: {
  203. //font: { color: '#c96374' },
  204. visible: true,
  205. },
  206. title: {
  207. text: '평균전력 (KW)'
  208. }
  209. },
  210. {
  211. name: 'day_max', //
  212. position: 'right',
  213. label: {
  214. //font: { color: '#c96374' },
  215. visible: true,
  216. },
  217. title: {
  218. text: '일별 최대전력 (KW)'
  219. }
  220. }
  221. ],
  222. series: [{
  223. name: '부하율',
  224. argumentField: "DateTime",
  225. valueField: 'load', //
  226. type: 'bar',
  227. label: {
  228. visible: false,
  229. },
  230. point: { size: 8 }
  231. }, {
  232. axis: 'avg',
  233. type: 'line',
  234. name: '평균전력',
  235. argumentField: "DateTime",
  236. valueField: 'avg', //
  237. label: {
  238. visible: false,
  239. },
  240. point: { size: 4 },
  241. },
  242. {
  243. axis: 'day_max',
  244. name: '일별최대전력',
  245. type: 'line',
  246. valueField: 'day_max',
  247. point: { size: 4, symbol: 'triangle' },
  248. label: {
  249. visible: false,
  250. }
  251. }],
  252. tooltip: {
  253. enabled: true,
  254. },
  255. };
  256. };
  257. });