option
option = { tooltip : { trigger: 'axis' }, legend: { x : 'left', data:['圖一','圖二','圖三'] }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, restore : {show: true}, saveAsImage : {show: true} } }, calculable: true, polar : [ { indicator : [ { text : '指標一' }, { text : '指標二' }, { text : '指標三' }, { text : '指標四' }, { text : '指標五' } ], center : ['25%',210], radius : 150, startAngle: 90, splitNumber: 8, name : { formatter:'【{value}】', textStyle: {color:'red'} }, scale: true, type: 'circle', axisLine: { // 坐標軸線 show: true, // 默認顯示,屬性show控制顯示與否 lineStyle: { // 屬性lineStyle控制線條樣式 color: 'green', width: 2, type: 'solid' } }, axisLabel: { // 坐標軸文本標籤,詳見axis.axisLabel show: true, // formatter: null, textStyle: { // 其餘屬性默認使用全局文本樣式,詳見TEXTSTYLE color: '#ccc' } }, splitArea : { show : true, areaStyle : { color: ['rgba(250,0,250,0.3)','rgba(0,200,200,0.3)'] } }, splitLine : { show : true, lineStyle : { width : 2, color : 'yellow' } } }, { indicator : [ { text : '語文', max : 150 }, { text : '數學', max : 150 }, { text : '英語', max : 150 }, { text : '物理', max : 120 }, { text : '化學', max : 108 }, { text : '生物', max : 72 } ], center : ['75%', 210], radius : 150 } ], series : [ { name: '雷達圖', type: 'radar', itemStyle: { emphasis: { // color: 各異, lineStyle: { width: 4 } } }, data : [ { value : [100, 8, 0.40, -80, 2000], name : '圖一', symbol: 'star5', symbolSize: 4, // 可計算特性參數,空數據拖拽提示圖形大小 itemStyle: { normal: { lineStyle: { type: 'dashed' } } } }, { value : [10, 3, 0.20, -100, 1000], name : '圖二', itemStyle: { normal: { areaStyle: { type: 'default' } } } }, { value : [20, 3, 0.3, -13.5, 3000], name : '圖三', symbol: 'none', // 拐點圖形類型,非標準參數 itemStyle: { normal: { lineStyle: { type: 'dotted' } } } } ] }, { name: '成績單', type: 'radar', polarIndex : 1, itemStyle: { normal: { areaStyle: { type: 'default' } } }, data : [ { value : [120, 118, 130, 100, 99, 70], name : '張三', itemStyle: { normal: { color: function(params) { var value = params.data return isNaN(value) ? undefined : (value >= 120 ? 'green' : 'red') }, label: { show: true, formatter:function(params) { return params.value; } }, areaStyle: { color: (function (){ var zrColor = require('zrender/tool/color'); var x = document.getElementById('main').offsetWidth - 250; return zrColor.getRadialGradient( x, 210, 0, x, 200, 150, [[0, 'rgba(255,255,0,0.3)'],[1, 'rgba(255,0,0,0.5)']] ) })() } } } }, { value : [90, 113, 140, 30, 70, 60], name : '李四', itemStyle: { normal: { lineStyle: { type: 'dashed' } } } } ], markPoint : { symbol: 'emptyHeart', data : [ {name : '打醬油的標注', value : 100, x:'50%', y:'15%', symbolSize:32} ] } } ] };
刷 新
切換主題