Browse Source

Tweak sale Pie margin

afc163 8 năm trước cách đây
mục cha
commit
ba3760a24c
2 tập tin đã thay đổi với 13 bổ sung15 xóa
  1. 3 3
      src/components/Charts/Pie/index.less
  2. 10 12
      src/routes/Dashboard/Analysis.js

+ 3 - 3
src/components/Charts/Pie/index.less

@@ -6,8 +6,7 @@
     position: relative;
   }
   &.hasLegend .chart {
-    width: ~"calc(100% - 252px)";
-    margin-left: 12px;
+    width: ~"calc(100% - 236px)";
   }
   .legend {
     position: absolute;
@@ -15,6 +14,7 @@
     min-width: 200px;
     top: 50%;
     transform: translateY(-50%);
+    margin: 0 20px;
     li {
       cursor: pointer;
       margin-bottom: 16px;
@@ -72,7 +72,7 @@
     & > p {
       color: @heading-color;
       display: block;
-      font-size: 1.3em;
+      font-size: 1.2em;
       height: 32px;
       line-height: 32px;
       white-space: nowrap;

+ 10 - 12
src/routes/Dashboard/Analysis.js

@@ -437,20 +437,18 @@ export default class Analysis extends Component {
                   </div>
                 </div>
               )}
-              style={{ marginTop: 24 }}
+              style={{ marginTop: 24, minHeight: 509 }}
             >
               <h4 style={{ marginTop: 8, marginBottom: 32 }}>销售额</h4>
-              <div style={{ marginBottom: 57 }}>
-                <Pie
-                  hasLegend
-                  subTitle="销售额"
-                  total={yuan(salesPieData.reduce((pre, now) => now.y + pre, 0))}
-                  data={salesPieData}
-                  valueFormat={val => yuan(val)}
-                  height={240}
-                  lineWidth={4}
-                />
-              </div>
+              <Pie
+                hasLegend
+                subTitle="销售额"
+                total={yuan(salesPieData.reduce((pre, now) => now.y + pre, 0))}
+                data={salesPieData}
+                valueFormat={val => yuan(val)}
+                height={248}
+                lineWidth={4}
+              />
             </Card>
           </Col>
         </Row>