|
|
|
|
@ -1124,7 +1124,7 @@ const lineChartTwo = function (data, id, unit = '') {
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
fontSize: 0.5 * vw,
|
|
|
|
|
fontSize: 0.8 * vw,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
@ -1331,7 +1331,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
|
color: "#14bd2d",
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
fontSize: 0.5 * vw,
|
|
|
|
|
fontSize: 0.8 * vw,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
@ -1363,7 +1363,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
|
color: "#3094ea",
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
fontSize: 0.5 * vw,
|
|
|
|
|
fontSize: 0.8 * vw,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
@ -1481,6 +1481,93 @@ const pieChart = function (data, id, unit = '次') {
|
|
|
|
|
charts.setOption(option);
|
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
|
}
|
|
|
|
|
const pieChartTwo = function (data, id, unit = '次') {
|
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
|
if (!data) {
|
|
|
|
|
data = [
|
|
|
|
|
{
|
|
|
|
|
value: 285,
|
|
|
|
|
name: "类型1",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 410,
|
|
|
|
|
name: "类型2",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 274,
|
|
|
|
|
name: "类型3",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 235,
|
|
|
|
|
name: "类型4",
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (data.length === 0) {
|
|
|
|
|
data = [{
|
|
|
|
|
value: 0,
|
|
|
|
|
name: ''
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
let option = {
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: "item",
|
|
|
|
|
formatter: "{b} : {c} ({d}%)",
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: 0.8 * vw
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: "访问来源",
|
|
|
|
|
type: "pie",
|
|
|
|
|
radius: "50%",
|
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
|
colorBy: 'data',
|
|
|
|
|
// color: ["rgb(131,249,103)", "#FBFE27", "#FE5050", "#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
|
|
|
|
|
data: data,
|
|
|
|
|
roseType: "radius",
|
|
|
|
|
overflow:'break',
|
|
|
|
|
label: {
|
|
|
|
|
normal: {
|
|
|
|
|
formatter: `{b|{b}} \n {c|{c}${unit}}`,
|
|
|
|
|
rich: {
|
|
|
|
|
c: {
|
|
|
|
|
color: "rgb(241,246,104)",
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
lineHeight: 5,
|
|
|
|
|
},
|
|
|
|
|
b: {
|
|
|
|
|
color: "rgb(98,137,169)",
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
height: 1.5 * vw,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
emphasis: {
|
|
|
|
|
label: {
|
|
|
|
|
fontSize: 0.75 * vw
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
labelLine: {
|
|
|
|
|
normal: {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: "rgb(98,137,169)",
|
|
|
|
|
},
|
|
|
|
|
smooth: true,
|
|
|
|
|
length: 20,
|
|
|
|
|
length2: 20,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
charts.setOption(option);
|
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 垂直柱状图
|
|
|
|
|
const verticalBarChart = function (data, id, unit = '次') {
|
|
|
|
|
|