123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560 |
- $(window).load(function(){$(".loading").fadeOut()})
- $(function () {
- echarts_2()
- echarts_3()
- echarts_4()
- echarts_5()
- echarts_6()
- function echarts_2() {
- // 基于准备好的dom,初始化echarts实例
- var myChart = echarts.init(document.getElementById('echart2'));
- var data = [683, 234, 234, 523, 345, 320, 280, 271, 254, 229, 210, 190, 182]
- var titlename = ['北京', '上海', '广州', '郑州', '武汉', '南京', '杭州', '东莞', '深圳', '虎门', '青岛', '石家庄', '安阳'];
- option = {
- grid: {
- left: '0',
- top:'0',
- right: '0',
- bottom: '0%',
- containLabel: true
- },
- xAxis: {
- show: false
- },
- yAxis: [{
- show: true,
- data: titlename,
- inverse: true,
- axisLine: { show: false},
- splitLine:{ show: false},
- axisTick:{ show: false},
- axisLabel: {
- textStyle: {
- color:'#fff'
- },
- },
- }, {
- show: false,
- inverse: true,
- data: data,
- axisLabel: {textStyle: {color: '#fff'}},
- axisLine: { show: false},
- splitLine:{ show: false},
- axisTick: { show: false},
- }],
- series: [{
- name: '条',
- type: 'bar',
- yAxisIndex: 0,
- data: data,
- barWidth: 15,
- itemStyle: {
- normal: {
- barBorderRadius: 50,
- color:'#1089E7',
- }
- },
- label: {
- normal: {
- show: true,
- position: 'right',
- formatter: '{c}',
- textStyle: {color: 'rgba(255,255,255,.5)'}
- }
- },
- }]
- };
- // 使用刚指定的配置项和数据显示图表。
- myChart.setOption(option);
- window.addEventListener("resize",function(){
- myChart.resize();
- });
- }
- function echarts_3() {
- // 基于准备好的dom,初始化echarts实例
- var myChart = echarts.init(document.getElementById('echart3'));
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- lineStyle: {
- color: '#dddc6b'
- }
- }
- },
- grid: {
- left: '10',
- top: '20',
- right: '30',
- bottom: '10',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLabel: {
- textStyle: {
- color: "rgba(255,255,255,.6)",
- fontSize:14,
- },
- },
- axisLine: {
- lineStyle: {
- color: 'rgba(255,255,255,.2)'
- }
- },
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
- }, {
- axisPointer: {show: false},
- axisLine: { show: false},
- position: 'bottom',
- offset: 20,
-
- }],
- yAxis: [{
- type: 'value',
- axisTick: {show: false},
- splitNumber: 4,
- axisLine: {
- lineStyle: {
- color: 'rgba(255,255,255,.1)'
- }
- },
- axisLabel: {
- textStyle: {
- color: "rgba(255,255,255,.6)",
- fontSize:16,
- },
- },
- splitLine: {
- lineStyle: {
- color: 'rgba(255,255,255,.1)',
- type: 'dotted',
- }
- }
- }],
- series: [
- {
- name: '结算率',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 5,
- showSymbol: false,
- lineStyle: {
-
- normal: {
- color: 'rgba(31, 174, 234, 1)',
- width: 2
- }
- },
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: 'rgba(31, 174, 234, 0.4)'
- }, {
- offset: 0.8,
- color: 'rgba(31, 174, 234, 0.1)'
- }], false),
- shadowColor: 'rgba(0, 0, 0, 0.1)',
- }
- },
- itemStyle: {
- normal: {
- color: '#1f7eea',
- borderColor: 'rgba(31, 174, 234, .1)',
- borderWidth: 5
- }
- },
- data: [3, 6, 3, 6, 3, 9, 3,12, 6, 8, 3, 5, 9, 3]
- },
- ]
- };
- // 使用刚指定的配置项和数据显示图表。
- myChart.setOption(option);
- window.addEventListener("resize",function(){
- myChart.resize();
- });
- }
- function echarts_4() {
- // 基于准备好的dom,初始化echarts实例
- var myChart = echarts.init(document.getElementById('echart4'));
- var option = {
-
- grid: {
- left: '0',
- top: '30',
- right: '0',
- bottom: '10',
- containLabel: true
- },
- legend: {
- top: 0,
- textStyle: {
- color: "#fff",
- },
- itemWidth: 10, // 设置宽度
- itemHeight: 10, // 设置高度
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- data: ["西进口右转","北进口直行","南进口直行",],
- axisTick: { //---坐标轴 刻度
- show: true, //---是否显示
- },
- axisLine: { //---坐标轴 轴线
- show: true, //---是否显示
- lineStyle: {
- color: 'rgba(255,255,255,.1)',
- width: 1,
- type: 'dotted',
- },
- },
- axisLabel: {//X轴文字
- textStyle: {
- fontSize: 12,
- color: '#fff'
- },
- },
- },
- yAxis: {
- type: 'value',
- splitLine: {//分割线
- show: true,
- lineStyle: {
- color: 'rgba(255,255,255,.1)',
- width: 1,
- type: 'dotted'
- }
- },
- axisLabel: {//Y轴刻度值
- formatter: '{value}',
- textStyle: {
- fontSize: 12,
- color: '#fff'
- },
- },
- axisLine: { //---坐标轴 轴线
- show: false, //---是否显示
- },
- },
- series: [{
- name: '原方案',
- type: 'bar',
- data: [3, 7,4],
- barWidth: 15,
-
- barGap: 1, //柱子之间间距 //柱图宽度 两种情况都要设置,设置series 中对应数据柱形的itemStyle属性下的emphasis和normal的barBorderRadius属性初始化时候圆角 鼠标移上去圆角
- itemStyle: {
- normal: {
- barBorderRadius: 50,
- color: "#446ACF",
- }
- },
- }, {
- name: '建议方案',
- type: 'bar',
- data: [6, 2,5],
- barWidth: 15, //柱图宽度
-
- itemStyle: {
- normal: { //设置颜色的渐变
- barBorderRadius: 50,
- color: "#4fb69d",
- }
- },
- }]
- };
- // 使用刚指定的配置项和数据显示图表。
- myChart.setOption(option);
- window.addEventListener("resize",function(){
- myChart.resize();
- });
- }
- function echarts_5() {
- // 基于准备好的dom,初始化echarts实例
- var myChart = echarts.init(document.getElementById('echart5'));
- option = {
- legend: {
- orient: 'vertical',
- itemWidth: 10,
- itemHeight: 10,
- textStyle:{
- color:'rgba(255,255,255,.5)'
- },
- top:'20%',
- right:30,
- data:['已入驻','已出售','已租赁','闲置房产']
- },
- color: ['#37a2da','#32c5e9','#9fe6b8','#ffdb5c','#ff9f7f','#fb7293','#e7bcf3','#8378ea'],
- tooltip : {
- trigger: 'item',
- formatter: "{b} : {c} ({d}%)"
- },
-
- calculable : true,
- series : [
- {
-
- type:'pie',
- radius : [20, 70],
- center: ["35%", "50%"],
- roseType : 'area',
- data:[
- {value:300, name:'已入驻'},
- {value:200, name:'已出售'},
- {value:205, name:'已租赁'},
- {value:180, name:'闲置房产'},
-
- ],
- label: {
- normal: {
- formatter: function(param) {
- return param.name +':\n' + param.value +'\n';
- }
-
- }
- },
- labelLine: {
- normal: {
- length:5,
- length2:15,
- lineStyle: { width: 1}
- }
- },
-
- itemStyle: {
- normal: {
- shadowBlur: 30,
- shadowColor: 'rgba(0, 0, 0, 0.4)'
- }
-
- },
- }
- ]
- };
- myChart.setOption(option);
- window.addEventListener("resize",function(){
- myChart.resize();
- });
- }
- function echarts_6() {
- // 基于准备好的dom,初始化echarts实例
- var myChart = echarts.init(document.getElementById('echart6'));
- option = {
-
- tooltip: {
- trigger: 'axis'
- },
- radar: [{
- indicator: [{
- text: '盈利能力',
- max: 100
- }, {
- text: '发展水平',
- max: 100
- }, {
- text: '融资能力',
- max: 100
- }, {
- text: '技术能力',
- max: 100
- }, {
- text: '企业规模',
- max: 100
- }],
- textStyle: {
- color: 'red'
- },
- center: ['50%', '50%'],
- radius: '70%',
- startAngle: 90,
- splitNumber: 4,
- shape: 'circle',
-
- name: {
- padding:-5,
- formatter: '{value}',
- textStyle: {
-
- color: 'rgba(255,255,255,.5)'
- }
- },
- splitArea: {
- areaStyle: {
- color: 'rgba(255,255,255,.05)'
- }
- },
- axisLine: {
- lineStyle: {
- color: 'rgba(255,255,255,.05)'
- }
- },
- splitLine: {
- lineStyle: {
- color: 'rgba(255,255,255,.05)'
- }
- }
- }, ],
- series: [{
- name: '雷达图',
- type: 'radar',
- tooltip: {
- trigger: 'item'
- },
- data: [{
- name: '园区平均值',
- value: [90, 80, 20, 10, 30],
- lineStyle: {
- normal: {
- color:'#03b48e',
- width:2,
- }
- },
- areaStyle: {
- normal: {
- color: '#03b48e',
- opacity:.4
- }
- },
- symbolSize: 0,
-
- }, {
- name: '当前园区',
- value: [30, 20, 75, 80, 70],
- symbolSize: 0,
- lineStyle: {
- normal: {
- color:'#3893e5',
- width:2,
- }
- },
- areaStyle: {
- normal: {
- color: 'rgba(19, 173, 255, 0.5)'
- }
- }
- }]
- }, ]
- };
- myChart.setOption(option);
- window.addEventListener("resize",function(){
- myChart.resize();
- });
- }
- })
-
-
-
-
|