You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
// 调性分布
|
|
|
|
export default function negaposiOption(dName=[], dPositive=[], dNegative = []) {
|
|
|
|
// let newValue = [];
|
|
|
|
// dValue.forEach(ele => {
|
|
|
|
// newValue.push(ele*1-100);
|
|
|
|
// })
|
|
|
|
console.log(
|
|
|
|
dNegative
|
|
|
|
);
|
|
|
|
console.log(
|
|
|
|
dPositive
|
|
|
|
);
|
|
|
|
return {
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'axis',
|
|
|
|
backgroundColor: "#08182F",
|
|
|
|
color: "#fff",
|
|
|
|
borderColor: "#3373CC",
|
|
|
|
textStyle: {
|
|
|
|
color: "#fff", //设置文字颜色
|
|
|
|
fontSize: 9
|
|
|
|
},
|
|
|
|
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
|
|
|
|
confine: true
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
data: ['正面调性', '负面调性']
|
|
|
|
},
|
|
|
|
grid: {
|
|
|
|
top: 20,
|
|
|
|
left: 20,
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
xAxis: [
|
|
|
|
{
|
|
|
|
type: 'value',
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
yAxis: [
|
|
|
|
{
|
|
|
|
type: 'category',
|
|
|
|
inverse: true,
|
|
|
|
axisTick: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
axisLine: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
margin: 10,
|
|
|
|
fontSize: 12
|
|
|
|
},
|
|
|
|
data: dName
|
|
|
|
}
|
|
|
|
],
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
name: '正面调性',
|
|
|
|
type: 'bar',
|
|
|
|
barWidth:12,
|
|
|
|
stack: 'Total',
|
|
|
|
label: {
|
|
|
|
show: false,
|
|
|
|
position: 'right',
|
|
|
|
formatter: function (params) {
|
|
|
|
return (params.data)+'%';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
itemStyle:{
|
|
|
|
normal:{
|
|
|
|
barBorderRadius:[12,0,0,12],
|
|
|
|
color: '#0084FF'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
emphasis: {
|
|
|
|
focus: 'series'
|
|
|
|
},
|
|
|
|
data: dPositive
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '负面调性',
|
|
|
|
type: 'bar',
|
|
|
|
barWidth:12,
|
|
|
|
stack: 'Total',
|
|
|
|
label: {
|
|
|
|
show: false,
|
|
|
|
position: 'left',
|
|
|
|
formatter: function (params) {
|
|
|
|
return (params.data) +'%';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
itemStyle:{
|
|
|
|
normal:{
|
|
|
|
barBorderRadius:[0,12,12,0],
|
|
|
|
color: '#FFBF00',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
emphasis: {
|
|
|
|
focus: 'series'
|
|
|
|
},
|
|
|
|
data: dNegative
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
}
|