瀏覽代碼

fix chart sizing

Pi 1 年之前
父節點
當前提交
7ca09e3d3c
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/rest/templates/trend.tpl

+ 3 - 3
app/rest/templates/trend.tpl

@@ -29,8 +29,8 @@ select::-webkit-scrollbar-thumb {
 }
 
 svg {
-  height: calc(min(100vh, 100vw) - 8em);
-  width: calc(100% - 2em);
+  max-height: min(100vh, calc(100vw * 9 / 16));
+  max-width: calc(100vw - 2em);
 }
         </style>
         <title>Trend</title>
@@ -43,4 +43,4 @@ svg {
 {{!form}}
 {{!svg}}
     </body>
-</html>
+</html>