0f4b6c9ecf326a11744b577429470bcc50c63974.svn-base 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891
  1. $(function() {
  2. BWA.ChartOptions = BWA.ChartOptions || {};
  3. BWA.ChartOptions.HeatExchangerAnalysis = BWA.ChartOptions.HeatExchangerAnalysis || {};
  4. BWA.ChartOptions.HeatExchangerAnalysis.getChartEffiOptions = 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: 'elec', //
  24. position: 'left',
  25. label: {
  26. visible: true,
  27. },
  28. title: {
  29. text: '순환펌프 소비전력량 (kwh)'
  30. }
  31. },
  32. {
  33. name: 'effi', //
  34. position: 'right',
  35. label: {
  36. visible: true,
  37. },
  38. title: {
  39. text: '열교환기 효율'
  40. }
  41. },
  42. {
  43. name: 'r_effi', //
  44. position: 'right',
  45. label: {
  46. visible: true,
  47. },
  48. title: {
  49. text: '반송 효율'
  50. }
  51. }
  52. ],
  53. series: [{
  54. axis: 'elec',
  55. name:'순환펌프 소비전력량',
  56. argumentField: "DateTime",
  57. valueField: 'elec', //
  58. label: {
  59. visible: false,
  60. },
  61. point: { size: 1 }
  62. }, {
  63. axis: 'effi',
  64. type: 'scatter',
  65. name: '열교환기 효율',
  66. argumentField: "DateTime",
  67. valueField: 'effi', //
  68. label: {
  69. visible: false,
  70. },
  71. point: { size: 8 },
  72. },
  73. {
  74. axis: 'r_effi',
  75. name: '반송 효율',
  76. type: 'scatter',
  77. valueField: 'r_effi',
  78. point: { size: 8, symbol: 'triangle' },
  79. //name: '외기 온도',
  80. label: {
  81. //font: { color: '#c96374', },
  82. visible: false,
  83. }
  84. }],
  85. tooltip: {
  86. enabled: true,
  87. },
  88. crosshair: {
  89. enabled: true,
  90. width: 2,
  91. horizontalLine: {
  92. color: 'black',
  93. dashStyle: 'dash',
  94. visible: false
  95. },
  96. verticalLine: {
  97. color: 'black',
  98. dashStyle: 'dash',
  99. visible: true
  100. },
  101. label: {
  102. visible: true,
  103. backgroundColor: "#949494",
  104. font: {
  105. color: "#fff",
  106. size: 12,
  107. }
  108. }
  109. }
  110. };
  111. };
  112. BWA.ChartOptions.HeatExchangerAnalysis.getChartAVOptions = function (codeTimeType) {
  113. return {
  114. palette: "Default",
  115. legend: {
  116. visible: true,
  117. verticalAlignment: 'top',
  118. horizontalAlignment: 'center'
  119. },
  120. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  121. commonSeriesSettings: {
  122. argumentField: "DateTime",
  123. selectionStyle: {
  124. hatching: {
  125. direction: "left"
  126. }
  127. }
  128. },
  129. valueAxis: [
  130. {
  131. name: 's_water_temp', //
  132. position: 'right',
  133. label: {
  134. visible: true,
  135. },
  136. title: {
  137. text: '온수 급수 온도 (°C)'
  138. }
  139. },
  140. {
  141. name: 'r_water_temp', //
  142. position: 'right',
  143. label: {
  144. visible: true,
  145. },
  146. title: {
  147. text: '온수 환수 온도 (°C)'
  148. }
  149. },
  150. {
  151. name: 'elec', //
  152. position: 'left',
  153. label: {
  154. visible: true,
  155. },
  156. title: {
  157. text: '소비전력량 (kwh)'
  158. }
  159. }
  160. ],
  161. series: [ {
  162. axis: 's_water_temp',
  163. type: 'scatter',
  164. name: '온수 급수 온도',
  165. argumentField: "DateTime",
  166. valueField: 's_water_temp', //
  167. label: {
  168. visible: false,
  169. },
  170. point: { size: 8 },
  171. },
  172. {
  173. axis: 'r_water_temp',
  174. name: '온수 환수 온도',
  175. type: 'scatter',
  176. valueField: 'r_water_temp',
  177. point: { size: 8, symbol: 'triangle' },
  178. //name: '외기 온도',
  179. label: {
  180. //font: { color: '#c96374', },
  181. visible: false,
  182. }
  183. },
  184. {
  185. axis: 'elec',
  186. name: '소비전력량',
  187. argumentField: "DateTime",
  188. valueField: 'elec', //
  189. label: {
  190. visible: false,
  191. },
  192. point: { size: 1 }
  193. }
  194. ],
  195. tooltip: {
  196. enabled: true,
  197. },
  198. crosshair: {
  199. enabled: true,
  200. width: 2,
  201. horizontalLine: {
  202. color: 'black',
  203. dashStyle: 'dash',
  204. visible: false
  205. },
  206. verticalLine: {
  207. color: 'black',
  208. dashStyle: 'dash',
  209. visible: true
  210. },
  211. label: {
  212. visible: true,
  213. backgroundColor: "#949494",
  214. font: {
  215. color: "#fff",
  216. size: 12,
  217. }
  218. }
  219. }
  220. };
  221. };
  222. BWA.ChartOptions.HeatExchangerAnalysis.getChartPumpOptions = function (codeTimeType) {
  223. return {
  224. palette: "Harmony Light",
  225. legend: {
  226. visible: true,
  227. verticalAlignment: 'top',
  228. horizontalAlignment: 'center'
  229. },
  230. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  231. commonSeriesSettings: {
  232. argumentField: "DateTime",
  233. selectionStyle: {
  234. hatching: {
  235. direction: "left"
  236. }
  237. }
  238. },
  239. valueAxis: [
  240. {
  241. name: 'sw', //
  242. position: 'right',
  243. label: {
  244. visible: true,
  245. },
  246. title: {
  247. text: '유량 (m3/h)'
  248. }
  249. },
  250. {
  251. name: 'lift', //
  252. position: 'right',
  253. label: {
  254. visible: true,
  255. },
  256. title: {
  257. text: '양정 (m)'
  258. }
  259. },
  260. {
  261. name: 'elec', //
  262. position: 'left',
  263. label: {
  264. visible: true,
  265. },
  266. title: {
  267. text: '소비전력량 (kwh)'
  268. }
  269. }
  270. ],
  271. series: [{
  272. axis: 'sw',
  273. type: 'scatter',
  274. name: '유량',
  275. argumentField: "DateTime",
  276. valueField: 'sw', //
  277. label: {
  278. visible: false,
  279. },
  280. point: { size: 8 },
  281. },
  282. {
  283. axis: 'lift',
  284. name: '양정',
  285. type: 'scatter',
  286. valueField: 'lift',
  287. point: { size: 8, symbol: 'triangle' },
  288. //name: '외기 온도',
  289. label: {
  290. //font: { color: '#c96374', },
  291. visible: false,
  292. }
  293. },
  294. {
  295. axis: 'elec',
  296. name: '소비전력량',
  297. argumentField: "DateTime",
  298. valueField: 'elec', //
  299. label: {
  300. visible: false,
  301. },
  302. point: { size: 1 }
  303. }
  304. ],
  305. tooltip: {
  306. enabled: true,
  307. },
  308. crosshair: {
  309. enabled: true,
  310. width: 2,
  311. horizontalLine: {
  312. color: 'black',
  313. dashStyle: 'dash',
  314. visible: false
  315. },
  316. verticalLine: {
  317. color: 'black',
  318. dashStyle: 'dash',
  319. visible: true
  320. },
  321. label: {
  322. visible: true,
  323. backgroundColor: "#949494",
  324. font: {
  325. color: "#fff",
  326. size: 12,
  327. }
  328. }
  329. }
  330. };
  331. };
  332. BWA.ChartOptions.HeatExchangerAnalysis.getChartATFOptions = function (codeTimeType) {
  333. return {
  334. palette: "Ocean",
  335. legend: {
  336. visible: true,
  337. verticalAlignment: 'top',
  338. horizontalAlignment: 'center'
  339. },
  340. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  341. commonSeriesSettings: {
  342. argumentField: "DateTime",
  343. selectionStyle: {
  344. hatching: {
  345. direction: "left"
  346. }
  347. }
  348. },
  349. valueAxis: [{
  350. label: {
  351. visible: true,
  352. },
  353. title: {
  354. text: 'ATF'
  355. }
  356. },
  357. {
  358. name: 'temp', //
  359. position: 'right',
  360. type: 'continuous',
  361. valueType: 'numeric',
  362. tickInterval: 10,
  363. valueMarginsEnabled: true,
  364. minValueMargin: 0,
  365. maxValueMargin: 0,
  366. min: -10,
  367. max: 40,
  368. label: {
  369. visible: true,
  370. font: { color: '#c96374' },
  371. },
  372. title: {
  373. text: '외기 온도 (°C)'
  374. }
  375. }
  376. ],
  377. series: [{
  378. name: 'ATF',
  379. argumentField: "DateTime",
  380. valueField: 'atf', //
  381. label: {
  382. visible: false,
  383. },
  384. point: { size: 4 }
  385. }, {
  386. axis: 'temp',
  387. name: '외기 온도',
  388. argumentField: "DateTime",
  389. valueField: 'temp', //
  390. label: {
  391. visible: false,
  392. },
  393. point: { size: 4 },
  394. }
  395. ],
  396. tooltip: {
  397. enabled: true,
  398. },
  399. crosshair: {
  400. enabled: true,
  401. width: 2,
  402. horizontalLine: {
  403. color: 'black',
  404. dashStyle: 'dash',
  405. visible: false
  406. },
  407. verticalLine: {
  408. color: 'black',
  409. dashStyle: 'dash',
  410. visible: true
  411. },
  412. label: {
  413. visible: true,
  414. backgroundColor: "#949494",
  415. font: {
  416. color: "#fff",
  417. size: 12,
  418. }
  419. }
  420. }
  421. };
  422. };
  423. var valueAxises = [{
  424. pane: 'topPane',
  425. name: 'Temperature',
  426. position: 'right',
  427. //valueMarginsEnabled: true,
  428. //minValueMargin: 0,
  429. //maxValueMargin: 0,
  430. type: 'continuous',
  431. valueType: 'numeric',
  432. tickInterval: 10,
  433. valueMarginsEnabled: true,
  434. minValueMargin: 0,
  435. maxValueMargin: 0,
  436. min: -10,
  437. max: 40,
  438. label: {
  439. font: { color: '#c96374' },
  440. visible: true,
  441. //format: 'largeNumber'
  442. },
  443. title: {
  444. text: $G('outdoorTemperatureWithUnit')
  445. }
  446. }, {
  447. pane: 'topPane',
  448. name: 'humidity',
  449. tickInterval: 20,
  450. valueMarginsEnabled: true,
  451. minValueMargin: 0,
  452. maxValueMargin: 0,
  453. //argumentType: 'numeric',
  454. min: 0,
  455. max: 100,
  456. position: 'right',
  457. grid: {
  458. visible: true
  459. },
  460. label: {
  461. font: { color: '#00A7C6' },
  462. visible: true,
  463. //format: 'largeNumber'
  464. },
  465. title: {
  466. text: $G('outdoorHumidityWithUnit')
  467. }
  468. }];
  469. var seriesS = [{
  470. type: 'spline',
  471. color: '#c96374',
  472. pane: 'topPane',
  473. axis: 'Temperature',
  474. valueField: 'Temperature',
  475. point: { size: 2 },
  476. name: $G('outdoorTemperature'),
  477. label: {
  478. visible: false,
  479. font: { color: '#c96374', },
  480. customizeText: function () {
  481. return this.valueText + ' °C';
  482. }
  483. }
  484. }, {
  485. type: 'spline',
  486. pane: 'topPane',
  487. axis: 'humidity',
  488. color: '#00A7C6',
  489. valueField: 'Humidity',
  490. point: { size: 2 },
  491. name: $G('outdoorHumidity'),
  492. label: {
  493. font: { color: '#00A7C6', },
  494. visible: false,
  495. customizeText: function () {
  496. return this.valueText + ' %';
  497. }
  498. }
  499. }];
  500. BWA.ChartOptions.HeatExchangerAnalysis.getChart_1_Options = function (codeTimeType) {
  501. return {
  502. palette: 'Default',
  503. legend: {
  504. visible: true,
  505. verticalAlignment: 'top',
  506. horizontalAlignment: 'center'
  507. },
  508. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  509. // ㅎㅎ 이게 있어야 멀티드로잉이 된다. 2015 04 21
  510. commonSeriesSettings: {
  511. argumentField: "DateTime",
  512. selectionStyle: {
  513. hatching: {
  514. direction: "left"
  515. }
  516. }
  517. },
  518. valueAxis: [{
  519. pane: 'topPane',
  520. position: 'left',
  521. label: {
  522. visible: true,
  523. //format: 'largeNumber'
  524. },
  525. title: {
  526. text: '지열 시스템 COP'
  527. }
  528. }].concat(valueAxises),
  529. series: [{
  530. type: 'bar',
  531. argumentField: "DateTime",
  532. valueField: 'Value',
  533. //valueField: 'Temperature',
  534. name: '지열 시스템 COP',
  535. point: { size: 8 }
  536. }].concat(seriesS),
  537. panes: [{
  538. name: 'topPane',
  539. border: {
  540. visible: false,
  541. left: false,
  542. right: false,
  543. top: false,
  544. color: 'gray'
  545. }
  546. }, ],
  547. defaultPane: "topPane",
  548. tooltip: {
  549. enabled: true,
  550. },
  551. crosshair: {
  552. enabled: true,
  553. width: 2,
  554. horizontalLine: {
  555. color: 'black',
  556. dashStyle: 'dash',
  557. visible: false
  558. },
  559. verticalLine: {
  560. color: 'black',
  561. dashStyle: 'dash',
  562. visible: true
  563. },
  564. label: {
  565. visible: true,
  566. backgroundColor: "#949494",
  567. font: {
  568. color: "#fff",
  569. size: 12,
  570. }
  571. }
  572. }
  573. };
  574. };
  575. BWA.ChartOptions.HeatExchangerAnalysis.getChart_2_Options= function (codeTimeType) {
  576. return {
  577. palette: "Soft Pastel",
  578. legend: {
  579. visible: false
  580. },
  581. argumentAxis: {
  582. max: 100,
  583. min: 0,
  584. title: {
  585. text: $G('loadRateWithUnit')
  586. }
  587. },
  588. valueAxis: {
  589. title: {
  590. text: '지열시스템 COP'
  591. }
  592. },
  593. series: {
  594. type: 'scatter',
  595. valueField: 'cop', //
  596. argumentField: 'load', //
  597. label: {
  598. visible: false,
  599. //customizeText: function() {
  600. // return this.argumentField + this.valueText;
  601. //}
  602. },
  603. point: { size: 8 }
  604. },
  605. tooltip: {
  606. enabled: true,
  607. },
  608. crosshair: {
  609. enabled: true,
  610. width: 2,
  611. horizontalLine: {
  612. color: 'black',
  613. dashStyle: 'dash',
  614. visible: true
  615. },
  616. verticalLine: {
  617. color: 'black',
  618. dashStyle: 'dash',
  619. visible: true
  620. },
  621. label: {
  622. visible: true,
  623. backgroundColor: "#949494",
  624. font: {
  625. color: "#fff",
  626. size: 12,
  627. }
  628. }
  629. }
  630. };
  631. };
  632. BWA.ChartOptions.HeatExchangerAnalysis.getChart_3_Options = function (codeTimeType) {
  633. return {
  634. palette: 'Harmony Light',
  635. legend: {
  636. visible: true,
  637. verticalAlignment: 'top',
  638. horizontalAlignment: 'center'
  639. },
  640. commonSeriesSettings: {
  641. argumentField: "DateTime",
  642. selectionStyle: {
  643. hatching: {
  644. direction: "left"
  645. }
  646. }
  647. },
  648. valueAxis: {
  649. pane: 'topPane',
  650. position: 'left',
  651. label: {
  652. visible: true,
  653. //format: 'largeNumber'
  654. },
  655. title: {
  656. text: '부하율 (%)'
  657. }
  658. },
  659. series: {
  660. type: 'bar',
  661. argumentField: "DateTime",
  662. valueField: 'Value',
  663. //valueField: 'Temperature',
  664. name: '부하율',
  665. point: { size: 8 }
  666. },
  667. panes: [{
  668. name: 'topPane',
  669. border: {
  670. visible: false,
  671. left: false,
  672. right: false,
  673. top: false,
  674. color: 'gray'
  675. }
  676. }, ],
  677. defaultPane: "topPane",
  678. tooltip: {
  679. enabled: true,
  680. },
  681. crosshair: {
  682. enabled: true,
  683. width: 2,
  684. horizontalLine: {
  685. color: 'black',
  686. dashStyle: 'dash',
  687. visible: true
  688. },
  689. verticalLine: {
  690. color: 'black',
  691. dashStyle: 'dash',
  692. visible: true
  693. },
  694. label: {
  695. visible: true,
  696. backgroundColor: "#949494",
  697. font: {
  698. color: "#fff",
  699. size: 12,
  700. }
  701. }
  702. }
  703. };
  704. };
  705. BWA.ChartOptions.HeatExchangerAnalysis.getChart_4_Options = function (codeTimeType) {
  706. return {
  707. palette: 'Bright',
  708. legend: {
  709. visible: true,
  710. verticalAlignment: 'top',
  711. horizontalAlignment: 'center'
  712. },
  713. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  714. commonSeriesSettings: {
  715. argumentField: 'DateTime',
  716. selectionStyle: {
  717. hatching: {
  718. direction: 'left'
  719. }
  720. }
  721. },
  722. valueAxis: [{
  723. title: {
  724. text: '소비전력량 (kWh)'
  725. }
  726. },
  727. {
  728. type: 'continuous',
  729. valueType: 'numeric',
  730. /*tickInterval: 10,
  731. valueMarginsEnabled: true,
  732. minValueMargin: 0,
  733. maxValueMargin: 0,
  734. //min: -10,
  735. max: 40, */
  736. position: 'right',
  737. name: 'temperature',
  738. label: {
  739. font: { color: '#c96374' },
  740. },
  741. title: {
  742. text: '온도 (°C)'
  743. }
  744. }],
  745. series: [{
  746. type: 'bar',
  747. valueField: 'Value',
  748. //axis: 'Cold',
  749. name: '소비전력',
  750. label: {
  751. visible: false,
  752. customizeText: function () {
  753. return this.valueText + '(kWh)';
  754. }
  755. },
  756. point: { size: 8 }
  757. }, {
  758. type: 'spline',
  759. valueField: 'in_temp',
  760. axis: 'temperature',
  761. name: '공급온도',
  762. label: {
  763. visible: false,
  764. customizeText: function () {
  765. return this.valueText + '°C';
  766. }
  767. },
  768. point: { size: 8 }
  769. },
  770. {
  771. type: 'spline',
  772. valueField: 'out_temp',
  773. axis: 'temperature',
  774. name: '환수온도',
  775. label: {
  776. visible: false,
  777. customizeText: function () {
  778. return this.valueText + '°C';
  779. }
  780. },
  781. point: { size: 2 }
  782. }],
  783. tooltip: {
  784. enabled: true,
  785. },
  786. crosshair: {
  787. enabled: true,
  788. width: 2,
  789. horizontalLine: {
  790. color: 'black',
  791. dashStyle: 'dash',
  792. visible: false
  793. },
  794. verticalLine: {
  795. color: 'black',
  796. dashStyle: 'dash',
  797. visible: true
  798. },
  799. label: {
  800. visible: true,
  801. backgroundColor: "#949494",
  802. font: {
  803. color: "#fff",
  804. size: 12,
  805. }
  806. }
  807. }
  808. };
  809. }
  810. });