lb #12

Merged
gtz217 merged 27 commits from lb into master 2022-11-18 17:04:51 +08:00
Showing only changes of commit 760342ddbb - Show all commits

View File

@ -48,7 +48,7 @@ export default {
}, },
{ {
type: 'linear', type: 'linear',
x: 1, x: 0.5,
y: 1, y: 1,
x2: 0, x2: 0,
y2: 0, y2: 0,
@ -61,7 +61,7 @@ export default {
}, },
{ {
type: 'linear', type: 'linear',
x: 1, x: 0.5,
y: 1, y: 1,
x2: 0, x2: 0,
y2: 0, y2: 0,
@ -75,9 +75,9 @@ export default {
{ {
type: 'linear', type: 'linear',
x: 0, x: 0,
y: 1, y: 0.5,
x2: 0, x2: 1,
y2: 0, y2: 0.5,
colorStops: [ colorStops: [
{ color: '#FFFFFF00', offset: 0 }, { color: '#FFFFFF00', offset: 0 },
{ color: '#49FBD600', offset: 0.1 }, { color: '#49FBD600', offset: 0.1 },
@ -103,7 +103,7 @@ export default {
textAlign: 'center', textAlign: 'center',
left: '63%', left: '63%',
top: '35%', top: '35%',
text: '33039', text: demoData.reduce((prev, curr) => prev + curr.value, 0),
textStyle: { textStyle: {
color: '#fff', color: '#fff',
fontSize: 16, fontSize: 16,
@ -123,7 +123,7 @@ export default {
left: -15, left: -15,
orient: 'vertical', orient: 'vertical',
icon: 'none', icon: 'none',
itemGap: 5, itemGap: 8,
itemWidth: 10, itemWidth: 10,
formatter: function(name) { formatter: function(name) {
// test data - dynamic // test data - dynamic
@ -163,7 +163,6 @@ export default {
borderRadius: 5, borderRadius: 5,
height: 10, height: 10,
backgroundColor: '#FB418C' backgroundColor: '#FB418C'
// backgroundColor: '#1A99FF'
}, },
d: { d: {
// verticalAlign: 'top', // verticalAlign: 'top',
@ -172,7 +171,6 @@ export default {
borderRadius: 5, borderRadius: 5,
height: 10, height: 10,
backgroundColor: '#DDB112' backgroundColor: '#DDB112'
// backgroundColor: '#A691FF'
}, },
e: { e: {
// verticalAlign: 'top', // verticalAlign: 'top',
@ -181,7 +179,6 @@ export default {
borderRadius: 5, borderRadius: 5,
height: 10, height: 10,
backgroundColor: '#1A99FF' backgroundColor: '#1A99FF'
// backgroundColor: '#FB418C'
}, },
f: { f: {
// verticalAlign: 'top', // verticalAlign: 'top',
@ -190,7 +187,6 @@ export default {
borderRadius: 5, borderRadius: 5,
height: 10, height: 10,
backgroundColor: '#A691FF' backgroundColor: '#A691FF'
// backgroundColor: '#49FBD6'
}, },
g: { g: {
// verticalAlign: 'top', // verticalAlign: 'top',
@ -199,7 +195,6 @@ export default {
borderRadius: 5, borderRadius: 5,
height: 10, height: 10,
backgroundColor: '#49FBD6' backgroundColor: '#49FBD6'
// backgroundColor: '#DDB112'
} }
} }
} }
@ -236,7 +231,7 @@ export default {
const colorGradient = colors[dataIndex] const colorGradient = colors[dataIndex]
if (totalRate + percent < 25) { if (totalRate + percent < 25) {
/** 也许这里需要完善,但目前工作良好 */ /** 也许这里需要完善,但目前工作良好 */
(() => {})() ;(() => {})()
} else if (totalRate + percent < 50) { } else if (totalRate + percent < 50) {
colorGradient.x = 0 colorGradient.x = 0
colorGradient.y = 0 colorGradient.y = 0
@ -249,7 +244,7 @@ export default {
colorGradient.y2 = 0 colorGradient.y2 = 0
} else if (totalRate + percent < 100) { } else if (totalRate + percent < 100) {
/** 也许这里需要完善,但目前工作良好 */ /** 也许这里需要完善,但目前工作良好 */
(() => {})() ;(() => {})()
} }
totalRate += percent totalRate += percent