6f098ecd40b535348acae858e2c5217233a5dc6a.svn-base 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. min: -10,
  18. max:40,
  19. label: {
  20. font: { color: '#c96374' },
  21. visible: true,
  22. //format: 'largeNumber'
  23. },
  24. title: {
  25. text: $G('outdoorTemperatureWithUnit')
  26. }
  27. }, {
  28. pane: 'topPane',
  29. name: 'humidity',
  30. tickInterval: 20,
  31. valueMarginsEnabled: true,
  32. minValueMargin: 0,
  33. maxValueMargin: 0,
  34. //argumentType: 'numeric',
  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. /*
  82. A.getSeriesOptions = function (fuelTypeId, goalUpperBound) {
  83. return {
  84. valueAxis: [$.extend({}, fuelTypeValueAxises[fuelTypeId - 1], {
  85. constantLines: [{
  86. label: {
  87. text: $G('goalUpperBound')
  88. },
  89. width: 2,
  90. value: goalUpperBound,
  91. color: '#ff4500',
  92. dashStyle: 'dash'
  93. }],
  94. showZero: true,
  95. })].concat(valueAxises),
  96. series: [fuelTypeSeries[fuelTypeId - 1]].concat(series),
  97. };
  98. };
  99. */
  100. A.getCopChartOptions = function(codeTimeType) {
  101. return {
  102. palette: 'Default',
  103. legend: {
  104. visible: true,
  105. verticalAlignment: 'top',
  106. horizontalAlignment: 'center'
  107. },
  108. //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
  109. // ㅎㅎ 이게 있어야 멀티드로잉이 된다. 2015 04 21
  110. commonSeriesSettings: {
  111. argumentField: "DateTime",
  112. selectionStyle: {
  113. hatching: {
  114. direction: "left"
  115. }
  116. }
  117. },
  118. valueAxis: {
  119. pane: 'topPane',
  120. position: 'left',
  121. label: {
  122. visible: true,
  123. //format: 'largeNumber'
  124. },
  125. title: {
  126. text: $G('refrigeratorCop')
  127. }
  128. },
  129. series: {
  130. type: 'bar',
  131. argumentField: "DateTime",
  132. valueField: 'Value',
  133. //valueField: 'Temperature',
  134. name: $G('refrigeratorCop'),
  135. point: { size: 8 }
  136. },
  137. panes: [{
  138. name: 'topPane',
  139. border: {
  140. visible: false,
  141. left: false,
  142. right: false,
  143. top: false,
  144. color: 'gray'
  145. }
  146. }, ],
  147. defaultPane: "topPane",
  148. tooltip: {
  149. enabled: true,
  150. },
  151. crosshair: {
  152. enabled: true,
  153. width: 2,
  154. horizontalLine: {
  155. color: 'red',
  156. dashStyle: 'dash',
  157. visible: true
  158. },
  159. verticalLine: {
  160. color: 'red',
  161. dashStyle: 'dash',
  162. visible: true
  163. },
  164. label: {
  165. visible: true,
  166. backgroundColor: "#949494",
  167. font: {
  168. color: "#fff",
  169. size: 12,
  170. }
  171. }
  172. }
  173. };
  174. };
  175. });