06c0ed69aebe5a305aaaded2473a7080e980f643.svn-base 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. $(function () {
  2. BWA.ChartOptions = BWA.ChartOptions || {};
  3. BWA.ChartOptions.PowerSavingCycle = BWA.ChartOptions.PowerSavingCycle || {};
  4. BWA.ChartOptions.PowerSavingCycle.getChartInOutDoorOptions = 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. argumentAxis:
  14. {
  15. valueMarginsEnabled: false,
  16. argumentType: 'datetime',
  17. label: {
  18. alignment: 'center',
  19. format: 'HH시-mm분'
  20. },
  21. tickInterval: { minutes: 15 },
  22. },
  23. commonSeriesSettings: {
  24. argumentField: 'DateTime',
  25. selectionStyle: {
  26. hatching: {
  27. direction: 'left'
  28. }
  29. }
  30. },
  31. valueAxis: [
  32. {
  33. name: 'temp',
  34. position: 'left',
  35. type: 'continuous',
  36. valueType: 'numeric',
  37. tickInterval: 10,
  38. min: -10,
  39. max: 40,
  40. label: {
  41. },
  42. title: {
  43. text: '온도 (°C)',
  44. },
  45. },
  46. {
  47. tickInterval: 20,
  48. min: 0,
  49. max: 100,
  50. label: {
  51. },
  52. name: 'humi',
  53. position: 'right',
  54. title: {
  55. text: '습도 (%)',
  56. }
  57. }
  58. ],
  59. series: [
  60. {
  61. type: 'spline',
  62. axis: 'temp',
  63. valueField: 'IndoorTemp',
  64. visible: true,
  65. point: { size: 8 },
  66. name: '실내온도',
  67. color: '#c96374',
  68. label: {
  69. visible: false,
  70. customizeText: function () {
  71. return this.valueText + ' °C';
  72. }
  73. }
  74. }, {
  75. type: 'spline',
  76. axis: 'humi',
  77. valueField: 'IndoorHumy',
  78. point: { size: 8 },
  79. name: '실내습도',
  80. color: '#00A7C6',
  81. label: {
  82. visible: false,
  83. customizeText: function () {
  84. return this.valueText + ' %';
  85. }
  86. }
  87. },
  88. {
  89. type: 'spline',
  90. axis: 'temp',
  91. valueField: 'outdoorTemp',
  92. visible: true,
  93. point: { size: 8 },
  94. name: '실외온도',
  95. label: {
  96. visible: false,
  97. customizeText: function () {
  98. return this.valueText + ' °C';
  99. }
  100. }
  101. }, {
  102. type: 'spline',
  103. axis: 'humi',
  104. valueField: 'outdoorHumy',
  105. point: { size: 8 },
  106. name: '실외습도',
  107. label: {
  108. visible: false,
  109. customizeText: function () {
  110. return this.valueText + ' %';
  111. }
  112. }
  113. }
  114. ],
  115. tooltip: {
  116. enabled: true,
  117. color: "#3e1717",
  118. format: 'fixedPoint',
  119. precision: 2,
  120. font: {
  121. color: "white",
  122. size: 12,
  123. weight: 600,
  124. },
  125. argumentFormat: 'shortDate',
  126. customizeText: function () {
  127. return {
  128. text: [this.argumentText, ': ', this.valueText].join('')
  129. };
  130. }
  131. },
  132. crosshair: {
  133. enabled: true,
  134. width: 2,
  135. horizontalLine: {
  136. color: 'limegreen',
  137. dashStyle: 'solid',
  138. },
  139. verticalLine: {
  140. color: 'limegreen',
  141. dashStyle: 'solid'
  142. },
  143. label: {
  144. visible: true,
  145. backgroundColor: "#949494",
  146. font: {
  147. color: "#fff",
  148. size: 12,
  149. }
  150. }
  151. }
  152. };
  153. };
  154. });