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.

253 lines
7.3 KiB

import {url} from '../../../utils/config'
Component({
data: {
url: getApp().globalData.url,
active:0,
timelist: ['二十四小时', '最近七天', '最近三十天', '自定义'],
totallist:[
{
url:'/ruku.png',
text:'入库数据',
num:'198,897,987'
},
{
url:'/weibo.png',
text:'微博数据',
num:'198,897,987'
},
{
url:'/shipin.png',
text:'短视频数据',
num:'198,897,987'
},
{
url:'/weixin.png',
text:'微信数据',
num:'198,897,987'
},
{
url:'/app.png',
text:'APP数据',
num:'198,897,987'
},
{
url:'/luntan.png',
text:'论坛数据',
num:'198,897,987'
},
{
url:'/xinwen.png',
text:'新闻数据',
num:'198,897,987'
},
{
url:'/qita.png',
text:'其他数据',
num:'198,897,987'
},
],
showChart: true,
chartOption: {
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
},
confine: true
},
legend: {
icon: 'rectangle',//data图标样式
itemWidth: 10,//data图标大小
itemHeight: 10,
left: 7,
textStyle: {
fontSize: 10,
fontWeight: 400
},
data: ['微博', '其他','短视频', '微信','APP', '论坛', '新闻'],
// color:['#FF4852','#FF6E25','#FFBF00','#20CC62','#00D6D6','#00AAFF','#7257FF'],
},
//图表位置
grid: {
left: 7,
right: 7,
bottom: 7,
top: 36,
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: [1400, 2000, 1500, 1800, 1490, 900, 310],
itemStyle: {
normal:{
color: '#FF4852',
lineStyle: {
color: '#FF4852'
}
}
}
},
{
name: '其他',
type: 'line',
symbol:'none', //去圆点
data: [1520, 1052, 141, 174, 1690, 250, 220],
itemStyle: {
normal:{
color: '#FF6E25',
lineStyle: {
color: '#FF6E25'
}
}
}
},
{
name: '短视频',
type: 'line',
symbol:'none', //去圆点
data: [210, 322, 551, 364, 960, 1307, 10],
itemStyle: {
normal:{
color: '#FFBF00',
lineStyle: {
color: '#FFBF00'
}
}
}
},
{
name: '微信',
type: 'line',
symbol:'none', //去圆点
data: [250, 362, 71, 374, 970, 130, 170],
itemStyle: {
normal:{
color: '#20CC62',
lineStyle: {
color: '#20CC62'
}
}
}
},
{
name: 'APP',
type: 'line',
symbol:'none', //去圆点
data: [20, 32, 41, 354, 90, 130, 10],
itemStyle: {
normal:{
color: '#00D6D6',
lineStyle: {
color: '#00D6D6'
}
}
}
},
{
name: '论坛',
type: 'line',
symbol:'none', //去圆点
data: [200, 382, 661, 34, 909, 1308, 150],
itemStyle: {
normal:{
color: '#00AAFF',
lineStyle: {
color: '#00AAFF'
}
}
}
},
{
name: '新闻',
type: 'line',
symbol:'none', //去圆点
data: [250, 326, 178, 349, 900, 1300, 140],
itemStyle: {
normal:{
color: '#7257FF',
lineStyle: {
color: '#7257FF'
}
}
}
}
]
}
},
lifetimes: {
attached() {
// setTimeout(() => {
// this.setData({
// showChart: false
// })
// },1000)
},
},
methods: {
priceSel(e){
this.setData({
intervalSel: e.currentTarget.dataset.index
})
},
dynamic(){
wx.navigateTo({
url: "/pages/index/total/tatal"
})
},
}
})