田源
2023-12-14 cb5e4fb0d120c7334fb25c93c4ac4d293a3cde3a
Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue
@@ -36,7 +36,7 @@
            );
          });
          let colors = ["#91CC75", "#5470C6"];
          let colors = ['#84C9E5', '#F68686'];
          const seriesData = [];
          for (let i = 0; i < newval.length; i++) {
@@ -50,7 +50,7 @@
                value: newval[i][j],
                itemStyle: {
                  normal: {
                    barBorderRadius: borderRadius,  // 设置圆角
                    // barBorderRadius: borderRadius,  // 设置圆角
                    color: colors[i],
                  }
                },
@@ -65,7 +65,10 @@
              data: curSeriesData,
              label: {
                show: true,
                position: 'top'
                position: 'top',
                formatter: function (params) {
                  return params.value === 0 ? '' : params.value; // 值为 0 不显示,其他情况显示
                }
              },
              emphasis: {
                focus: "series",
@@ -79,7 +82,6 @@
    chartName:{
      handler(newval,oldval){
        if(newval){
          console.log(newval)
          this.chartOptions.title.text = newval + "数据统计"
        }
      },
@@ -90,7 +92,7 @@
  data() {
    return {
      chartOptions: {
        color:["#91CC75", "#5470C6"],
        color:['#84C9E5', '#F68686'],
        title: {
          text: "",
        },