ECharts
View on GitHub
Home
Example
API & Doc
Download
ZIP (1.1.0)
ZIP (Latest)
Link
Ecom-FE
Data Visualization
ZRender
Tangram
option
option = { // color : [] tooltip : { // show : true, // default : true trigger: 'axis', borderWidth : 1, borderColor : 'yellow', padding : [8,12], textStyle : { color : '#eee', fontSize : '16', fontWeight:'blod', fontFamily:'微软雅黑' }, formatter: "Template :
{b}
{a}:{c}
{a1}:{c1}
{a2}:{c2}", formatter: function(params) { var res = 'Function :
' + params[0][1]; for (var i = 0, l = params.length; i < l; i++) { res += '
' + params[i][0] + ' : ' + params[i][2]; } return res; } }, legend: { // orient : 'vertical', // x : 'right', borderWidth:0, padding:[5,5], //data:['Kener','Amy','apple','orange','peach','banana'], data:['serie1','serie2','serie3','serie4'] }, grid : { //x : 50, //y : 30, //width : 600, //height : 320 }, xAxis : [ { type : 'category', position:'bottom', // axisTick : {show:true, lineStyle:{color:'red'}}, // splitLine : {show:false}, // splitArea : {show:false, areaStyle:{color:['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']}}, data : ['2012-02-01','2012-02-02','2012-02-03','2012-02-04','2012-02-05'] } ], yAxis : [ { type : 'value', position:'left' } ], series : [ { name:'serie1', type:'line', itemStyle: {normal: {areaStyle: {color: 'rgba(144, 238, 144, 0.3)'}}}, data:[1,2,8,{value:20,tooltip : {trigger: 'item'}}] }, { name:'serie2', stack: 'stack1', type:'line', itemStyle: {normal: {areaStyle: {color: 'rgba(98, 130, 10, 0.3)'}}}, data:[12,20,'-', 15, 9] }, { name:'serie3', stack: 'stack1', type:'line', itemStyle: {normal: {areaStyle: {color: 'rgba(170, 130, 180, 0.3)'}}}, data:[13,3,33,9,7] }, { name:'serie4', type:'line', itemStyle: {normal: {areaStyle: {color: 'rgba(70, 30, 180, 0.3)'}}}, data:[4,14,3,6,4] }, /* { name:'fruit', type:'pie', radius : [80, 120], center: [400,200], data:[ {value:10, name:'apple'}, {value:34, name:'orange'}, {value:35, name:'peach'}, {value:48, name:'banana'} ] }, { name:'people', type:'pie', radius : [20, 60], center: [400,200], itemStyle : { normal : { label : { position:'inner' }, labelLine : { show : false } } }, data:[ {value:12, name:'Kener'}, {value:24, name:'Amy'}, {value:35, name:'Lily'}, {value:48, name:'Eric'} ] } */ ] };
Refresh ~