Merge remote-tracking branch 'refs/remotes/origin/dev' into dev

dev
Esdese 3 years ago
commit 3446badd8f

@ -30,7 +30,16 @@ export default function multiColumnsOption(dx=[], dValue=[], dName=[]) {
type: 'line' // 'shadow' as default; can also be 'line' or 'shadow' type: 'line' // 'shadow' as default; can also be 'line' or 'shadow'
}, },
}, },
legend: {}, legend: {
icon: 'rectangle', //data图标样式
itemWidth: 8, //data图标大小
itemHeight: 8,
left: 5,
textStyle: {
fontSize: 10,
fontWeight: 400
},
},
grid: { grid: {
bottom: 20 bottom: 20
}, },

@ -10,6 +10,34 @@ export default function negaposiOption(dName=[], dPositive=[], dNegative = []) {
console.log( console.log(
dPositive dPositive
); );
const dns = []; // 负面
const dps = []; // 正面
for(let i = 0; i <= dNegative.length - 1; i++) {
if(dNegative[i] == 0 && dPositive[i] != 0) {
dps[i] = {
value: dPositive[i],
itemStyle:{
normal:{
barBorderRadius:[12,12,12,12],
color: '#0084FF',
}
},
}
} else if(dNegative[i] != 0 && dPositive[i] == 0) {
dns[i] = {
value: dNegative[i],
itemStyle: {
normal:{
barBorderRadius:[12,12,12,12],
color: '#FFBF00',
}
}
}
} else {
dns[i] = dNegative[i];
dps[i] = dPositive[i];
}
}
return { return {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -76,7 +104,7 @@ export default function negaposiOption(dName=[], dPositive=[], dNegative = []) {
emphasis: { emphasis: {
focus: 'series' focus: 'series'
}, },
data: dPositive data: dps
}, },
{ {
name: '负面调性', name: '负面调性',
@ -99,7 +127,7 @@ export default function negaposiOption(dName=[], dPositive=[], dNegative = []) {
emphasis: { emphasis: {
focus: 'series' focus: 'series'
}, },
data: dNegative data: dns
} }
] ]
}; };

@ -57,7 +57,7 @@ export default function pictographicOption(dRegion=[],dValue=[]){
// offset: [20, 0], // offset: [20, 0],
color: '#333333', color: '#333333',
fontSize: 12, fontSize: 12,
position:[60,-4] position:[60,-2]
}, },
showBackground: true, showBackground: true,
backgroundStyle: { backgroundStyle: {

@ -59,7 +59,7 @@ export default function pictographicOption(dRegion = [], dValue = [], dSum = 0)
// offset: [20, 0], // offset: [20, 0],
color: '#333333', color: '#333333',
fontSize: 12, fontSize: 12,
position: [50, -5] position: [60, -2]
}, },
showBackground: true, showBackground: true,
backgroundStyle: { backgroundStyle: {

@ -57,7 +57,7 @@ export default function pictographicOption(dRegion = [], dValue = [], dSum = 0)
return ((params.value / dSum) * 100).toFixed(2) + ' %'; return ((params.value / dSum) * 100).toFixed(2) + ' %';
}, },
// position: 'right', // position: 'right',
position:[180,0], position:[200,1],
// offset: [20, 0], // offset: [20, 0],
color: '#333333', color: '#333333',
fontSize: 12, fontSize: 12,

@ -270,7 +270,9 @@ Component({
dPositive.push((ele.value[0].value * 100 / total).toFixed(0)); dPositive.push((ele.value[0].value * 100 / total).toFixed(0));
dNegative.push((ele.value[2].value * 100 / total).toFixed(0)); dNegative.push((ele.value[2].value * 100 / total).toFixed(0));
} }
console.log('0000',dName)
}); });
this.setData({affNegaposi: negaposiOption(dName,dPositive,dNegative)}) this.setData({affNegaposi: negaposiOption(dName,dPositive,dNegative)})
}); });
this.getWordCloud(); this.getWordCloud();

@ -21,13 +21,6 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "",
"pathName": "pages/index/Salesranking/Salesranking",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }

Loading…
Cancel
Save