historical-data.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. /* historical-data.component.css */
  2. :host {
  3. display: block;
  4. width: 100%;
  5. padding: 15px;
  6. }
  7. .history-container {
  8. max-width: 1400px;
  9. margin: 0 auto;
  10. padding: 20px;
  11. background: white;
  12. border-radius: 8px;
  13. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  14. }
  15. .history-header {
  16. margin-bottom: 24px;
  17. padding-bottom: 16px;
  18. border-bottom: 1px solid #eee;
  19. }
  20. .history-header h2 {
  21. display: flex;
  22. align-items: center;
  23. gap: 10px;
  24. font-size: 24px;
  25. color: #2c3e50;
  26. }
  27. .filter-row {
  28. display: flex;
  29. gap: 20px;
  30. margin-bottom: 20px;
  31. }
  32. .filter-card,
  33. .device-selector {
  34. flex: 1;
  35. background: white;
  36. border-radius: 8px;
  37. padding: 20px;
  38. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  39. }
  40. .date-controls {
  41. display: grid;
  42. grid-template-columns: 1fr 1fr auto;
  43. gap: 15px;
  44. align-items: flex-end;
  45. }
  46. .date-input label {
  47. display: block;
  48. margin-bottom: 6px;
  49. font-size: 14px;
  50. color: #2c3e50;
  51. }
  52. .date-input input {
  53. width: 100%;
  54. padding: 8px 12px;
  55. border-radius: 4px;
  56. border: 1px solid #ddd;
  57. font-size: 14px;
  58. }
  59. .device-controls {
  60. display: flex;
  61. gap: 15px;
  62. align-items: center;
  63. }
  64. .device-controls select {
  65. flex: 1;
  66. padding: 8px 12px;
  67. border-radius: 4px;
  68. border: 1px solid #ddd;
  69. font-size: 14px;
  70. }
  71. .checkbox-container {
  72. display: flex;
  73. align-items: center;
  74. cursor: pointer;
  75. font-size: 14px;
  76. user-select: none;
  77. }
  78. .checkbox-container input {
  79. position: absolute;
  80. opacity: 0;
  81. cursor: pointer;
  82. }
  83. .checkmark {
  84. height: 20px;
  85. width: 20px;
  86. background-color: #eee;
  87. border-radius: 4px;
  88. margin-left: 10px;
  89. display: flex;
  90. align-items: center;
  91. justify-content: center;
  92. }
  93. .checkbox-container input:checked ~ .checkmark {
  94. background-color: #3498db;
  95. }
  96. .checkmark:after {
  97. content: "";
  98. display: none;
  99. width: 5px;
  100. height: 10px;
  101. border: solid white;
  102. border-width: 0 2px 2px 0;
  103. transform: rotate(45deg);
  104. }
  105. .checkbox-container input:checked ~ .checkmark:after {
  106. display: block;
  107. }
  108. .chart-container {
  109. margin-bottom: 20px;
  110. }
  111. .chart-card {
  112. background: white;
  113. border-radius: 8px;
  114. padding: 20px;
  115. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  116. }
  117. .chart-header {
  118. display: flex;
  119. justify-content: space-between;
  120. align-items: center;
  121. margin-bottom: 15px;
  122. }
  123. .chart-legend {
  124. display: flex;
  125. gap: 20px;
  126. font-size: 14px;
  127. }
  128. .color-dot {
  129. display: inline-block;
  130. width: 12px;
  131. height: 12px;
  132. border-radius: 50%;
  133. margin-right: 8px;
  134. }
  135. .color-dot.primary { background: #3498db; }
  136. .color-dot.secondary { background: #9b59b6; }
  137. .chart-content {
  138. height: 400px;
  139. background: #f8fafc;
  140. border-radius: 6px;
  141. position: relative;
  142. padding: 30px 40px;
  143. }
  144. .trend-chart {
  145. width: 100%;
  146. height: 100%;
  147. position: relative;
  148. }
  149. .grid-lines {
  150. position: absolute;
  151. top: 0;
  152. left: 0;
  153. right: 0;
  154. bottom: 0;
  155. }
  156. .grid-line {
  157. position: absolute;
  158. width: 100%;
  159. height: 1px;
  160. background: rgba(0, 0, 0, 0.05);
  161. }
  162. .grid-line:nth-child(1) { top: 0%; }
  163. .grid-line:nth-child(2) { top: 25%; }
  164. .grid-line:nth-child(3) { top: 50%; }
  165. .grid-line:nth-child(4) { top: 75%; }
  166. .grid-line:nth-child(5) { top: 100%; }
  167. .data-line {
  168. position: absolute;
  169. height: 3px;
  170. border-radius: 3px;
  171. bottom: 0;
  172. }
  173. .data-line.primary {
  174. background: #3498db;
  175. width: 70%;
  176. }
  177. .data-line.secondary {
  178. background: #9b59b6;
  179. width: 60%;
  180. }
  181. .x-axis {
  182. position: absolute;
  183. bottom: -30px;
  184. left: 0;
  185. right: 0;
  186. display: flex;
  187. justify-content: space-between;
  188. font-size: 12px;
  189. color: white;
  190. }