lb #12
@@ -132,6 +132,7 @@ export default {
 | 
			
		||||
          icon: 'none',
 | 
			
		||||
          itemGap: 8,
 | 
			
		||||
          itemWidth: 10,
 | 
			
		||||
          // 在下面动态设置
 | 
			
		||||
          formatter: name => {
 | 
			
		||||
            const testData = this.dataList
 | 
			
		||||
 | 
			
		||||
@@ -304,38 +305,43 @@ export default {
 | 
			
		||||
      const fs13 = this.calcFontsize(13 /** px*/)
 | 
			
		||||
      const fs18 = this.calcFontsize(18 /** px*/)
 | 
			
		||||
      const fs20 = this.calcFontsize(20 /** px*/)
 | 
			
		||||
      const legendTextFixWidth = this.calcFontsize(56 /** px*/)
 | 
			
		||||
      const legnedTop = this.calcFontsize(64 /** px*/)
 | 
			
		||||
      const legendTopRate = this.calcFontsize(30 /** % */)
 | 
			
		||||
 | 
			
		||||
      this.configs.title.text = this.dataList.reduce((prev, curr) => prev + curr.value * 1000, 0)
 | 
			
		||||
      this.configs.title.textStyle.fontSize = fs20
 | 
			
		||||
      this.configs.title.subtextStyle.fontSize = fs13
 | 
			
		||||
 | 
			
		||||
      this.configs.legend.top = legendTopRate + '%'
 | 
			
		||||
      // this.configs.legend.top = legendTopRate + '%'
 | 
			
		||||
      this.configs.legend.top = legnedTop
 | 
			
		||||
      this.configs.legend.left = 0 + '%'
 | 
			
		||||
      this.configs.legend.itemGap = fs8
 | 
			
		||||
      this.configs.legend.itemWidth = fs10
 | 
			
		||||
      this.configs.legend.itemWidth = fs8
 | 
			
		||||
 | 
			
		||||
      this.configs.legend.textStyle.rich.a.fontSize = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.a.lineHeight = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.b.fontSize = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.a.fontSize = fs12
 | 
			
		||||
      this.configs.legend.textStyle.rich.a.lineHeight = fs12
 | 
			
		||||
      this.configs.legend.textStyle.rich.a.width = legendTextFixWidth
 | 
			
		||||
      this.configs.legend.textStyle.rich.b.fontSize = fs12
 | 
			
		||||
      this.configs.legend.textStyle.rich.b.width = legendTextFixWidth
 | 
			
		||||
      // this.configs.legend.textStyle.rich.b.lineHeight = fs16
 | 
			
		||||
      this.configs.legend.textStyle.rich.c.width = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.c.height = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.c.width = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.c.height = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.c.borderRadius = fs5
 | 
			
		||||
      this.configs.legend.textStyle.rich.d.width = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.d.height = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.d.width = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.d.height = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.d.borderRadius = fs5
 | 
			
		||||
      this.configs.legend.textStyle.rich.e.width = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.e.height = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.e.width = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.e.height = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.e.borderRadius = fs5
 | 
			
		||||
      this.configs.legend.textStyle.rich.f.width = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.f.height = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.f.width = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.f.height = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.f.borderRadius = fs5
 | 
			
		||||
      this.configs.legend.textStyle.rich.g.width = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.g.height = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.g.width = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.g.height = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.g.borderRadius = fs5
 | 
			
		||||
      this.configs.legend.textStyle.rich.h.width = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.h.height = fs10
 | 
			
		||||
      this.configs.legend.textStyle.rich.h.width = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.h.height = fs8
 | 
			
		||||
      this.configs.legend.textStyle.rich.h.borderRadius = fs5
 | 
			
		||||
 | 
			
		||||
      this.configs.series[0].label.rich.first.fontSize = fs12
 | 
			
		||||
 
 | 
			
		||||
@@ -61,6 +61,7 @@ export default {
 | 
			
		||||
            name: '成品率',
 | 
			
		||||
            type: 'value',
 | 
			
		||||
            min: 'dataMin',
 | 
			
		||||
            splitNumber: 4,
 | 
			
		||||
            nameTextStyle: {
 | 
			
		||||
              color: 'rgba(255,255,255,0.7)',
 | 
			
		||||
              fontSize: 12,
 | 
			
		||||
@@ -310,6 +311,9 @@ export default {
 | 
			
		||||
      this.configs.series.forEach(item => {
 | 
			
		||||
        item.data = [44, 40, 118, 197, 123, 95, 96].map(_ => {
 | 
			
		||||
          let v = Math.floor(Math.random() * 100)
 | 
			
		||||
          while (v < 80) {
 | 
			
		||||
            v = Math.floor(Math.random() * 100)
 | 
			
		||||
          }
 | 
			
		||||
          return v
 | 
			
		||||
        })
 | 
			
		||||
      })
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user