echart:option以及rich

    option = {
    	title: {
    		show: true,
    		text: 'name', //标题
    		link: 'name', //;文本超链接 
    		target 'name', //(self、blank)指定窗口打开
    		textStyle: {
    			color: '#fff',
    			fontStyle: 'normal', //'italic' 'oblique'
    			fontWeight: 'normal', //'bold''bolder''lighter'100 | 200 | 300 | 400...
    			fontFamily: '微软雅黑',
    			fontSize: 12,
    			align: 'left', //center right
    			verticalAlign: 'top', //middle bottom
    			x: 'left',                 // 水平安放位置,默认为左对齐,可选为:
                                   // 'center' ¦ 'left' ¦ 'right'
                                   // ¦ {number}(x坐标,单位px)
       			y: 'top',                  // 垂直安放位置,默认为全图顶端,可选为:
                                   // 'top' ¦ 'bottom' ¦ 'center'
                                   // ¦ {number}(y坐标,单位px)
    			lineHeight: 12,
    			width: 200,
    			height: 200,
    			textBorderColor: 'transparent',
    			textBorderWidth: 0,
    			textShadowColor: 'fff',
    			textShadowOffsetX: 0,
    			textShadowOffsetY: 0,
    			padding: 0,
    			itemGap: 10, //主副标题之间的间距。
    			zlevel: 0, //层级
    			left: 0,
    			right: 0,
    			top: 0,
    			bottom: 0,
    			backgroundColor: '#fff',
    			borderColor: '#ccc',
    			borderWidth: 0,
    			borderRadius: 0,
    			shadowBlur: 10,
    			shadowColor: '#fff',
    			shadowOffsetX: 0,
    			shadowOffsetY: 0,
    			label: {
    				normal: { // 在文本中,可以对部分文本采用 rich 中定义样式。
    					formatter: [ // {styleName|text content text content}` 标记样式名。
    						'{a|这段文本采用样式a}',
    						'{b|这段文本采用样式b}这段用默认样式{x|这段用样式x}'
    					].join('\n'),
    					rich: {
    						a: {
    							color: 'red',
    							lineHeight: 10
    						},
    						b: {
    							backgroundColor: {
    								image: 'xxx/xxx.jpg'
    							},
    							height: 40
    						},
    						x: {
    							fontSize: 18,
    							fontFamily: 'Microsoft YaHei',
    							borderColor: '#449933',
    							borderRadius: 4
    						},
    					}
    				}
    			}
    		}
    		subtext: 'content', //副标题
    		sublink: 'content', //副标题文本超链接
    		subtarget: 'content', //指定窗口打开副标题超链接(self、blank)
    		subtextStyle: {}
    	},
    	tooltip: {
    		trigger: 'axis' //坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。
    			//trigger: 'item'//数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。
    		axisPointer: { //坐标轴指示器是指示坐标轴当前刻度的工具。
    			type: 'shadow', //cross
    			crossStyle: {
    				color: "fff",
    				//...
    			},
    			label: {
    				show: true
    			}
    		}
    	},
    	grid: {
    		show: false,
    		zlevel: 0, //层级
    		left: 0,
    		right: 0,
    		top: 0,
    		bottom: 0,
    		backgroundColor: '#fff',
    		borderColor: '#ccc',
    		borderWidth: 0,
    		borderRadius: 0,
    		shadowBlur: 10,
    		shadowColor: '#fff',
    		shadowOffsetX: 0,
    		shadowOffsetY: 0,
    	}
    	legend: {
    		type: 'plain', //scroll
    		show: true,
    		left: 0,
    		right: 0,
    		top: 0,
    		bottom: 0,
    		width: 200,
    		height: 200,
    		align: auto, //left right
    		orient: 'horizontal', //'vertical'
    		x: 'center',               // 水平安放位置,默认为全图居中,可选为:
                                   // 'center' ¦ 'left' ¦ 'right'
                                   // ¦ {number}(x坐标,单位px)
        	y: 'top',                  // 垂直安放位置,默认为全图顶端,可选为:
                                   // 'top' ¦ 'bottom' ¦ 'center'
                                   // ¦ {number}(y坐标,单位px)
    		padding: 5,
    		itemGap: 10, //间距
    		itemWidth: 15,
    		itemHeight: 15,
    		formatter: function(name) {
    			return 'Legend ' + name;
    		},
    		selectedMode: 'single', //multiple 单选 多选
    		inactiveColor: '#ccc', //图例关闭时的颜色。
    		textStyle: {},
    		tooltip: {
    			show: true
    		}
    		data: ['蒸发量', '降水量'],
    		name: 'aaa',
    		backgroundColor: '#fff',
    		borderColor: '#ccc',
    		borderWidth: 0,
    		borderRadius: 0,
    		shadowBlur: 10,
    		shadowColor: '#fff',
    		shadowOffsetX: 0,
    		shadowOffsetY: 0,
    		//		scroll属性暂省略
    	},
    	xAxis: [{
    		boundaryGap: false,
    		gridIndex: 0, //x 轴所在的 grid 的索引,默认位于第一个 grid。
    		position: bottom, //top
    		type: 'category', //类目轴,适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。
    		//type:'time' ,//时间轴,适用于连续的时序数据,与数值轴相比时间轴带有时间的格式化,在刻度计算上也有所不同,例如会根据跨度的范围来决定使用月,星期,日还是小时范围的刻度。
    		//type:'log',//对数轴。适用于对数数据。
    		name: 'name',
    		nameLocation: 'start' //'middle' 或者 'center' 坐标轴显示位置
    		nameTextStyle: {},
    		nameGap: 15, //坐标轴名称与轴线之间的距离。
    		nameRotate: 45, //坐标轴名字旋转,角度值。
    		inverse: false, //是否是反向坐标轴。ECharts 3 中新加
    		min: 'dataMin',
    		max: 'dataMax',
    		splitNumber: 5, //坐标轴的分割段数,需要注意的是这个分割段数只是个预估值,最后实际显示的段数会在这个基础上根据分割后坐标轴刻度显示的易读程度作调整。在类目轴中无效。
    		minInterval: 0, //自动计算的坐标轴最小间隔大小。 只在数值轴或时间轴中(type: 'value' 或 'time')有效。
    		maxInterval: 10,
    		interval: 0, //强制设置坐标轴分割间隔。
    		triggerEvent: false, //鼠标事件
    		axisLine: {
    			lineStyle: {
    				type: 'dotted', //solid  dashed
    				color: "#000",
    				opacity: 0.5,
    				shadowBlur: 10,
    				shadowColor: '#fff',
    				shadowOffsetX: 0,
    				shadowOffsetY: 0,
    			}
    		}
    		splitLine: {
    			show: false,
    			lineStyle: {} //同上
    		},
    		axisTick: { //是否显示刻度
    			show: true,
    			interval: 'auto',
    			inside: false //坐标轴刻度是否朝内,默认朝外。
    			length: 5,
    		},
    		axisLabel: {
    			show: true,
    			interval: 'auto',
    			inside: false //刻度标签是否朝内,默认朝外。
    			rotate: 45,
    			margin: 8, //刻度标签与轴线之间的距离。
    			formatter: '{value} kg',
    			color: '#ccc',
    			textStyle: {}
    		},
    		axisPointer: {
    			show: false,
    			type: 'line', // shadow
    			label: {} //同label
    			shadowStyle: {
    				color: "#000",
    				opacity: 0.5,
    				shadowBlur: 10,
    				shadowColor: '#fff',
    				shadowOffsetX: 0,
    				shadowOffsetY: 0,
    			},
    			handle: {} //拖拽手柄,适用于触屏的环境  暂缺
    		},
    		data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
    	}],
    	yAxis: [{ //同X
    		type: 'value'
    	}],
    	series: [{
    		name: '蒸发量',
    		type: 'bar',
    		xAxisIndex: 0, //使用的 x 轴的 index,在单个图表实例中存在多个 x 轴的时候有用。
    		yAxisIndex: 0, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用。
    		label: {
    			normal: {
    				show: true,
    				position: [10, 10], //'top''left''right''bottom''inside''insideLeft''insideRight''insideTop''insideBottom''insideTopLeft''insideBottomLeft''insideTopRight''insideBottomRight'
    				distance: 5, //距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
    				rotate: 45,
    				offset: [35, 40] //文字偏移量
    				textStyle: {},
    			},
    			emphasis: {
    				//同normal
    			}
    		},
    		itemStyle: {
    			normal: {
    				color: "#fff",
    				borderColor: "#fff",
    				borderWidth: 0,
    				borderType: 'solid',
    				barBorderRadius: 0,
    				opacity: 0.5,
    				shadowBlur: 10,
    				shadowColor: '#fff',
    				shadowOffsetX: 0,
    				shadowOffsetY: 0,
    			},
    			emphasis: {
    				//同normal
    			},
    		},
    		barWidth: 10,
    		barMaxWidth: 10,
    		barMinHeight: 10,
    		barGap: 10, //柱子距离
    		cursor: 'pointer', //同css
    		data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
    		markPoint: {
    			symbol: 'circle', //'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
    			symbolSize: [100, 30],
    			symbolRotate: 45,
    			symbolOffset: 0,
    			silent: false, //鼠标事件
    			label: {},
    			itemStyle: {},
    			data: [{
    				type: 'max', //min  average
    				name: '最大值'
    			}, {
    				name: '某个坐标',
    				coord: [10, 20]
    			}, {
    				name: '固定 x 像素位置',
    				yAxis: 10,
    				x: '90%'
    			}, {
    				name: '某个屏幕坐标',
    				x: 100,
    				y: 100
    			}]
    		},
    		visualMap: {
    			orient:'horizontal',
    			min: 0,
    			max: 100,
    			right: '27%',
    			bottom: '5%',
    			text: ['高', '低'],
    			itemWidth: 20,
    			itemHeight: 60,
    			textStyle: {
    				color: '#fff'
    			},
    			seriesIndex: [0],
    			inRange: {
    				color: ['#fdcd80', '#cf2d14']
    			},
    			calculable: false,
    			continuous: false
    		},
    		markLine: {
    			//同markPoint
    		},
    		markArea: {
    			animation: false, //动画
    			itemStyle: {
    				normal: {
    					color: {
    						type: 'linear',
    						x: 0,
    						y: 0,
    						x2: 0,
    						y2: 1,
    						colorStops: [{
    							offset: 0,
    							color: 'red' // 0% 处的颜色
    						}, {
    							offset: 1,
    							color: 'blue' // 100% 处的颜色
    						}],
    						globalCoord: false // 缺省为 false
    					}
    					// 径向渐变,前三个参数分别是圆心 x, y 和半径,取值同线性渐变
    					color: {
    						type: 'radial',
    						x: 0.5,
    						y: 0.5,
    						r: 0.5,
    						colorStops: [{
    							offset: 0,
    							color: 'red' // 0% 处的颜色
    						}, {
    							offset: 1,
    							color: 'blue' // 100% 处的颜色
    						}],
    						globalCoord: false // 缺省为 false
    					}
    					// 纹理填充
    					color: {
    						image: imageDom, // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
    						repeat: 'repeat' // 是否平铺, 可以是 'repeat-x', 'repeat-y', 'no-repeat'
    					},
    					borderColor: "#fff",
    					borderWidth: 0,
    					borderType: 'solid',
    					barBorderRadius: 0,
    					opacity: 0.5,
    					shadowBlur: 10,
    					shadowColor: '#fff',
    					shadowOffsetX: 0,
    					shadowOffsetY: 0,
    					data://同上
    
    				},
    				emphasis: {
    					//同normal
    				},
    			},
    		}
    	}],
    	// 值域
    dataRange: {
        orient: 'vertical',        // 布局方式,默认为垂直布局,可选为:
                                   // 'horizontal' ¦ 'vertical'
        x: 'left',                 // 水平安放位置,默认为全图左对齐,可选为:
                                   // 'center' ¦ 'left' ¦ 'right'
                                   // ¦ {number}(x坐标,单位px)
        y: 'bottom',               // 垂直安放位置,默认为全图底部,可选为:
                                   // 'top' ¦ 'bottom' ¦ 'center'
                                   // ¦ {number}(y坐标,单位px)
        backgroundColor: 'rgba(0,0,0,0)',
        borderColor: '#ccc',       // 值域边框颜色
        borderWidth: 0,            // 值域边框线宽,单位px,默认为0(无边框)
        padding: 5,                // 值域内边距,单位px,默认各方向内边距为5,
                                   // 接受数组分别设定上右下左边距,同css
        itemGap: 10,               // 各个item之间的间隔,单位px,默认为10,
                                   // 横向布局时为水平间隔,纵向布局时为纵向间隔
        itemWidth: 20,             // 值域图形宽度,线性渐变水平布局宽度为该值 * 10
        itemHeight: 14,            // 值域图形高度,线性渐变垂直布局高度为该值 * 10
        splitNumber: 5,            // 分割段数,默认为5,为0时为线性渐变
        color:['#1e90ff','#f0ffff'],//颜色 
        //text:['高','低'],         // 文本,默认为数值文本
        textStyle: {
            color: '#333'          // 值域文字颜色
        }
    },
    
    toolbox: {
        orient: 'horizontal',      // 布局方式,默认为水平布局,可选为:
                                   // 'horizontal' ¦ 'vertical'
        x: 'right',                // 水平安放位置,默认为全图右对齐,可选为:
                                   // 'center' ¦ 'left' ¦ 'right'
                                   // ¦ {number}(x坐标,单位px)
        y: 'top',                  // 垂直安放位置,默认为全图顶端,可选为:
                                   // 'top' ¦ 'bottom' ¦ 'center'
                                   // ¦ {number}(y坐标,单位px)
        color : ['#1e90ff','#22bb22','#4b0082','#d2691e'],
        backgroundColor: 'rgba(0,0,0,0)', // 工具箱背景颜色
        borderColor: '#ccc',       // 工具箱边框颜色
        borderWidth: 0,            // 工具箱边框线宽,单位px,默认为0(无边框)
        padding: 5,                // 工具箱内边距,单位px,默认各方向内边距为5,
                                   // 接受数组分别设定上右下左边距,同css
        itemGap: 10,               // 各个item之间的间隔,单位px,默认为10,
                                   // 横向布局时为水平间隔,纵向布局时为纵向间隔
        itemSize: 16,              // 工具箱图形宽度
        featureImageIcon : {},     // 自定义图片icon
        featureTitle : {
            mark : '辅助线开关',
            markUndo : '删除辅助线',
            markClear : '清空辅助线',
            dataZoom : '区域缩放',
            dataZoomReset : '区域缩放后退',
            dataView : '数据视图',
            lineChart : '折线图切换',
            barChart : '柱形图切换',
            restore : '还原',
            saveAsImage : '保存为图片'
        }
    },
    
    // 提示框
    tooltip: {
        trigger: 'item',           // 触发类型,默认数据触发,见下图,可选为:'item' ¦ 'axis'
        showDelay: 20,             // 显示延迟,添加显示延迟可以避免频繁切换,单位ms
        hideDelay: 100,            // 隐藏延迟,单位ms
        transitionDuration : 0.4,  // 动画变换时间,单位s
        backgroundColor: 'rgba(0,0,0,0.7)',     // 提示背景颜色,默认为透明度为0.7的黑色
        borderColor: '#333',       // 提示边框颜色
        borderRadius: 4,           // 提示边框圆角,单位px,默认为4
        borderWidth: 0,            // 提示边框线宽,单位px,默认为0(无边框)
        padding: 5,                // 提示内边距,单位px,默认各方向内边距为5,
                                   // 接受数组分别设定上右下左边距,同css
        axisPointer : {            // 坐标轴指示器,坐标轴触发有效
            type : 'line',         // 默认为直线,可选为:'line' | 'shadow'
            lineStyle : {          // 直线指示器样式设置
                color: '#48b',
                width: 2,
                type: 'solid'
            },
            shadowStyle : {                       // 阴影指示器样式设置
                width: 'auto',                   // 阴影大小
                color: 'rgba(150,150,150,0.3)'  // 阴影颜色
            }
        },
        textStyle: {
            color: '#fff'
        }
    },
    
    // 区域缩放控制器
    dataZoom: {
        orient: 'horizontal',      // 布局方式,默认为水平布局,可选为:
                                   // 'horizontal' ¦ 'vertical'
        // x: {number},            // 水平安放位置,默认为根据grid参数适配,可选为:
                                   // {number}(x坐标,单位px)
        // y: {number},            // 垂直安放位置,默认为根据grid参数适配,可选为:
                                   // {number}(y坐标,单位px)
        // width: {number},        // 指定宽度,横向布局时默认为根据grid参数适配
        // height: {number},       // 指定高度,纵向布局时默认为根据grid参数适配
        backgroundColor: 'rgba(0,0,0,0)',       // 背景颜色
        dataBackgroundColor: '#eee',            // 数据背景颜色
        fillerColor: 'rgba(144,197,237,0.2)',   // 填充颜色
        handleColor: 'rgba(70,130,180,0.8)'     // 手柄颜色
    },
    
    // 网格
    grid: {
        x: 80,
        y: 60,
        x2: 80,
        y2: 60,
        // width: {totalWidth} - x - x2,
        // height: {totalHeight} - y - y2,
        backgroundColor: 'rgba(0,0,0,0)',
        borderWidth: 1,
        borderColor: '#ccc'
    },
    
    // 类目轴
    categoryAxis: {
        position: 'bottom',    // 位置
        nameLocation: 'end',   // 坐标轴名字位置,支持'start' | 'end'
        boundaryGap: true,     // 类目起始和结束两端空白策略
        axisLine: {            // 坐标轴线
            show: true,        // 默认显示,属性show控制显示与否
            lineStyle: {       // 属性lineStyle控制线条样式
                color: '#48b',
                width: 2,
                type: 'solid'
            }
        },
        axisTick: {            // 坐标轴小标记
            show: true,       // 属性show控制显示与否,默认不显示
            interval: 'auto',
            // onGap: null,
            inside : false,    // 控制小标记是否在grid里 
            length :5,         // 属性length控制线长
            lineStyle: {       // 属性lineStyle控制线条样式
                color: '#333',
                width: 1
            }
        },
        axisLabel: {           // 坐标轴文本标签,详见axis.axisLabel
            show: true,
            interval: 'auto',
            rotate: 0,
            margin: 8,
            // formatter: null,
            textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
                color: '#333'
            }
        },
        splitLine: {           // 分隔线
            show: true,        // 默认显示,属性show控制显示与否
            // onGap: null,
            lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
                color: ['#ccc'],
                width: 1,
                type: 'solid'
            }
        },
        splitArea: {           // 分隔区域
            show: false,       // 默认不显示,属性show控制显示与否
            // onGap: null,
            areaStyle: {       // 属性areaStyle(详见areaStyle)控制区域样式
                color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']
            }
        }
    },
    
    // 数值型坐标轴默认参数
    valueAxis: {
        position: 'left',      // 位置
        nameLocation: 'end',   // 坐标轴名字位置,支持'start' | 'end'
        nameTextStyle: {},     // 坐标轴文字样式,默认取全局样式
        boundaryGap: [0, 0],   // 数值起始和结束两端空白策略
        splitNumber: 5,        // 分割段数,默认为5
        axisLine: {            // 坐标轴线
            show: true,        // 默认显示,属性show控制显示与否
            lineStyle: {       // 属性lineStyle控制线条样式
                color: '#48b',
                width: 2,
                type: 'solid'
            }
        },
        axisTick: {            // 坐标轴小标记
            show: false,       // 属性show控制显示与否,默认不显示
            inside : false,    // 控制小标记是否在grid里 
            length :5,         // 属性length控制线长
            lineStyle: {       // 属性lineStyle控制线条样式
                color: '#333',
                width: 1
            }
        },
        axisLabel: {           // 坐标轴文本标签,详见axis.axisLabel
            show: true,
            rotate: 0,
            margin: 8,
            // formatter: null,
            textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
                color: '#333'
            }
        },
        splitLine: {           // 分隔线
            show: true,        // 默认显示,属性show控制显示与否
            lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
                color: ['#ccc'],
                width: 1,
                type: 'solid'
            }
        },
        splitArea: {           // 分隔区域
            show: false,       // 默认不显示,属性show控制显示与否
            areaStyle: {       // 属性areaStyle(详见areaStyle)控制区域样式
                color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']
            }
        }
    },
    
    polar : {
        center : ['50%', '50%'],    // 默认全局居中
        radius : '75%',
        startAngle : 90,
        splitNumber : 5,
        name : {
            show: true,
            textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
                color: '#333'
            }
        },
        axisLine: {            // 坐标轴线
            show: true,        // 默认显示,属性show控制显示与否
            lineStyle: {       // 属性lineStyle控制线条样式
                color: '#ccc',
                width: 1,
                type: 'solid'
            }
        },
        axisLabel: {           // 坐标轴文本标签,详见axis.axisLabel
            show: false,
            textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
                color: '#333'
            }
        },
        splitArea : {
            show : true,
            areaStyle : {
                color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']
            }
        },
        splitLine : {
            show : true,
            lineStyle : {
                width : 1,
                color : '#ccc'
            }
        }
    },// 折线图默认参数
    line: {
    	smooth:true,
        itemStyle: {
            normal: {
                // color: 各异,
                label: {
                    show: false
                    // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
                    //           'inside'|'left'|'right'|'top'|'bottom'
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                },
                lineStyle: {
                    width: 2,
                    type: 'solid',
                    shadowColor : 'rgba(0,0,0,0)', //默认透明
                    shadowBlur: 5,
                    shadowOffsetX: 3,
                    shadowOffsetY: 3
                }
            },
            emphasis: {
                // color: 各异,
                label: {
                    show: false
                    // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
                    //           'inside'|'left'|'right'|'top'|'bottom'
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                }
            }
        },
        //smooth : false,
        //symbol: null,         // 拐点图形类型
        symbolSize: 2,          // 拐点图形大小
        //symbolRotate : null,  // 拐点图形旋转控制
        showAllSymbol: false    // 标志图形默认只有主轴显示(随主轴标签间隔隐藏策略)
    },
    
    // K线图默认参数
    k: {
        // barWidth : null          // 默认自适应
        // barMaxWidth : null       // 默认自适应 
        itemStyle: {
            normal: {
                color: '#fff',          // 阳线填充颜色
                color0: '#00aa11',      // 阴线填充颜色
                lineStyle: {
                    width: 1,
                    color: '#ff3200',   // 阳线边框颜色
                    color0: '#00aa11'   // 阴线边框颜色
                }
            },
            emphasis: {
                // color: 各异,
                // color0: 各异
            }
        }
    },
    
    // 散点图默认参数
    scatter: {
        //symbol: null,      // 图形类型
        symbolSize: 4,       // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
        //symbolRotate : null,  // 图形旋转控制
        large: false,        // 大规模散点图
        largeThreshold: 2000,// 大规模阀值,large为true且数据量>largeThreshold才启用大规模模式
        itemStyle: {
            normal: {
                // color: 各异,
                label: {
                    show: false
                    // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
                    //           'inside'|'left'|'right'|'top'|'bottom'
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                }
            },
            emphasis: {
                // color: '各异'
                label: {
                    show: false
                    // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
                    //           'inside'|'left'|'right'|'top'|'bottom'
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                }
            }
        }
    },
    
    // 雷达图默认参数
    radar : {
        itemStyle: {
            normal: {
                // color: 各异,
                label: {
                    show: false
                },
                lineStyle: {
                    width: 2,
                    type: 'solid'
                }
            },
            emphasis: {
                // color: 各异,
                label: {
                    show: false
                }
            }
        },
        //symbol: null,         // 拐点图形类型
        symbolSize: 2           // 可计算特性参数,空数据拖拽提示图形大小
        //symbolRotate : null,  // 图形旋转控制
    },
    
    // 饼图默认参数
    pie: {
        center : ['50%', '50%'],    // 默认全局居中
        radius : [0, '75%'],
        clockWise : false,          // 默认逆时针
        startAngle: 90,
        minAngle: 0,                // 最小角度改为0
        selectedOffset: 10,         // 选中是扇区偏移量
        itemStyle: {
            normal: {
                // color: 各异,
                borderColor: '#fff',
                borderWidth: 1,
                label: {
                    show: true,
                    position: 'outer'
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                },
                labelLine: {
                    show: true,
                    length: 20,
                    lineStyle: {
                        // color: 各异,
                        width: 1,
                        type: 'solid'
                    }
                }
            },
            emphasis: {
                // color: 各异,
                borderColor: 'rgba(0,0,0,0)',
                borderWidth: 1,
                label: {
                    show: false
                    // position: 'outer'
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                },
                labelLine: {
                    show: false,
                    length: 20,
                    lineStyle: {
                        // color: 各异,
                        width: 1,
                        type: 'solid'
                    }
                }
            }
        }
    },
    
    map: {
        mapType: 'china',   // 各省的mapType暂时都用中文
        mapLocation: {
            x : 'center',
            y : 'center'
            // width    // 自适应
            // height   // 自适应
        },
        showLegendSymbol : true,       // 显示图例颜色标识(系列标识的小圆点),存在legend时生效
        itemStyle: {
            normal: {
                // color: 各异,
                borderColor: '#fff',
                borderWidth: 1,
                areaStyle: {
                    color: '#ccc'//rgba(135,206,250,0.8)
                },
                label: {
                    show: false,
                    textStyle: {
                        color: 'rgba(139,69,19,1)'
                    }
                }
            },
            emphasis: {                 // 也是选中样式
                // color: 各异,
                borderColor: 'rgba(0,0,0,0)',
                borderWidth: 1,
                areaStyle: {
                    color: 'rgba(255,215,0,0.8)'
                },
                label: {
                    show: false,
                    textStyle: {
                        color: 'rgba(139,69,19,1)'
                    }
                }
            }
        }
    },
    
    force : {
        // 数据map到圆的半径的最小值和最大值
        minRadius : 10,
        maxRadius : 20,
        density : 1.0,
        attractiveness : 1.0,
        // 初始化的随机大小位置
        initSize : 300,
        // 向心力因子,越大向心力越大
        centripetal : 1,
        // 冷却因子
        coolDown : 0.99,
        // 分类里如果有样式会覆盖节点默认样式
        itemStyle: {
            normal: {
                // color: 各异,
                label: {
                    show: false
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                },
                nodeStyle : {
                    brushType : 'both',
                    color : '#f08c2e',
                    strokeColor : '#5182ab'
                },
                linkStyle : {
                    strokeColor : '#5182ab'
                }
            },
            emphasis: {
                // color: 各异,
                label: {
                    show: false
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                },
                nodeStyle : {},
                linkStyle : {}
            }
        }
    },
    
    chord : {
        radius : ['65%', '75%'],
        center : ['50%', '50%'],
        padding : 2,
        sort : 'none', // can be 'none', 'ascending', 'descending'
        sortSub : 'none', // can be 'none', 'ascending', 'descending'
        startAngle : 90,
        clockWise : false,
        showScale : false,
        showScaleText : false,
        itemStyle : {
            normal : {
                label : {
                    show : true
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                },
                lineStyle : {
                    width : 0,
                    color : '#000'
                },
                chordStyle : {
                    lineStyle : {
                        width : 1,
                        color : '#666'
                    }
                }
            },
            emphasis : {
                lineStyle : {
                    width : 0,
                    color : '#000'
                },
                chordStyle : {
                    lineStyle : {
                        width : 2,
                        color : '#333'
                    }
                }
            }
        }
    },
    
    island: {
        r: 15,
        calculateStep: 0.1  // 滚轮可计算步长 0.1 = 10%
    },
    
    markPoint : {
        symbol: 'pin',         // 标注类型
        symbolSize: 10,        // 标注大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
        //symbolRotate : null, // 标注旋转控制
        itemStyle: {
            normal: {
                // color: 各异,
                // borderColor: 各异,     // 标注边线颜色,优先于color 
                borderWidth: 2,            // 标注边线线宽,单位px,默认为1
                label: {
                    show: true,
                    position: 'inside' // 可选为'left'|'right'|'top'|'bottom'
                    // textStyle: null      // 默认使用全局文本样式,详见TEXTSTYLE
                }
            },
            emphasis: {
                // color: 各异
                label: {
                    show: true
                    // position: 'inside'  // 'left'|'right'|'top'|'bottom'
                    // textStyle: null     // 默认使用全局文本样式,详见TEXTSTYLE
                }
            }
        }
    },
    
    markLine : {
        // 标线起始和结束的symbol介绍类型,如果都一样,可以直接传string
        symbol: ['circle', 'arrow'],  
        // 标线起始和结束的symbol大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
        symbolSize: [2, 4],
        // 标线起始和结束的symbol旋转控制
        //symbolRotate : null,
        itemStyle: {
            normal: {
                // color: 各异,           // 标线主色,线色,symbol主色
                // borderColor: 随color,     // 标线symbol边框颜色,优先于color 
                borderWidth: 2,          // 标线symbol边框线宽,单位px,默认为2
                label: {
                    show: false,
                    // 可选为 'start'|'end'|'left'|'right'|'top'|'bottom'
                    position: 'inside',  
                    textStyle: {         // 默认使用全局文本样式,详见TEXTSTYLE
                        color: '#333'
                    }
                },
                lineStyle: {
                    // color: 随borderColor, // 主色,线色,优先级高于borderColor和color
                    // width: 随borderWidth, // 优先于borderWidth
                    type: 'solid',
                    shadowColor : 'rgba(0,0,0,0)', //默认透明
                    shadowBlur: 5,
                    shadowOffsetX: 3,
                    shadowOffsetY: 3
                }
            },
            emphasis: {
                // color: 各异
                label: {
                    show: false
                    // position: 'inside' // 'left'|'right'|'top'|'bottom'
                    // textStyle: null    // 默认使用全局文本样式,详见TEXTSTYLE
                },
                lineStyle : {}
            }
        }
    },
    
    textStyle: {
        decoration: 'none',
        fontFamily: 'Arial, Verdana, sans-serif',
        fontFamily2: '微软雅黑',    // IE8- 字体模糊并且不支持不同字体混排,额外指定一份
        fontSize: 12,
        fontStyle: 'normal',
        fontWeight: 'normal'
    },
    
    // 默认标志图形类型列表
    symbolList : [
      'circle', 'rectangle', 'triangle', 'diamond',
      'emptyCircle', 'emptyRectangle', 'emptyTriangle', 'emptyDiamond'
    ],
    loadingText : 'Loading...',
    // 可计算特性配置,孤岛,提示颜色
    calculable: false,              // 默认关闭可计算特性
    calculableColor: 'rgba(255,165,0,0.6)',       // 拖拽提示边框颜色
    calculableHolderColor: '#ccc', // 可计算占位提示颜色
    nameConnector: ' & ',
    valueConnector: ' : ',
    animation: true,
    animationThreshold: 2500,       // 动画元素阀值,产生的图形原素超过2500不出动画
    addDataAnimation: true,         // 动态数据接口是否开启动画效果
    animationDuration: 2000,
    animationEasing: 'ExponentialOut'    //BounceOut
    };

rich的使用方式:

option = {
    tooltip: {
        show:false,
    },
    series: [
        {
            color:['#00c7e4','#ececec'],
            type:'pie',
            radius: ['80', '95'],
            avoidLabelOverlap: false,
            label: {
                normal: {
                    show: true,
                    position: 'center'
                }
            },
          data: [{
				value: 98,
				label: {
                normal: {
                    formatter: '{a|{c}}  {b|分}  ',
   
                    rich: {
                        a: {
                            color: '#00c7e4',
                            fontSize: 70,
                            verticalAlign:'bottom',
                        },
                        b: {
                             color: '#00c7e4',
                            fontSize: 26,
                              verticalAlign:'bottom',
                               padding: [6, 0],
                        },
                    }
                }
            },
			}, {
				value: 2,
				name:'分',
				label: {
					normal: {
					    show:false,
						fontSize: 14,
						color: '#dd680a',
						position: 'center',
					}
				}
			}],
        },
    ]
};
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值