169 lines
4.4 KiB
JavaScript
169 lines
4.4 KiB
JavaScript
/**
|
|
* Created by Administrator on 2017/4/25.
|
|
*/
|
|
$(function(){
|
|
var myChart = echarts.init($("#container")[0]);
|
|
var option = {
|
|
tooltip : {
|
|
trigger: 'item',
|
|
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
},
|
|
legend: {
|
|
orient : 'vertical',
|
|
x : 'left',
|
|
data:['全体会议','常委会议','主体会议','其他']
|
|
},
|
|
toolbox: {
|
|
show : true,
|
|
feature : {
|
|
mark : {show: true},
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {
|
|
show: true,
|
|
type: ['pie', 'funnel'],
|
|
option: {
|
|
funnel: {
|
|
x: '25%',
|
|
width: '50%',
|
|
funnelAlign: 'left',
|
|
max: 1548
|
|
}
|
|
}
|
|
},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
calculable : true,
|
|
series : [
|
|
{
|
|
name:'会议类型',
|
|
type:'pie',
|
|
radius : '55%',
|
|
center: ['50%', '60%'],
|
|
data:[
|
|
{
|
|
value:124,
|
|
name:'全体会议',
|
|
itemStyle:{
|
|
normal:{
|
|
color:""
|
|
}
|
|
}
|
|
},
|
|
{
|
|
value:86,
|
|
name:'常委会议'
|
|
},
|
|
{
|
|
value:9,
|
|
name:'主体会议'
|
|
},
|
|
{
|
|
value:39,
|
|
name:'其他'
|
|
}
|
|
|
|
]
|
|
}
|
|
]
|
|
};
|
|
myChart.setOption(option);
|
|
});
|
|
$(function(){
|
|
var myChart = echarts.init($("#container1")[0]);
|
|
|
|
var option = {
|
|
tooltip : {
|
|
trigger: 'axis',
|
|
axisPointer : { // 坐标轴指示器,坐标轴触发有效
|
|
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
}
|
|
},
|
|
legend: {
|
|
data:[]
|
|
|
|
},
|
|
toolbox: {
|
|
show : true,
|
|
//orient: 'vertical',
|
|
x: 'right',
|
|
y: 'top',
|
|
feature : {
|
|
mark : {show: true},
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
data:['全体会议','常委会议','主体会议','界别会议','其他']
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value'
|
|
}
|
|
],
|
|
series : [
|
|
{
|
|
name:'承办会议(次)',
|
|
type:'bar',
|
|
barWidth:'30',
|
|
data:[542, 927, 652, 521, 157, 20],
|
|
itemStyle: {
|
|
normal: {
|
|
color:"#269fec"
|
|
}
|
|
}
|
|
|
|
}
|
|
]
|
|
};
|
|
myChart.setOption(option);
|
|
});
|
|
$(function(){
|
|
var myChart = echarts.init($("#container2")[0]);
|
|
var option = {
|
|
tooltip: {
|
|
trigger: 'axis'
|
|
},
|
|
legend: {
|
|
data:['邮件营销']
|
|
},
|
|
grid: {
|
|
left: '3%',
|
|
right: '4%',
|
|
bottom: '3%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
feature: {
|
|
saveAsImage: {}
|
|
}
|
|
},
|
|
xAxis: {
|
|
type: 'category',
|
|
boundaryGap: false,
|
|
data: ['周一','周二','周三','周四','周五','周六','周日']
|
|
},
|
|
yAxis: {
|
|
type: 'value'
|
|
},
|
|
series: [
|
|
{
|
|
name:'邮件营销',
|
|
type:'line',
|
|
stack: '总量',
|
|
data:[120, 132, 101, 134, 90, 230, 210]
|
|
}
|
|
]
|
|
};
|
|
myChart.setOption(option);
|
|
});
|
|
|