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.
255 lines
7.7 KiB
255 lines
7.7 KiB
3 years ago
|
Component({
|
||
|
data: {
|
||
|
showChart: true,
|
||
|
positiveOption: {
|
||
|
tooltip: {
|
||
|
trigger: 'axis',
|
||
|
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||
|
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
||
|
},
|
||
|
confine: true
|
||
|
},
|
||
|
|
||
|
legend: {
|
||
|
x:'15',
|
||
|
icon: 'rectangle',//data图标样式
|
||
|
itemWidth: 10,//data图标大小
|
||
|
itemHeight: 10,
|
||
|
textStyle: {
|
||
|
fontSize: 9
|
||
|
},
|
||
|
data: ['正面', '中性','负面'],
|
||
|
},
|
||
|
//图表位置
|
||
|
grid: {
|
||
|
left: 20,
|
||
|
right: 20,
|
||
|
bottom: 15,
|
||
|
top: 40,
|
||
|
containLabel: true
|
||
|
},
|
||
|
yAxis: [
|
||
|
{
|
||
|
type: 'value',
|
||
|
axisTick:{
|
||
|
show:false //去除刻度线
|
||
|
},
|
||
|
axisLine:{
|
||
|
show:false //去除轴线
|
||
|
},
|
||
|
axisLabel: {
|
||
|
color: '#999999',//y轴文本颜色
|
||
|
textStyle: {
|
||
|
fontSize : 9
|
||
|
}
|
||
|
},
|
||
|
splitLine: { //分割线
|
||
|
// lineStyle:{
|
||
|
// // color:"#2d3436"
|
||
|
|
||
|
// }
|
||
|
show: true,
|
||
|
lineStyle: {
|
||
|
type: 'dashed',
|
||
|
color: '#E8E8E8',
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
xAxis: [
|
||
|
{
|
||
|
type: 'category',
|
||
|
data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'],
|
||
|
axisTick:{
|
||
|
show:false //去除刻度线
|
||
|
},
|
||
|
axisLine:{
|
||
|
show:false, //去除轴线
|
||
|
},
|
||
|
axisLabel: {
|
||
|
color: '#999999',//x轴文本颜色
|
||
|
textStyle: {
|
||
|
fontSize : 9
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
series: [
|
||
|
{
|
||
|
name: '正面',
|
||
|
type: 'line',
|
||
|
symbol:'none', //去圆点
|
||
|
data: [100, 200, 300, 500, 700, 500, 300],
|
||
|
itemStyle: {
|
||
|
normal:{
|
||
|
color: '#0084FF',
|
||
|
lineStyle: {
|
||
|
color: '#0084FF'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
name: '中性',
|
||
|
type: 'line',
|
||
|
symbol:'none', //去圆点
|
||
|
data: [700, 900, 1100, 800, 1690, 1250, 920],
|
||
|
itemStyle: {
|
||
|
normal:{
|
||
|
color: '#20CC62',
|
||
|
lineStyle: {
|
||
|
color: '#20CC62'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
name: '负面',
|
||
|
type: 'line',
|
||
|
symbol:'none', //去圆点
|
||
|
data: [1100, 1300, 1500, 1200, 1300, 2000, 1000],
|
||
|
itemStyle: {
|
||
|
normal:{
|
||
|
color: '#FFBF00',
|
||
|
lineStyle: {
|
||
|
color: '#FFBF00'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
},
|
||
|
]
|
||
|
},
|
||
|
negativeOption: {
|
||
|
tooltip: {
|
||
|
trigger: 'axis',
|
||
|
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||
|
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
||
|
},
|
||
|
confine: true
|
||
|
},
|
||
|
|
||
|
legend: {
|
||
|
x:'15',
|
||
|
icon: 'rectangle',//data图标样式
|
||
|
itemWidth: 10,//data图标大小
|
||
|
itemHeight: 10,
|
||
|
textStyle: {
|
||
|
fontSize: 9
|
||
|
},
|
||
|
data: ['低级危机', '中级危机','高级危机'],
|
||
|
|
||
|
},
|
||
|
//图表位置
|
||
|
grid: {
|
||
|
left: 20,
|
||
|
right: 20,
|
||
|
bottom: 15,
|
||
|
top: 40,
|
||
|
containLabel: true
|
||
|
},
|
||
|
yAxis: [
|
||
|
{
|
||
|
type: 'value',
|
||
|
axisTick:{
|
||
|
show:false //去除刻度线
|
||
|
},
|
||
|
axisLine:{
|
||
|
show:false //去除轴线
|
||
|
},
|
||
|
axisLabel: {
|
||
|
color: '#999999',//y轴文本颜色
|
||
|
textStyle: {
|
||
|
fontSize : 9
|
||
|
}
|
||
|
},
|
||
|
splitLine: {
|
||
|
show: true,
|
||
|
lineStyle: {
|
||
|
type: 'dashed',
|
||
|
color: '#E8E8E8',
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
xAxis: [
|
||
|
{
|
||
|
type: 'category',
|
||
|
data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'],
|
||
|
axisTick:{
|
||
|
show:false //去除刻度线
|
||
|
},
|
||
|
axisLine:{
|
||
|
show:false, //去除轴线
|
||
|
},
|
||
|
axisLabel: {
|
||
|
color: '#999999',//x轴文本颜色
|
||
|
textStyle: {
|
||
|
fontSize : 9
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
series: [
|
||
|
{
|
||
|
name: '低级危机',
|
||
|
type: 'line',
|
||
|
symbol:'none', //去圆点
|
||
|
data: [1400, 2000, 1500, 1800, 1490, 900, 310],
|
||
|
itemStyle: {
|
||
|
normal:{
|
||
|
color: '#FFBF00',
|
||
|
lineStyle: {
|
||
|
color: '#FFBF00'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
name: '中级危机',
|
||
|
type: 'line',
|
||
|
symbol:'none', //去圆点
|
||
|
data: [210, 322, 551, 364, 960, 1307, 10],
|
||
|
itemStyle: {
|
||
|
normal:{
|
||
|
color: '#FF6E25',
|
||
|
lineStyle: {
|
||
|
color: '#FF6E25'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
},
|
||
|
{
|
||
|
name: '高级危机',
|
||
|
type: 'line',
|
||
|
symbol:'none', //去圆点
|
||
|
data: [250, 362, 71, 374, 970, 130, 170],
|
||
|
itemStyle: {
|
||
|
normal:{
|
||
|
color: '#FF4852',
|
||
|
lineStyle: {
|
||
|
color: '#FF4852'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
|
||
|
},
|
||
|
onShow() {
|
||
|
this.getTabBar().init();
|
||
|
},
|
||
|
|
||
|
methods: {
|
||
|
priceSel(e){
|
||
|
this.setData({
|
||
|
intervalSel: e.currentTarget.dataset.index
|
||
|
})
|
||
|
}
|
||
|
|
||
|
}
|
||
|
})
|