12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598 |
- var Constant = {
- //------------------------柱状图系列--------------------------------
- //基础柱状图 基础折线图 --没有图例
- basicChartOption:{
- color: ['#3398DB'],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'none' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- top: 35,
- bottom: 30,
- left: 20,
- right: 20,
- containLabel: true
- },
- xAxis : [
- {
- type : 'category',
- data : [],
- axisTick: { //x轴刻度线
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- alignWithLabel: true
- },
- axisLabel: { //X轴标签内容
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- fontSize:12, //默认值为12
- label:{
- rich:{}
- }
- }
- }
- ],
- yAxis : [
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- type : 'value',
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- splitLine:{
- show : true,
- lineStyle:{
- color:['#eef1f4']
- }
- }
- }
- ],
- series : [
- // {
- // name:'',
- // type:'bar', //type:'line'为折线图
- // barWidth: '60%', //折线图没有barwidth
- // data:[]
- // }
- ]
- },
- //基础柱状图 基础折线图 --有图例
- barAndLineChartOption:{
- color: ['#77d8ff','#ebb22b','#7e95fa','#0d7ad5','#e58e10','#14c4ea','#deaf3f','#0d7ad5','#b1d55b','#2ca6ef'],
- title:{
- text:'',
- textStyle:{
- }
- },
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'none' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- bottom:5,
- data:[]
- },
- grid: {
- top:60,
- bottom: 30,
- left: 20,
- right: 20,
- containLabel: true
- },
- xAxis : [
- {
- type : 'category',
- data : [],
- axisLine:{},
- axisTick: { //x轴刻度线
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- alignWithLabel: true
- },
- axisLabel: { //X轴标签内容
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- fontSize:12, //默认值为12
- label:{
- rich:{}
- }
- }
- }
- ],
- yAxis : [
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- type : 'value',
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- splitLine:{
- show : true,
- lineStyle:{
- color:['#eef1f4']
- }
- }
- }
- ],
- series : [
- // {
- // name:'',
- // type:'bar', //type:'line'为折线图
- // barWidth: '60%', //折线图没有barwidth
- // data:[]
- // }
- ]
- },
- //基础柱状图 基础折线图 --有图例 --底部无空余
- barAndLineNoMarginChartOption:{
- color: ['#77d8ff','#ebb22b','#7e95fa','#0d7ad5','#e58e10','#14c4ea','#deaf3f','#0d7ad5','#b1d55b','#2ca6ef'],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'none' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- top:5,
- right: 20,
- data:[]
- },
- grid: {
- top:30,
- bottom: 5,
- left: 20,
- right: 20,
- containLabel: true
- },
- xAxis : [
- {
- type : 'category',
- data : [],
- axisTick: { //x轴刻度线
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- alignWithLabel: true
- },
- axisLabel: { //X轴标签内容
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- fontSize:12, //默认值为12
- label:{
- rich:{}
- }
- }
- }
- ],
- yAxis : [
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- type : 'value',
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- splitLine:{
- show : true,
- lineStyle:{
- color:['#eef1f4']
- }
- }
- }
- ],
- series : [
- // {
- // name:'',
- // type:'bar', //type:'line'为折线图
- // barWidth: '60%', //折线图没有barwidth
- // data:[]
- // }
- ]
- },
- //基础折线阴影图
- lineAreashadowChartOpt: {
- color:[],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'none' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- top:0,
- bottom:0,
- left:0,
- right:0,
- width:'100%',
- height:'100%',
- containLabel: false
- },
- xAxis: {
- type: 'category',
- show:false,
- boundaryGap : false,
- data: []
- },
- yAxis: {
- type: 'value',
- scale:true,
- show:false
- },
- series: []
- },
- //双Y轴 基础柱状图 基础折线图
- yAxisDoubleChartOption:{
- title : {
- text:'',
- textStyle:{
- fontSize: 16,
- }
- },
- color:['#5793f3', '#d14a61'],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'none' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- top:20,
- data:[]
- },
- grid: { //上下左右边距
- top:60,
- bottom: 30,
- left: 20,
- right: 20,
- containLabel: true
- },
- xAxis : [
- {
- type : 'category',
- data : [],
- axisTick: { //x轴刻度线
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- alignWithLabel: true
- },
- axisLabel: { //X轴标签内容
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- fontSize:12, //默认值为12
- label:{
- rich:{}
- }
- }
- }
- ],
- yAxis : [
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- type : 'value',
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- splitLine:{
- show : true,
- lineStyle:{
- color:['#eef1f4']
- }
- }
- },
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- position : 'right',
- type : 'value',
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- splitLine:{
- show : true,
- lineStyle:{
- color:['#eef1f4']
- }
- }
- }
- ],
- series : [
- {
- name: '',
- type: 'bar',
- yAxisIndex:0,
- symbol: "none",
- barWidth :15,
- smooth: true,
- itemStyle: {
- LineStyle: {
- width: 0
- }
- },
- data: []
- },
- {
- name: '',
- type: 'line',
- yAxisIndex:1,
- symbol: "none",
- smooth: true,
- itemStyle: {
- LineStyle: {
- width: 0
- }
- },
- data: []
- }
- ]
- },
- //y轴堆叠条形图
- yStackBaroption: {
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend:{
- show:false,
- data:[],
- selected: {},
- },
- grid: {
- top:0,
- left: 0,
- right: 0,
- bottom: 0,
- containLabel: true
- },
- xAxis:[
- {
- type: 'value',
- axisLine:{
- show:false,
- },
- axisTick:{
- show:false
- },
- axisLabel:{
- show:false
- },
- splitLine:{
- show:false
- }
- },
- ],
- yAxis: [
- {
- type: 'category',
- inverse: true,
- boundaryGap:true,
- axisLine:{
- show:true,
- lineStyle:{
- color:'#e6e9ee',
- },
- },
- axisTick:{
- show:false
- },
- axisLabel:{
- show:true,
- color:'#333',
- },
- splitLine:{
- show:true,
- lineStyle:{
- color:['#e6e9ee']
- }
- },
- data: []
- },
- {
- type: 'category',
- axisLine:{
- show:true,
- lineStyle:{
- color:'#e6e9ee',
- },
- },
- }
- ],
- series: []
- },
- //堆叠区域图 堆叠折线图
- stackAeraChartOption : {
- color:["#9196f5","#2ca6ef","#b1d55b","#0d7ad5","#77d8ff"],
- title: {
- text: '',
- textStyle:{
- }
- },
- tooltip : {
- trigger: 'axis',
- axisPointer: {
- type: 'line',
- label: {
- backgroundColor: '#6a7985' //这个还不知道有啥用,文档说是文本标签的背景颜色,但是改了没效果
- }
- }
- },
- toolbox:[],
- legend: {
- top:20,
- itemGap:10, //[ default: 10 ] 图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
- itemWidth:25,//[ default: 25 ] 图例标记的图形宽度。
- selectedMode:true,//[ default: true ] 图例选择的模式,控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 false 关闭。除此之外也可以设成 'single' 或者 'multiple' 使用单选或者多选模式。
- data:[]
- },
- grid: { //上下左右边距
- top:60,
- bottom: 30,
- left: 20,
- right: 20,
- containLabel: true //true表示『防止标签溢出』,边距从X轴内容和Y轴内容开始计算,false只从刻度轴那个线开始算
- },
- xAxis : [
- {
- type : 'category',
- boundaryGap : false,
- data : [],
- axisLine:{},
- axisTick: { //x轴刻度线
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- alignWithLabel: true
- },
- axisLabel: { //X轴标签内容
- interval:'auto', //默认auto,0表示强制全显示,1表示间隔1个显示
- fontSize:12, //默认值为12
- label:{
- rich:{}
- }
- }
- }
- ],
- yAxis : [
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- type : 'value',
- scale: false, //[ default: false ],只在数值轴中(type: 'value')有效。是否是脱离 0 值比例。设置成 true 后坐标刻度不会强制包含零刻度。在双数值轴的散点图中比较有用。在设置 min 和 max 之后该配置项无效。
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- splitLine:{
- show : true,
- lineStyle:{
- color:['#eef1f4']
- }
- }
- }
- ],
- series : [
- // {
- // name:'',
- // type:'line',
- // stack: '总量',
- // areaStyle: {},
- // data:[]
- // }
- ]
- },
- //------------------------饼图系列-----------------------------------
- // 百分比饼图(无图例)
- percentPieChartOpt:{
- title: {
- text: '80%',
- x: 'center',
- y: 'center',
- textStyle: {
- fontWeight: 'normal',
- // color: '#0580f2',
- fontSize: '28'
- }
- },
- color: ['rgba(176, 212, 251, 0.3)'],
- legend: {
- show: false,
- itemGap: 12,
- data: ['01', '02']
- },
- series: [{
- name: 'Line 1',
- type: 'pie',
- clockWise: true,
- radius: ['45%', '53%'],
- itemStyle: {
- normal: {
- label: {
- show: false
- },
- labelLine: {
- show: false
- }
- }
- },
- hoverAnimation: false,
- data: [{
- value: 80,
- name: '01',
- itemStyle: {
- normal: {
- color: [ // 完成的圆环的颜色
- '#367bec'
- ],
- label: {
- show: false
- },
- labelLine: {
- show: false
- }
- }
- }
- }, {
- name: '02',
- value: 20
- }]
- }]
- },
- //基础饼图 基础环形图
- basicPieChartOpt:{
- color:['#77d8ff','#ebb22b','#7e95fa','#0d7ad5','#e58e10','#14c4ea','#deaf3f','#0d7ad5','#b1d55b','#2ca6ef'],
- tooltip: {
- trigger: 'item',
- formatter: '{a} <br/>{b}: {c} ({d}%)'
- },
- title : {
- text:'',
- x:'center',
- subtext:'',
- itemGap: 1,
- textStyle:{
- fontSize: 18,
- color: "#000",
- align: "center",
- }
- },
- legend: {
- show:true,
- orient: 'horizontal',
- left: 'center',
- data: [],
- textStyle:{
- color:"#000",
- fontSize: 12,
- },
- bottom: 0,
- },
- grid: {
- containLabel: true
- },
- series : [
- {
- name: '',
- type: 'pie',
- radius : ['0%','60%'], //饼图内环比例(0%默认为圆心)和外环比例
- center: ['50%', '50%'], //饼图圆心距离左侧和顶端距离
- data: [],
- itemStyle: {
- emphasis: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- },
- label: {
- normal: {
- show:true,
- formatter: "{b}( {d}%)"
- }
- },
- labelLine:{
- show:true, //标签视觉引导线
- length:10, //第一段引导线长度
- length2:10, //第二段引导线长度
- }
- }
- ]
- },
- //半环进度图
- halfDoughnutProgressChartOpt:{
- grid: {
- top:0,
- bottom:0,
- left:0,
- right:0,
- width:'100%',
- height:'100%',
- containLabel: false
- },
- legend: [
- {
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- right:'70%',
- top : '0%',
- align: 'right',
- data: ['未交地\n300宗'],
- },{
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- left : '70%',
- top : '0%',
- align: 'left',
- data: ['到期未交地\n150宗'],
- },{
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- right:'70%',
- top : '27%',
- align: 'right',
- data: ['未竣工\n300宗'],
- },{
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- left : '70%',
- top : '27%',
- align: 'left',
- data: ['到期未竣工\n150宗'],
- },{
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- right:'70%',
- bottom : '27%',
- align: 'right',
- data: ['未缴出让金\n300宗'],
- },{
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- left : '70%',
- bottom : '27%',
- align: 'left',
- data: ['到期未缴出让金\n150宗'],
- },{
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- right:'70%',
- bottom : '0%',
- align: 'right',
- data: ['未开工\n300宗'],
- },{
- orient: 'vertical',
- itemWidth:10,
- itemHeight:10,
- textStyle:{
- fontSize:12,
- },
- left : '70%',
- bottom : '0%',
- align: 'left',
- data: ['到期未开工\n150宗'],
- }
- ],
- series: [
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- center:['50%','55%'],
- radius: ['70%', '65%'],
- startAngle:225,
- label:{
- show:false
- },
- data:[
- {
- value:300,
- name:'未交地\n300宗',
- itemStyle:{
- color:'rgba(59,205,253,0.5)'
- },
- },
- {
- value:100,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- },
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- center:['50%','55%'],
- radius: ['70%', '65%'],
- startAngle:225,
- label:{
- show:false
- },
- data:[
- {
- value:150,
- name:'到期未交地\n150宗',
- itemStyle:{
- color:'rgba(59,205,253,1)'
- },
- },
- {
- value:250,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- },
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- startAngle:225,
- center:['50%','55%'],
- radius: ['60%', '55%'],
- label:{
- show:false
- },
- data:[
- {
- value:300,
- name:'未竣工\n300宗',
- itemStyle:{
- color:'rgba(66,206,173,0.5)'
- },
- },
- {
- value:100,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- },
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- startAngle:225,
- center:['50%','55%'],
- radius: ['60%', '55%'],
- label:{
- show:false
- },
- data:[
- {
- value:150,
- name:'到期未竣工\n150宗',
- itemStyle:{
- color:'rgba(66,206,173,1)'
- },
- },
- {
- value:250,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- },
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- startAngle:225,
- center:['50%','55%'],
- radius: ['50%', '45%'],
- label:{
- show:false
- },
- data:[
- {
- value:300,
- name:'未缴出让金\n300宗',
- itemStyle:{
- color:'rgba(182,100,237,0.5)'
- },
- },
- {
- value:100,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- },
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- startAngle:225,
- center:['50%','55%'],
- radius: ['50%', '45%'],
- label:{
- show:false
- },
- data:[
- {
- value:150,
- name:'到期未缴出让金\n150宗',
- itemStyle:{
- color:'rgba(182,100,237,1)'
- },
- },
- {
- value:250,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- },
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- startAngle:225,
- center:['50%','55%'],
- radius: ['40%', '35%'],
- label:{
- show:false
- },
- data:[
- {
- value:300,
- name:'未开工\n300宗',
- itemStyle:{
- color:'rgba(238,67,159,0.5)'
- },
- },
- {
- value:100,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- },
- {
- name:'访问来源',
- type:'pie',
- silent:true,
- startAngle:225,
- center:['50%','55%'],
- radius: ['40%', '35%'],
- label:{
- show:false
- },
- data:[
- {
- value:150,
- name:'到期未开工\n150宗',
- itemStyle:{
- color:'rgba(238,67,159,1)'
- },
- },
- {
- value:250,
- name:'',
- itemStyle:{
- color:'rgba(0,0,0,0)'
- },
- }
- ]
- }
- ]
- },
- //双Y轴自定义画报图
- doubleyAxispictorialBarOption: {
- title: {
- text:'',
- // top:20,
- left:20,
- textStyle:{
- height: 40,
- lineHeight:40,
- }
- },
- grid: {
- top: 60,
- left: 20,
- right: 20,
- bottom: 20,
- containLabel: true
- },
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend:{
- show:true,
- top:20,
- right:20,
- data:[],
- },
- xAxis: [
- {
- type: 'category',
- data: ['梁溪区','某某区','惠山区','滨湖区','新吴区','江阴市','宜兴市'],
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisLabel: {
- textStyle: {
- color: '#b6b5ab'
- }
- }
- }
- ],
- yAxis: [
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- position : 'left',
- type : 'value',
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- axisLabel:{
- show : true,
- margin : 20,
- lineStyle:{
- color:'#333'
- }
- },
- splitLine:{
- show : true,
- lineStyle:{
- color:['#eef1f4']
- }
- }
- },
- {
- show : true, //默认为true,false时隐藏Y轴包括内容
- position : 'right',
- type : 'value',
- axisTick:{
- show : false,
- },
- axisLine:{
- show : false,
- },
- axisLabel:{
- show : true,
- margin : 20,
- lineStyle:{
- color:'#333'
- }
- },
- splitLine:{
- show : false,
- }
- }
- ],
- series: [
- {
- name: '面积',
- type: 'pictorialBar',
- yAxisIndex: 0,
- barCategoryGap: '-80%',
- symbol: 'path://M0,0 L5,5 C5.5,5 5.5,5 5,0 C4.5,5 4.5,5 0,5 z',
- itemStyle: {
- normal: {
- color: 'rgba(244,165,28,0.6)'
- },
- },
- data: [138,114,714,442,622,528,328],
- },
- {
- name: "宗数",
- type: "line",
- yAxisIndex: 1,
- itemStyle: {
- normal: {
- color: '#51d1b0'
- },
- },
- data: [14.89,79.49,75.8,19.8,44.5,87.3,67.3],
- }
- ]
- },
- //双向Bar图
- oppositeBarOption: {
- title: {
- text:'',
- textStyle: {
- },
- },
- legend: {
- data: ['期初储备', '期末储备'],
- top:'top',
- x: 'center',
- },
- tooltip: {
- show: true,
- trigger: 'axis',
- axisPointer: {
- type: 'shadow',
- }
- },
- grid: [{
- show: false,
- left: 20,
- right:'48%', //需要调整为固定值,保证y轴label居中
- top: 20,
- bottom: 20,
- containLabel: false,
- }, {
- show: false,
- left:'50%',
- right: 20,
- top: 20,
- bottom: 20,
- containLabel: false,
- }, ],
- xAxis: [
- {
- type: 'value',
- inverse: true,
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- position: 'top',
- axisLabel: {
- show: true,
- margin:0,
- textStyle: {
- color: '#697d98',
- },
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: '#e6e9ee',
- },
- },
- }, {
- gridIndex: 1,
- type: 'value',
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- position: 'top',
- axisLabel: {
- show: true,
- margin:0,
- textStyle: {
- color: '#697d98',
- },
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: '#e6e9ee',
- },
- },
- }, ],
- yAxis: [{
- type: 'category',
- inverse: true,
- position: 'right',
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- show: true,
- margin: 60, //调整label到左侧y轴距离,保证左右间距相等
- textStyle: {
- color: '#333333',
- align:'center'
- },
- },
- data: ['梁溪区', '某某区', '惠山区', '滨湖区', '新吴区', '江阴市', '宜兴市'],
- }, {
- gridIndex: 1,
- type: 'category',
- inverse: true,
- position: 'left',
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- show: false,
- },
- data: ['梁溪区', '某某区', '惠山区', '滨湖区', '新吴区', '江阴市', '宜兴市'],
- }, ],
- series: [{
- name: '期初储备',
- type: 'bar',
- barGap: 20,
- barWidth: 20,
- itemStyle: {
- normal: {
- color: '#45ceae',
- },
- },
- data: [389, 259, 262, 324, 232, 176, 196],
- },
- {
- name: '期末储备',
- type: 'bar',
- barGap: 20,
- barWidth: 20,
- xAxisIndex: 1,
- yAxisIndex: 1,
- itemStyle: {
- normal: {
- color: '#00b0f8',
- },
- },
- data: [121, 388, 233, 309, 133, 308, 297],
- }
- ],
- },
- // 地图基础
- mapOption : {
- tooltip: {
- trigger: "item",
- formatter: "{b}<br/>{c}(亩)"
- },
- visualMap: {
- min: 800,
- max: 50000,
- text: ["高", "低"],
- realtime: false,
- calculable: true,
- inRange: {
- color: ["#aacee8", "#6ab0ea"]
- }
- },
- series: [
- {
- name: "",
- type: "map",
- mapType: "wuxi", // 自定义扩展图表类型
- itemStyle: {
- normal: {
- label: {
- show: true
- }
- },
- emphasis: {
- label: {
- show: true
- }
- }
- },
- label: {
- normal: {
- show: true,
- textStyle: {
- color: '#fff'
- }
- }
- },
- layoutCenter: ["55%", "45%"],
- layoutSize: "95%",
- data: []
- }
- ]
- },
- // 水波波纹图
- waterChartOption : {
- series: [{
- type: 'liquidFill',
- // data: [0.6, 0.5, 0.4, 0.3],
- data: [0.6],
- direction: 'right', //波浪方向或者静止
- radius: '80%',
- // 水球颜色
- color: ['#00c2ff'],
- center: ['50%', '50%'], //水球位置
- // outline 外边
- outline: {
- // show: false
- borderDistance: 2, //内环padding值
- itemStyle: {
- borderWidth: 2, //圆边线宽度
- borderColor: '#00c2ff',
- },
- },
- label: {
- normal: {
- formatter: (0.6).toFixed(2) + '%', //重置百分比字体为空
- // textStyle: {
- color: '#333',
- fontSize: 22
- // }
- }
- }
- }]
- },
- // 多球散点图
- ballsOption : {
- grid: {
- show: false,
- top: 10,
- bottom: 10
- },
- tooltip:{
- formatter:'{b}'
- },
- xAxis: [
- {
- gridIndex: 0,
- type: 'value',
- show: false,
- min: 0,
- max: 100,
- nameLocation: 'middle',
- nameGap: 5
- }
- ],
- yAxis: [
- {
- gridIndex: 0,
- min: 0,
- show: false,
- max: 100,
- nameLocation: 'middle',
- nameGap: 30
- }
- ],
- series: [
- {
- type: 'scatter',
- label: {
- normal: {
- show: true,
- formatter: '{b}',
- color: '#fff',
- textStyle: {
- fontSize: '12'
- }
- },
- },
- data: []
- }
- ]
- },
- // 日历图
- calendarOpt : {
- tooltip: {},
- visualMap: {
- min: 800,
- max: 5000,
- show:false,
- pieces:[
- {min:0,max:0,color:'#FFF'},
- {min:0,max:4000,color:'#F78874'},
- {min:4000,max:9000,color:'#51A0DD'},
- {min:9000,color:'#4FDADC'}
- ],
- text: ["多", "少"],
- realtime: false,
- calculable: false,
- },
- calendar: {
- left: 'center',
- orient: 'vertical',
- cellSize: [60, 60],
- yearLabel: {
- show: true,
- textStyle: {
- fontSize: 30
- }
- },
- dayLabel: {
- margin: 10,
- firstDay: 1,
- nameMap: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
- },
- monthLabel: {
- show: true,
- margin: 10,
- nameMap:'cn'
- },
- range: ['2017-03']
- },
- series: [{
- id: 'label',
- type: 'scatter',
- coordinateSystem: 'calendar',
- symbolSize: 1,
- label: {
- normal: {
- show: true,
- textStyle: {
- color: '#484848',
- fontSize: 14
- }
- }
- },
- data: []
- }]
- },
- // 时间连线折线图
- timeRiseOption : {
- title: {
- text: "OCTOBER 2019", // 作为时间年份/月份
- left: "center",
- bottom: "5%",
- textStyle: {
- fontSize: 16
- }
- },
- grid: {
- top: '10%',
- left: '3%',
- right: '3%',
- bottom: '15%',
- containLabel: true,
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: ['14', '15', '16', '17', '18', '19', '20', '21', '22', '23'],
- axisLabel: {
- margin: 10,
- color: '#A0A0A0'
- },
- axisLine: {
- show: false
- },
- axisTick: {
- show: true,
- lineStyle: {
- color: "#3333331f"
- }
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: '#3333331f'
- }
- }
- },
- yAxis: [{
- type: 'value',
- position: 'right',
- axisLabel: {
- margin: 20,
- color: '#33333363'
- },
- axisTick: {
- show: true,
- lineStyle: {
- color: "#3333331f",
- }
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: '#3333331f'
- }
- },
- axisLine: {
- lineStyle: {
- color: '#3333331f',
- width: 2
- }
- }
- }],
- series: [{
- name: '总量',
- type: 'line',
- smooth: true, //是否平滑曲线显示
- showAllSymbol: true,
- symbol: 'circle',
- symbolSize: 6,
- lineStyle: {
- normal: {
- color: "#fff", // 线条颜色
- },
- },
- label: {
- show: true,
- position: 'top',
- textStyle: {
- color: '#A0A0A0',
- }
- },
- itemStyle: {
- color: "red",
- borderColor: "#fff",
- borderWidth: 3
- },
- tooltip: {
- show: false
- },
- areaStyle: {
- normal: {
- color: '#eb64fb',
- }
- },
- data: [393, 438, 485, 631, 689, 824, 987, 1000, 1100, 1200]
- }]
- },
- // 横向柱状图
- horizontalBarOption : {
- title: {
- top: '5%',
- left: 'center',
- text:'',
- textStyle: {
- align: 'center',
- color: '#4DCEF8',
- fontSize: 18
- }
- },
- grid: {
- left: '240',
- right: '100'
- },
- xAxis: {
- show: false,
- },
- yAxis: {
- type: 'category',
- axisLabel: {
- margin: 100,
- show: true,
- color: '#4DCEF8',
- fontSize: 14
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- data: [] // lengend
- },
- series: [
- {
- type: 'bar',
- barGap: '-100%',
- label: {
- normal: {
- show: true,
- position: 'right',
- color: '#fff',
- fontSize: 14,
- }
- },
- barWidth: '35%',
- itemStyle: {
- normal: {
- borderColor: '#4DCEF8',
- borderWidth: 2,
- barBorderRadius: 15,
- color: 'rgba(102, 102, 102,0)'
- },
- },
- z: 1,
- data: [], // 总量
- },
- {
- type: 'bar',
- barGap: '-98%',
- barWidth: '33.5%',
- itemStyle: {
- normal: {
- barBorderRadius: 16,
- color: {
- type: 'linear',
- x: 0,
- x1: 1,
- colorStops: [{
- offset: 0,
- color: '#02ddff'
- }, {
- offset: 1,
- color: '#00feff'
- }]
- }
- },
- },
- max: 1,
- label: {
- normal: {
- show: true,
- position: 'left',
- color: '#fff',
- fontSize: 14,
- }
- },
- labelLine: {
- show: true,
- },
- z: 2,
- data: [], // 统计量
- }]
- },
- }
- export{
- Constant
- }
|