14a1bf2b4abbc0acd280d3c301d726c9d4cc4682.svn-base 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. $(function() {
  2. BWA.ChartOptions = BWA.ChartOptions || {};
  3. var A = BWA.ChartOptions.RefrigeratorAnalysis = BWA.ChartOptions.RefrigeratorAnalysis || {};
  4. var valueAxises = [{
  5. pane: 'topPane',
  6. name: 'Temperature',
  7. position: 'right',
  8. //valueMarginsEnabled: true,
  9. //minValueMargin: 0,
  10. //maxValueMargin: 0,
  11. type: 'continuous',
  12. valueType: 'numeric',
  13. tickInterval: 10,
  14. valueMarginsEnabled: true,
  15. minValueMargin: 0,
  16. maxValueMargin: 0,
  17. //argumentType: 'numeric',
  18. min: -10,
  19. max: 40,
  20. label: {
  21. font: { color: '#c96374' },
  22. visible: true,
  23. //format: 'largeNumber'
  24. },
  25. title: {
  26. text: $G('outdoorTemperatureWithUnit')
  27. }
  28. }, {
  29. pane: 'topPane',
  30. name: 'humidity',
  31. tickInterval: 20,
  32. valueMarginsEnabled: true,
  33. minValueMargin: 0,
  34. maxValueMargin: 0,
  35. min: 0,
  36. max: 100,
  37. position: 'right',
  38. grid: {
  39. visible: true
  40. },
  41. label: {
  42. font: { color: '#00A7C6' },
  43. visible: true,
  44. //format: 'largeNumber'
  45. },
  46. title: {
  47. text: $G('outdoorHumidityWithUnit')
  48. }
  49. }];
  50. var seriesS = [{
  51. type: 'spline',
  52. color: '#c96374',
  53. pane: 'topPane',
  54. axis: 'Temperature',
  55. valueField: 'Temperature',
  56. point: { size: 2 },
  57. name: $G('outdoorTemperature'),
  58. label: {
  59. visible: false,
  60. font: { color: '#c96374', },
  61. customizeText: function () {
  62. return this.valueText + ' °C';
  63. }
  64. }
  65. }, {
  66. type: 'spline',
  67. pane: 'topPane',
  68. axis: 'humidity',
  69. color: '#00A7C6',
  70. valueField: 'Humidity',
  71. point: { size: 2 },
  72. name: $G('outdoorHumidity'),
  73. label: {
  74. font: { color: '#00A7C6', },
  75. visible: false,
  76. customizeText: function () {
  77. return this.valueText + ' %';
  78. }
  79. }
  80. }];
  81. A.getLoadRateChartOptions = function(codeTimeType) {
  82. return {
  83. palette: "Soft Pastel",
  84. legend: {
  85. visible: true,
  86. verticalAlignment: 'top',
  87. horizontalAlignment: 'center'
  88. },
  89. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  90. // ㅎㅎ 이게 있어야 멀티드로잉이 된다. 2015 04 21
  91. commonSeriesSettings: {
  92. argumentField: "DateTime",
  93. selectionStyle: {
  94. hatching: {
  95. direction: "left"
  96. }
  97. }
  98. },
  99. valueAxis: {
  100. pane: 'topPane',
  101. position: 'left',
  102. label: {
  103. visible: true,
  104. //format: 'largeNumber'
  105. },
  106. title: {
  107. text: $G('loadRateWithUnit')
  108. }
  109. },
  110. series: {
  111. type: 'bar',
  112. valueField: 'Value',
  113. name: '부하율',
  114. argumentField: 'DateTime',
  115. label: {
  116. visible: false,
  117. //customizeText: function() {
  118. // return this.argumentField + this.valueText;
  119. //}
  120. },
  121. point: { size: 8 }
  122. },
  123. panes: [{
  124. name: 'topPane',
  125. border: {
  126. visible: false,
  127. left: false,
  128. right: false,
  129. top: false,
  130. color: 'gray'
  131. }
  132. }, ],
  133. defaultPane: "topPane",
  134. tooltip: {
  135. enabled: true,
  136. },
  137. crosshair: {
  138. enabled: true,
  139. width: 2,
  140. horizontalLine: {
  141. color: 'red',
  142. dashStyle: 'dash',
  143. visible: true
  144. },
  145. verticalLine: {
  146. color: 'red',
  147. dashStyle: 'dash',
  148. visible: true
  149. },
  150. label: {
  151. visible: true,
  152. backgroundColor: "#949494",
  153. font: {
  154. color: "#fff",
  155. size: 12,
  156. }
  157. }
  158. }
  159. };
  160. };
  161. });