option
option = { title : { text: '手机占有率', subtext: '虚构数据' }, tooltip : { trigger: 'item', formatter: "{b}: {c}" }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, restore : {show: true}, saveAsImage : {show: true} } }, series : [ { name:'矩形图', type:'treemap', itemStyle: { normal: { label: { show: true, formatter: "{b}: {c}" }, borderWidth: 1, borderColor: '#ccc' }, emphasis: { label: { show: true }, color: '#cc99cc', borderWidth: 3, borderColor: '#996699' } }, data:[ { name: '三星', value: 6, itemStyle: { normal: { label: { show: true, formatter : "{b}最多", textStyle: { color: '#ccc', fontSize: 16 } }, color: '#ccff99', borderWidth: 1 }, emphasis: { label: { show: true, formatter : "{b}: {c}", textStyle: { color: 'red', fontSize: 18 } }, color: '#cc9999', borderWidth: 3, borderColor: '#999999' } } }, { name: '小米', value: 4, itemStyle: { normal: { color: '#99ccff', } } }, { name: '苹果', value: 4, itemStyle: { normal: { color: '#9999cc', } } }, { name: '魅族', value: 1, itemStyle: { normal: { color: '#99cccc', } } }, { name: '华为', value: 2, itemStyle: { normal: { color: '#ccffcc', } } }, { name: '联想', value: 2, itemStyle: { normal: { color: '#ccccff', } } }, { name: '中兴', value: 1, itemStyle: { normal: { label: { show: true, formatter: "{b}: {c}", }, borderWidth: 3 }, emphasis: { label: { show: true }, color: '#cc9999', borderWidth: 3, borderColor: '#999999' } } } ] } ] };
刷 新
切换主题