浏览代码

图表样式调整

wangziqian 5 年之前
父节点
当前提交
76c21e0c30

+ 0 - 1
src/views/quality/components/statusChart.vue

@@ -102,7 +102,6 @@ export default {
         tooltip: {
           trigger: 'axis',
           axisPointer: {
-            type: 'cross',
             label: {
               backgroundColor: '#6a7985'
             }

+ 1 - 1
src/views/quality/components/statusStayChart.vue

@@ -52,7 +52,7 @@ export default {
               total = total + item.value
               backString = backString + `<span style="color: ${colorArr[index] || ''}">${item.seriesName}</span>:${item.value}个</br>`
             })
-            return backString + `<span style="color: #F04864">总和</span>:${total.toFixed(2)}个`
+            return backString + `<span style="color: #F04864">总和</span>:${total}个`
           }
         },
         legend: { data: newArr.map(item => { return item.name }), left: 0, top: 0 },

+ 1 - 1
src/views/quality/components/tendencyChart.vue

@@ -44,7 +44,7 @@ export default {
         color: ['#3AA1FF'],
         tooltip: { trigger: 'axis', axisPointer: { type: 'line' }}, // 默认为直线,可选为:'line' | 'shadow'
         grid: { left: '0', right: '0', top: '5%', bottom: '0', containLabel: true },
-        xAxis: [{ type: 'category', data: this.chartData.xaxis, axisLabel: { interval: 0, rotate: 15 }, axisTick: { alignWithLabel: true }}],
+        xAxis: [{ type: 'category', data: this.chartData.xaxis, axisLabel: { interval: this.chartData.xaxis.length > 15 ? 1 : 0, rotate: 15 }, axisTick: { alignWithLabel: true }}],
         yAxis: [{ type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { type: 'dashed' }}}],
         series: [
           {