prod
parent
d9f565ec30
commit
2f53e57543
@ -0,0 +1,83 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-10-09 12:38:34
|
||||||
|
* @LastEditTime: 2021-10-14 11:48:19
|
||||||
|
* @LastEditors: Please set LastEditors
|
||||||
|
* @Description: In User Settings Edit
|
||||||
|
* @FilePath: /data-show/src/views/Index/tailInsight/opt.js
|
||||||
|
*/
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||||
|
export default function createOptD1(dx=[],ds=[]) {
|
||||||
|
return {
|
||||||
|
grid: {
|
||||||
|
left: 16,
|
||||||
|
right: '5%',
|
||||||
|
bottom: 10,
|
||||||
|
top: "1%",
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: "axis",
|
||||||
|
backgroundColor: "#08182F",
|
||||||
|
color: "#fff",
|
||||||
|
borderColor: "#3373CC",
|
||||||
|
textStyle: {
|
||||||
|
color: "#fff", //设置文字颜色
|
||||||
|
},
|
||||||
|
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'value',
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
lineStyle: {
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: (value) => {
|
||||||
|
let str = bigNumberTransform(value);
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
type: "dashed", // y轴分割线类型
|
||||||
|
color: "#012b4b",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: dx,
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
lineStyle: {
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inverse: true
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '2011',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
data: ds,
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
|
||||||
|
offset: 0,
|
||||||
|
color: '#010B19'
|
||||||
|
}, {
|
||||||
|
offset: 1,
|
||||||
|
color: '#2f68b4'
|
||||||
|
}]),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-10-14 11:53:16
|
||||||
|
* @LastEditTime: 2021-11-04 17:17:02
|
||||||
|
* @LastEditors: Please set LastEditors
|
||||||
|
* @Description: In User Settings Edit
|
||||||
|
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/opt2.js
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default function createOptD2(dm) {
|
||||||
|
return {
|
||||||
|
tooltip: {
|
||||||
|
trigger: "item",
|
||||||
|
backgroundColor: "#08182F",
|
||||||
|
color: "#fff",
|
||||||
|
borderColor: "#3373CC",
|
||||||
|
textStyle: {
|
||||||
|
color: "#fff", //设置文字颜色
|
||||||
|
},
|
||||||
|
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||||
|
},
|
||||||
|
// geo: {
|
||||||
|
// show: true,
|
||||||
|
// map: 'china',
|
||||||
|
// roam: false,//地图设置不可拖拽,固定的
|
||||||
|
// itemStyle: {
|
||||||
|
// normal: {
|
||||||
|
// borderWidth: 0,
|
||||||
|
// shadowColor: 'rgba(0,54,255, 1)',
|
||||||
|
// shadowBlur: 100
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
visualMap: {
|
||||||
|
type: 'continuous',
|
||||||
|
show: false,
|
||||||
|
min: 0,
|
||||||
|
max: 2000,
|
||||||
|
text: ['高', '低'],
|
||||||
|
orient: 'horizontal',
|
||||||
|
itemWidth: 15,
|
||||||
|
itemHeight: 200,
|
||||||
|
right: 0,
|
||||||
|
bottom: 30,
|
||||||
|
inRange: {
|
||||||
|
color: ['#0393d2', '#75ddff']
|
||||||
|
},
|
||||||
|
textStyle: {
|
||||||
|
color: 'white'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "微博区域",
|
||||||
|
type: "map",
|
||||||
|
mapType: "china",
|
||||||
|
roam: false,
|
||||||
|
zoom: 1,//默认地图在容器中显示zoom:1,可根据需求放大缩小地图
|
||||||
|
left: 16,
|
||||||
|
top: 20,
|
||||||
|
right: 10,
|
||||||
|
bottom: 10,
|
||||||
|
selectedMode:'multiple',
|
||||||
|
colorBy: 'data',
|
||||||
|
itemStyle: {
|
||||||
|
areaColor: '#001f5b',//地图区域背景颜色
|
||||||
|
borderColor: '#005cf9',//地图边界颜色
|
||||||
|
shadowColor: '#005cf9',
|
||||||
|
emphasis: {
|
||||||
|
areaColor: '#3066ba',//鼠标滑过区域颜色
|
||||||
|
label: {
|
||||||
|
color: '#fff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
normal: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// select: {
|
||||||
|
// label: {
|
||||||
|
// show: false
|
||||||
|
// },
|
||||||
|
// itemStyle: {
|
||||||
|
// areaColor: '#3edffe'
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
data: dm
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-10-14 19:32:39
|
||||||
|
* @LastEditTime: 2021-11-11 09:46:12
|
||||||
|
* @LastEditors: Please set LastEditors
|
||||||
|
* @Description: In User Settings Edit
|
||||||
|
* @FilePath: /data-show/src/views/WeiboDetails/weiboSpreadFission/opt.js
|
||||||
|
*/
|
||||||
|
export default function createOpt(data) {
|
||||||
|
return {
|
||||||
|
tooltip: {
|
||||||
|
trigger: "item",
|
||||||
|
backgroundColor: "#08182F",
|
||||||
|
color: "#fff",
|
||||||
|
borderColor: "#3373CC",
|
||||||
|
textStyle: {
|
||||||
|
color: "#fff", //设置文字颜色
|
||||||
|
},
|
||||||
|
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
show: false,
|
||||||
|
text: 'NPM Dependencies'
|
||||||
|
},
|
||||||
|
animationDurationUpdate: 1500,
|
||||||
|
animationEasingUpdate: 'quinticInOut',
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'graph',
|
||||||
|
layout: 'none',
|
||||||
|
// progressiveThreshold: 700,
|
||||||
|
data: data.nodes.map(function (node) {
|
||||||
|
return {
|
||||||
|
x: node.x,
|
||||||
|
y: node.y,
|
||||||
|
id: node.id,
|
||||||
|
name: node.name,
|
||||||
|
value: node.value,
|
||||||
|
symbolSize: node.symbolSize,
|
||||||
|
itemStyle: {
|
||||||
|
color: node.color
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
links: data.edges.map(function (edge) {
|
||||||
|
return {
|
||||||
|
source: edge.source,
|
||||||
|
target: edge.target
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
emphasis: {
|
||||||
|
focus: 'adjacency',
|
||||||
|
label: {
|
||||||
|
position: 'right',
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
color: '#fff',
|
||||||
|
position: 'right',
|
||||||
|
formatter: '{b}'
|
||||||
|
},
|
||||||
|
labelLayout: {
|
||||||
|
hideOverlap: true
|
||||||
|
},
|
||||||
|
scaleLimit: {
|
||||||
|
min: 0.4,
|
||||||
|
max: 2
|
||||||
|
},
|
||||||
|
roam: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: 'source',
|
||||||
|
width: 0.5,
|
||||||
|
curveness: 0.3,
|
||||||
|
opacity: 0.7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue