c7fff3632d31cec54be7774f54da8f312225f841.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. $(function() {
  2. BWA.ChartOptions = BWA.ChartOptions || {};
  3. BWA.ChartOptions.WaterCoolingAnalysis = BWA.ChartOptions.WaterCoolingAnalysis || {};
  4. var valueAxises = [{
  5. name: 'in_temp',
  6. position: 'right',
  7. //valueMarginsEnabled: true,
  8. //minValueMargin: 0,
  9. //maxValueMargin: 0,
  10. label: {
  11. font: { color: '#c96374' },
  12. visible: true,
  13. //format: 'largeNumber'
  14. },
  15. title: {
  16. text: '코일 입/출구 온도'
  17. }
  18. }
  19. /*, {
  20. name: 'out_temp',
  21. //min: 0,
  22. //max: 100,
  23. position: 'right',
  24. grid: {
  25. visible: true
  26. },
  27. label: {
  28. font: { color: '#00A7C6' },
  29. visible: true,
  30. //format: 'largeNumber'
  31. },
  32. title: {
  33. text: '온수코일 출구온도'
  34. }
  35. }*/]; // 4개의 온도값은 하나온도의 축으로 통일 2015 06 15
  36. var seriesSHot = [{
  37. type: 'spline',
  38. color: '#c96374',
  39. axis: 'in_temp',
  40. valueField: 'in_temp',
  41. point: { size: 2 },
  42. name: '온수코일 입구온도',
  43. label: {
  44. visible: false,
  45. font: { color: '#c96374', },
  46. customizeText: function () {
  47. return this.valueText + ' °C';
  48. }
  49. }
  50. }, {
  51. type: 'spline',
  52. axis: 'in_temp',
  53. color: '#00A7C6',
  54. valueField: 'out_temp',
  55. point: { size: 2 },
  56. name: '온수코일 출구온도',
  57. label: {
  58. font: { color: '#00A7C6', },
  59. visible: false,
  60. customizeText: function () {
  61. return this.valueText + ' °C';
  62. }
  63. }
  64. }];
  65. var seriesSCold = [{
  66. type: 'spline',
  67. color: '#c963FF',
  68. axis: 'in_temp',
  69. valueField: 'cold_in_temp',
  70. point: { size: 2 },
  71. name: '냉수코일 입구온도',
  72. label: {
  73. visible: false,
  74. font: { color: '#c963FF', },
  75. customizeText: function () {
  76. return this.valueText + ' °C';
  77. }
  78. }
  79. }, {
  80. type: 'spline',
  81. axis: 'in_temp',
  82. color: '#00A7FF',
  83. valueField: 'cold_out_temp',
  84. point: { size: 2 },
  85. name: '냉수코일 출구온도',
  86. label: {
  87. font: { color: '#00A7FF', },
  88. visible: false,
  89. customizeText: function () {
  90. return this.valueText + ' °C';
  91. }
  92. }
  93. }];
  94. BWA.ChartOptions.WaterCoolingAnalysis.getChartCalorieCOptions = function(codeTimeType) {
  95. return {
  96. palette: "Bright",
  97. legend: {
  98. visible: true,
  99. verticalAlignment: 'top',
  100. horizontalAlignment: 'center'
  101. },
  102. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  103. // ㅎㅎ 이게 있어야 멀티드로잉이 된다. 2015 04 21
  104. commonSeriesSettings: {
  105. argumentField: "DateTime",
  106. selectionStyle: {
  107. hatching: {
  108. direction: "left"
  109. }
  110. }
  111. },
  112. valueAxis: [{
  113. name: 'water',
  114. position: 'left',
  115. title: {
  116. text: $G('WaterUnit')
  117. }
  118. }].concat(valueAxises),
  119. series: [{
  120. axis: 'water',
  121. type: 'bar',
  122. name: '냉수유량',
  123. argumentField: "DateTime",
  124. valueField: 'CV', //
  125. label: {
  126. visible: false,
  127. },
  128. point: { size: 8 }
  129. }].concat(seriesSCold),
  130. tooltip: {
  131. enabled: true,
  132. },
  133. crosshair: {
  134. enabled: true,
  135. width: 2,
  136. horizontalLine: {
  137. color: 'red',
  138. dashStyle: 'dash',
  139. visible: false
  140. },
  141. verticalLine: {
  142. color: 'black',
  143. dashStyle: 'dash',
  144. visible: true
  145. },
  146. label: {
  147. visible: true,
  148. backgroundColor: "#949494",
  149. font: {
  150. color: "#fff",
  151. size: 12,
  152. }
  153. }
  154. }
  155. };
  156. };
  157. BWA.ChartOptions.WaterCoolingAnalysis.getChartCalorieHOptions = function (codeTimeType) {
  158. return {
  159. palette: "Harmony Light",
  160. legend: {
  161. visible: true,
  162. verticalAlignment: 'top',
  163. horizontalAlignment: 'center'
  164. },
  165. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  166. // ㅎㅎ 이게 있어야 멀티드로잉이 된다. 2015 04 21
  167. commonSeriesSettings: {
  168. argumentField: "DateTime",
  169. selectionStyle: {
  170. hatching: {
  171. direction: "left"
  172. }
  173. }
  174. },
  175. valueAxis: [{
  176. name: 'water',
  177. position: 'left',
  178. title: {
  179. text: $G('WaterUnit')
  180. }
  181. }].concat(valueAxises),
  182. series: [{
  183. axis: 'water',
  184. type: 'bar',
  185. name: '온수유량',
  186. argumentField: "DateTime",
  187. valueField: 'HV', // 냉수
  188. label: {
  189. visible: false,
  190. },
  191. point: { size: 8 }
  192. }, ].concat(seriesSHot),
  193. tooltip: {
  194. enabled: true,
  195. },
  196. crosshair: {
  197. enabled: true,
  198. width: 2,
  199. horizontalLine: {
  200. color: 'red',
  201. dashStyle: 'dash',
  202. visible: false
  203. },
  204. verticalLine: {
  205. color: 'black',
  206. dashStyle: 'dash',
  207. visible: true
  208. },
  209. label: {
  210. visible: true,
  211. backgroundColor: "#949494",
  212. font: {
  213. color: "#fff",
  214. size: 12,
  215. }
  216. }
  217. }
  218. };
  219. };
  220. var valueAxise_1 = {
  221. name: 'AFw',
  222. position: 'right',
  223. label: {
  224. visible: true,
  225. },
  226. title: {
  227. text: '냉방 ATF'
  228. }
  229. }
  230. var series_1 = {
  231. type: 'spline',
  232. color: '#c96374',
  233. axis: 'AFw',
  234. valueField: 'afw',
  235. point: { size: 4 },
  236. name: '냉방 ATF',
  237. label: {
  238. visible: false,
  239. //font: { color: '#c96374', },
  240. customizeText: function () {
  241. return '냉방 ATF';
  242. }
  243. }
  244. }
  245. BWA.ChartOptions.WaterCoolingAnalysis.getChart_1_Options = function (codeTimeType) {
  246. return {
  247. palette: "Bright",
  248. legend: {
  249. visible: true,
  250. verticalAlignment: 'top',
  251. horizontalAlignment: 'center'
  252. },
  253. commonSeriesSettings: {
  254. argumentField: "DateTime",
  255. selectionStyle: {
  256. hatching: {
  257. direction: "left"
  258. }
  259. }
  260. },
  261. valueAxis: [{
  262. title: {
  263. text: '냉수열량 (kcal)'
  264. }
  265. }].concat(valueAxise_1),
  266. series: [{
  267. type: 'bar',
  268. valueField: 'kcal',
  269. argumentField: 'DateTime',
  270. name: '냉수열량',
  271. label: {
  272. visible: false,
  273. //customizeText: function() {
  274. // return this.argumentField + this.valueText;
  275. //}
  276. },
  277. point: { size: 8 }
  278. }].concat(series_1),
  279. tooltip: {
  280. enabled: true,
  281. format: 'fixedPoint',
  282. precision: 2,
  283. },
  284. crosshair: {
  285. enabled: true,
  286. width: 2,
  287. horizontalLine: {
  288. color: 'red',
  289. dashStyle: 'dash',
  290. visible: false
  291. },
  292. verticalLine: {
  293. color: 'black',
  294. dashStyle: 'dash',
  295. visible: true
  296. },
  297. label: {
  298. visible: true,
  299. backgroundColor: "#949494",
  300. font: {
  301. color: "#fff",
  302. size: 12,
  303. }
  304. }
  305. }
  306. };
  307. };
  308. var valueAxise_2 = {
  309. name: 'AFw',
  310. position: 'right',
  311. label: {
  312. visible: true,
  313. },
  314. title: {
  315. text: '난방 ATF'
  316. }
  317. }
  318. var series_2 = {
  319. type: 'spline',
  320. color: '#c96374',
  321. axis: 'AFw',
  322. valueField: 'afw',
  323. point: { size: 4 },
  324. name: '난방 ATF',
  325. label: {
  326. visible: false,
  327. //font: { color: '#c96374', },
  328. customizeText: function () {
  329. return '난방 ATF';
  330. }
  331. }
  332. }
  333. BWA.ChartOptions.WaterCoolingAnalysis.getChart_2_Options = function (codeTimeType) {
  334. return {
  335. palette: "Default",
  336. legend: {
  337. visible: true,
  338. verticalAlignment: 'top',
  339. horizontalAlignment: 'center'
  340. },
  341. commonSeriesSettings: {
  342. argumentField: "DateTime",
  343. selectionStyle: {
  344. hatching: {
  345. direction: "left"
  346. }
  347. }
  348. },
  349. valueAxis: [{
  350. title: {
  351. text: '온수열량 (kcal)'
  352. }
  353. }].concat(valueAxise_2),
  354. series: [{
  355. type: 'bar',
  356. valueField: 'kcal',
  357. argumentField: 'DateTime',
  358. name: '온수열량',
  359. label: {
  360. visible: false,
  361. //customizeText: function() {
  362. // return this.argumentField + this.valueText;
  363. //}
  364. },
  365. point: { size: 8 }
  366. }].concat(series_2),
  367. tooltip: {
  368. enabled: true,
  369. },
  370. crosshair: {
  371. enabled: true,
  372. width: 2,
  373. horizontalLine: {
  374. color: 'red',
  375. dashStyle: 'dash',
  376. visible: false
  377. },
  378. verticalLine: {
  379. color: 'black',
  380. dashStyle: 'dash',
  381. visible: true
  382. },
  383. label: {
  384. visible: true,
  385. backgroundColor: "#949494",
  386. font: {
  387. color: "#fff",
  388. size: 12,
  389. }
  390. }
  391. }
  392. };
  393. };
  394. BWA.ChartOptions.WaterCoolingAnalysis.getChart_3_Options = function (codeTimeType) {
  395. return {
  396. palette: "Bright",
  397. legend: {
  398. visible: true,
  399. verticalAlignment: 'top',
  400. horizontalAlignment: 'center'
  401. },
  402. commonSeriesSettings: {
  403. argumentField: "DateTime",
  404. selectionStyle: {
  405. hatching: {
  406. direction: "left"
  407. }
  408. }
  409. },
  410. valueAxis: [
  411. {
  412. title: {
  413. text: '소비전력량 (kWh)'
  414. }
  415. },
  416. {
  417. name: 'hz',
  418. position: 'right',
  419. label: {
  420. visible: true,
  421. },
  422. title: {
  423. text: '주파수 (Hz)'
  424. }
  425. }
  426. ],
  427. series: [
  428. {
  429. type: 'bar',
  430. valueField: 'inkw',
  431. argumentField: 'DateTime',
  432. name: '급기팬 소비전력',
  433. label: {
  434. visible: false,
  435. //customizeText: function() {
  436. // return this.argumentField + this.valueText;
  437. //}
  438. },
  439. point: { size: 4 }
  440. },
  441. {
  442. type: 'bar',
  443. valueField: 'outkw',
  444. argumentField: 'DateTime',
  445. name: '환기팬 소비전력',
  446. label: {
  447. visible: false,
  448. //customizeText: function() {
  449. // return this.argumentField + this.valueText;
  450. //}
  451. },
  452. point: { size: 4 }
  453. },
  454. {
  455. type: 'spline',
  456. axis: 'hz',
  457. valueField: 'inhz',
  458. argumentField: 'DateTime',
  459. name: '급기팬 주파수',
  460. label: {
  461. visible: false,
  462. //customizeText: function() {
  463. // return this.argumentField + this.valueText;
  464. //}
  465. },
  466. point: { size: 4 }
  467. },
  468. {
  469. type: 'spline',
  470. axis: 'hz',
  471. valueField: 'outhz',
  472. argumentField: 'DateTime',
  473. name: '환기팬 주파수',
  474. label: {
  475. visible: false,
  476. //customizeText: function() {
  477. // return this.argumentField + this.valueText;
  478. //}
  479. },
  480. point: { size: 4 }
  481. },
  482. ],
  483. tooltip: {
  484. enabled: true,
  485. },
  486. crosshair: {
  487. enabled: true,
  488. width: 2,
  489. horizontalLine: {
  490. color: 'red',
  491. dashStyle: 'dash',
  492. visible: false
  493. },
  494. verticalLine: {
  495. color: 'black',
  496. dashStyle: 'dash',
  497. visible: true
  498. },
  499. label: {
  500. visible: true,
  501. backgroundColor: "#949494",
  502. font: {
  503. color: "#fff",
  504. size: 12,
  505. }
  506. }
  507. }
  508. };
  509. };
  510. });