be60ccad79b1277cbefd23cd9b0aa75f8a695457.svn-base 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. $(function() {
  2. BWA.ChartOptions = BWA.ChartOptions || {};
  3. var A = BWA.ChartOptions.RefrigeratorAnalysis = BWA.ChartOptions.RefrigeratorAnalysis || {};
  4. var valueAxises = [
  5. {
  6. title: {
  7. //text: $G('coolingApproach')
  8. text: $G('outdoorTemperatureWithUnit')
  9. }
  10. },
  11. {
  12. //pane: 'topPane',
  13. name: 'intemp',
  14. position: 'right',
  15. //valueMarginsEnabled: true,
  16. //minValueMargin: 0,
  17. //maxValueMargin: 0,
  18. //min: -20,
  19. //max: 40,
  20. label: {
  21. font: { color: '#c96374' },
  22. visible: true,
  23. //format: 'largeNumber'
  24. },
  25. title: {
  26. //text: '냉각수 입구온도 (°C)' 2016 07 15
  27. text: '냉각탑 출구온도 (°C)'
  28. }
  29. }, {
  30. //pane: 'topPane',
  31. name: 'outtemp',
  32. //min: 0,
  33. //max: 100,
  34. position: 'right',
  35. grid: {
  36. visible: true
  37. },
  38. label: {
  39. font: { color: '#00A7C6' },
  40. visible: true,
  41. //format: 'largeNumber'
  42. },
  43. title: {
  44. //text: '냉각수 출구온도 (°C)'2016 07 15
  45. text: '냉각탑 입구온도 (°C)'
  46. }
  47. }, {
  48. //pane: 'topPane',
  49. name: 'htemp',
  50. //min: 0,
  51. //max: 100,
  52. position: 'right',
  53. grid: {
  54. visible: true
  55. },
  56. label: {
  57. font: { color: 'darkgreen' },
  58. visible: true,
  59. //format: 'largeNumber'
  60. },
  61. title: {
  62. text: '습구온도 (°C)'
  63. }
  64. }];
  65. var seriesS = [
  66. {
  67. //type: 'bar',
  68. type: 'spline',
  69. argumentField: 'DateTime',
  70. valueField: 'Value',
  71. //width: 5,
  72. //valueField: 'h_temp',
  73. name: '외기온도',
  74. label: {
  75. visible: false,
  76. },
  77. point: { size: 1 }
  78. },
  79. {
  80. type: 'spline',
  81. color: '#c96374',
  82. //pane: 'topPane',
  83. // axis: 'intemp',
  84. valueField: 'c_in_temp',
  85. point: { size: 1 },
  86. //name: '냉각수 입구온도', 2016 07 15
  87. name: '냉각탑 츨구온도',
  88. label: {
  89. visible: false,
  90. font: { color: '#c96374', },
  91. customizeText: function () {
  92. return this.valueText + ' °C';
  93. }
  94. }
  95. }, {
  96. type: 'spline',
  97. //pane: 'topPane',
  98. // axis: 'outtemp',
  99. color: '#00A7C6',
  100. valueField: 'c_out_temp',
  101. point: { size: 1 },
  102. //name: '냉각수 출구온도', 2016 07 15
  103. name: '냉각탑 입구온도',
  104. label: {
  105. font: { color: '#00A7C6', },
  106. visible: false,
  107. customizeText: function () {
  108. return this.valueText + ' °C';
  109. }
  110. }
  111. }, {
  112. type: 'spline',
  113. // pane: 'topPane',
  114. // axis: 'htemp',
  115. color: 'darkgreen',
  116. valueField: 'h_temp',
  117. point: { size: 1 },
  118. name: '습구온도',
  119. label: {
  120. font: { color: 'darkgreen', },
  121. visible: false,
  122. customizeText: function () {
  123. return this.valueText + ' °C';
  124. }
  125. }
  126. }];
  127. A.getCoolingApproachSeriesOptions = function (ck1, ck2, ck3) {
  128. /*
  129. var returnvar : {
  130. var series = [];
  131. var valueAxis = [];
  132. }; */
  133. var series = [];
  134. series.push(seriesS[0]);
  135. if (ck1) {
  136. series.push(seriesS[1]);
  137. }
  138. if (ck2) {
  139. series.push(seriesS[2]);
  140. }
  141. if (ck3) {
  142. series.push(seriesS[3]);
  143. }
  144. return series;
  145. };
  146. A.getCoolingApproachvalueAxisOptions = function (ck1, ck2, ck3) {
  147. var valueAxis = [];
  148. valueAxis.push(valueAxises[0]);
  149. if (ck1) {
  150. valueAxis.push(valueAxises[1]);
  151. }
  152. if (ck2) {
  153. valueAxis.push(valueAxises[2]);
  154. }
  155. if (ck3) {
  156. valueAxis.push(valueAxises[3]);
  157. }
  158. return valueAxis;
  159. };
  160. A.getCoolingApproachChartOptions = function(codeTimeType) {
  161. return {
  162. palette: 'Default',
  163. legend: {
  164. visible: true,
  165. verticalAlignment: 'top',
  166. horizontalAlignment: 'center'
  167. },
  168. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  169. commonSeriesSettings: {
  170. argumentField: "DateTime",
  171. selectionStyle: {
  172. hatching: {
  173. direction: "left"
  174. }
  175. }
  176. },
  177. //valueAxis: valueAxises,
  178. valueAxis: {
  179. valueMarginsEnabled: true,
  180. //position: 'right',
  181. //minValueMargin: 0,
  182. //maxValueMargin: 0,
  183. //min: -20,
  184. //max: 40,
  185. title: {
  186. //text: $G('coolingApproach')
  187. //text: $G('outdoorTemperatureWithUnit')
  188. text: '온도 (°C)'
  189. }
  190. },
  191. series: seriesS,
  192. tooltip: {
  193. enabled: true,
  194. },
  195. crosshair: {
  196. enabled: true,
  197. width: 2,
  198. horizontalLine: {
  199. color: 'red',
  200. dashStyle: 'dash',
  201. visible: false
  202. },
  203. verticalLine: {
  204. color: 'black',
  205. dashStyle: 'dash',
  206. visible: true
  207. },
  208. label: {
  209. visible: true,
  210. backgroundColor: "#949494",
  211. font: {
  212. color: "#fff",
  213. size: 12,
  214. }
  215. }
  216. }
  217. };
  218. };
  219. });