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.
113 lines
3.1 KiB
113 lines
3.1 KiB
/*
|
|
* @Author: your name
|
|
* @Date: 2021-10-14 19:59:04
|
|
* @LastEditTime: 2021-10-14 20:58:54
|
|
* @LastEditors: Please set LastEditors
|
|
* @Description: In User Settings Edit
|
|
* @FilePath: /data-show/src/views/WeiboDetails/weiboTonalDistribution/opt.js
|
|
*/
|
|
export default function createOpt() {
|
|
return {
|
|
grid: {
|
|
left: 16,
|
|
right: 16,
|
|
bottom: 0,
|
|
top: 40,
|
|
containLabel: true
|
|
},
|
|
tooltip: {
|
|
trigger: "axis",
|
|
backgroundColor: "#08182F",
|
|
color: "#fff",
|
|
borderColor: "#3373CC",
|
|
textStyle: {
|
|
color: "#fff", //设置文字颜色
|
|
},
|
|
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
|
},
|
|
legend: {
|
|
position: 'center',
|
|
icon: 'roundRect',
|
|
y: 16,
|
|
textStyle: { //图例文字的样式
|
|
color: '#fff'
|
|
},
|
|
data: ['负面', '正面']
|
|
},
|
|
xAxis: {
|
|
type: 'value',
|
|
show: false,
|
|
splitLine: {
|
|
show: false,
|
|
lineStyle: {
|
|
type: 'dashed'
|
|
}
|
|
}
|
|
},
|
|
yAxis: {
|
|
type: 'category',
|
|
axisLine: { show: false },
|
|
axisLabel: { show: false },
|
|
axisTick: { show: false },
|
|
splitLine: { show: false },
|
|
data: [
|
|
'已认证',
|
|
'非认证',
|
|
'名人博主',
|
|
'政府',
|
|
'企业',
|
|
'媒体',
|
|
'个人大V',
|
|
]
|
|
},
|
|
series: [
|
|
{
|
|
name: '正面',
|
|
type: 'bar',
|
|
stack: '总量',
|
|
barWidth: 20,
|
|
label: {
|
|
show: true,
|
|
formatter: '{b}',
|
|
position: 'left',
|
|
color: '#fff',
|
|
fontWeight: 'bold'
|
|
},
|
|
data: [
|
|
{ value: 0.07 },
|
|
{ value: 0.09 },
|
|
{ value: 0.23 },
|
|
{ value: 0.17 },
|
|
{ value: 0.36 },
|
|
{ value: 0.26 },
|
|
{ value: 0.28 },
|
|
]
|
|
}, {
|
|
name: '负面',
|
|
type: 'bar',
|
|
stack: '总量',
|
|
barWidth: 20,
|
|
label: {
|
|
show: true,
|
|
formatter: '{b}',
|
|
position: 'right',
|
|
color: '#fff',
|
|
fontWeight: 'bold'
|
|
},
|
|
itemStyle: {
|
|
color: '#CC9D12',
|
|
},
|
|
data: [
|
|
{ value: -0.07 },
|
|
{ value: -0.09 },
|
|
{ value: -0.23 },
|
|
{ value: -0.17 },
|
|
{ value: -0.36 },
|
|
{ value: -0.26 },
|
|
{ value: -0.28 },
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|