瀏覽代碼

柱状图样式调整

zhouy 3 年之前
父節點
當前提交
a6a1b41598
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      uas-office-web/uas-mobile/src/components/common/bizgoblin/BarChart.jsx

+ 4 - 3
uas-office-web/uas-mobile/src/components/common/bizgoblin/BarChart.jsx

@@ -49,6 +49,7 @@ export default class ColumnChart extends Component {
           padding={[25, 15, 40, 50]}
           height={300}
           autoFit
+          forceFit
           data={data}
         >
           <Axis name='xField'
@@ -66,6 +67,7 @@ export default class ColumnChart extends Component {
           />
           <Interval
             position="xField*yField"
+            color={'xField'}
             label={[
               'yField',
               (val) => {
@@ -73,9 +75,8 @@ export default class ColumnChart extends Component {
                   content: val,
                   style: {
                     fill: '#333333',
-                    fontSize: 12,
-                    fontWeight: 'bold',
-                  },
+                    fontSize: 12
+                  }
                 }
               },
             ]}