|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: your name
|
|
|
* @Date: 2021-10-26 11:02:38
|
|
|
- * @LastEditTime: 2021-12-02 15:58:08
|
|
|
+ * @LastEditTime: 2022-01-05 18:16:17
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
* @Description: 母猪分布
|
|
|
* @FilePath: \hyyfScreen\src\views\Production\board\ChartSowBar.vue
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
},
|
|
|
props: {
|
|
|
data: {
|
|
|
- type: Array,
|
|
|
+ type: Object,
|
|
|
required: true,
|
|
|
},
|
|
|
},
|
|
@@ -59,10 +59,10 @@ export default {
|
|
|
// },
|
|
|
color: ["#3aa0ff", "#4dcb73", "#fad337", "#f2637b", "#975fe4"],
|
|
|
grid: {
|
|
|
- top: "22%",
|
|
|
- left: "10%",
|
|
|
- bottom: "10%",
|
|
|
- right: "15%",
|
|
|
+ top: "15%",
|
|
|
+ left: "15%",
|
|
|
+ bottom: "20%",
|
|
|
+ right: "5%",
|
|
|
},
|
|
|
xAxis: [
|
|
|
{
|
|
@@ -140,17 +140,16 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
};
|
|
|
- this.myChart.setOption(options);
|
|
|
+ this.myChart.setOption(options, true);
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
this.myChart = this.$echarts.init(document.getElementById("chartSowBar"));
|
|
|
- // this.init();
|
|
|
+ this.init();
|
|
|
},
|
|
|
watch: {
|
|
|
data: {
|
|
|
- handler(newValue) {
|
|
|
- console.log(newValue);
|
|
|
+ handler() {
|
|
|
this.init();
|
|
|
},
|
|
|
deep: true,
|