This commit is contained in:
lb 2022-11-18 15:03:18 +08:00
parent 9b8f796100
commit 5e78b4b5da
2 changed files with 27 additions and 17 deletions

View File

@ -132,6 +132,7 @@ export default {
icon: 'none', icon: 'none',
itemGap: 8, itemGap: 8,
itemWidth: 10, itemWidth: 10,
//
formatter: name => { formatter: name => {
const testData = this.dataList const testData = this.dataList
@ -304,38 +305,43 @@ export default {
const fs13 = this.calcFontsize(13 /** px*/) const fs13 = this.calcFontsize(13 /** px*/)
const fs18 = this.calcFontsize(18 /** px*/) const fs18 = this.calcFontsize(18 /** px*/)
const fs20 = this.calcFontsize(20 /** px*/) const fs20 = this.calcFontsize(20 /** px*/)
const legendTextFixWidth = this.calcFontsize(56 /** px*/)
const legnedTop = this.calcFontsize(64 /** px*/)
const legendTopRate = this.calcFontsize(30 /** % */) const legendTopRate = this.calcFontsize(30 /** % */)
this.configs.title.text = this.dataList.reduce((prev, curr) => prev + curr.value * 1000, 0) this.configs.title.text = this.dataList.reduce((prev, curr) => prev + curr.value * 1000, 0)
this.configs.title.textStyle.fontSize = fs20 this.configs.title.textStyle.fontSize = fs20
this.configs.title.subtextStyle.fontSize = fs13 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.left = 0 + '%'
this.configs.legend.itemGap = fs8 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.fontSize = fs12
this.configs.legend.textStyle.rich.a.lineHeight = fs10 this.configs.legend.textStyle.rich.a.lineHeight = fs12
this.configs.legend.textStyle.rich.b.fontSize = fs10 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.b.lineHeight = fs16
this.configs.legend.textStyle.rich.c.width = fs10 this.configs.legend.textStyle.rich.c.width = fs8
this.configs.legend.textStyle.rich.c.height = fs10 this.configs.legend.textStyle.rich.c.height = fs8
this.configs.legend.textStyle.rich.c.borderRadius = fs5 this.configs.legend.textStyle.rich.c.borderRadius = fs5
this.configs.legend.textStyle.rich.d.width = fs10 this.configs.legend.textStyle.rich.d.width = fs8
this.configs.legend.textStyle.rich.d.height = fs10 this.configs.legend.textStyle.rich.d.height = fs8
this.configs.legend.textStyle.rich.d.borderRadius = fs5 this.configs.legend.textStyle.rich.d.borderRadius = fs5
this.configs.legend.textStyle.rich.e.width = fs10 this.configs.legend.textStyle.rich.e.width = fs8
this.configs.legend.textStyle.rich.e.height = fs10 this.configs.legend.textStyle.rich.e.height = fs8
this.configs.legend.textStyle.rich.e.borderRadius = fs5 this.configs.legend.textStyle.rich.e.borderRadius = fs5
this.configs.legend.textStyle.rich.f.width = fs10 this.configs.legend.textStyle.rich.f.width = fs8
this.configs.legend.textStyle.rich.f.height = fs10 this.configs.legend.textStyle.rich.f.height = fs8
this.configs.legend.textStyle.rich.f.borderRadius = fs5 this.configs.legend.textStyle.rich.f.borderRadius = fs5
this.configs.legend.textStyle.rich.g.width = fs10 this.configs.legend.textStyle.rich.g.width = fs8
this.configs.legend.textStyle.rich.g.height = fs10 this.configs.legend.textStyle.rich.g.height = fs8
this.configs.legend.textStyle.rich.g.borderRadius = fs5 this.configs.legend.textStyle.rich.g.borderRadius = fs5
this.configs.legend.textStyle.rich.h.width = fs10 this.configs.legend.textStyle.rich.h.width = fs8
this.configs.legend.textStyle.rich.h.height = fs10 this.configs.legend.textStyle.rich.h.height = fs8
this.configs.legend.textStyle.rich.h.borderRadius = fs5 this.configs.legend.textStyle.rich.h.borderRadius = fs5
this.configs.series[0].label.rich.first.fontSize = fs12 this.configs.series[0].label.rich.first.fontSize = fs12

View File

@ -61,6 +61,7 @@ export default {
name: '成品率', name: '成品率',
type: 'value', type: 'value',
min: 'dataMin', min: 'dataMin',
splitNumber: 4,
nameTextStyle: { nameTextStyle: {
color: 'rgba(255,255,255,0.7)', color: 'rgba(255,255,255,0.7)',
fontSize: 12, fontSize: 12,
@ -310,6 +311,9 @@ export default {
this.configs.series.forEach(item => { this.configs.series.forEach(item => {
item.data = [44, 40, 118, 197, 123, 95, 96].map(_ => { item.data = [44, 40, 118, 197, 123, 95, 96].map(_ => {
let v = Math.floor(Math.random() * 100) let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v return v
}) })
}) })