var itemStyle = {
normal:{label:{
show:true,
formatter:'{b}',
textStyle: {fontSize: 20,fontWeight : 'bold'}
}},
emphasis:{label:{show:true}}
};
option = {
title : {
text : '2012 World GDP Top 8',
subtext : 'from baike (Billion $)',
sublink : 'http://baike.baidu.com/link?url=MyQikkoGI08hUfVmiB0g01ZJ6Wpyu18s8e6XdA3dwcI73-i0J7Ce32LuPNqfEWBj2rUcSfIHYIVI0aL8czbS_a',
x : 'center'
},
tooltip : {
trigger: 'item',
showDelay: 0,
transitionDuration: 0.2,
formatter : function (params) {
var value = params.value + '';
value = value.replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,');
return params.seriesName + '<br/>' + value + ' Billion';
}
toolbox: {
show : true,
x: 'right',
y: 'bottom',
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
restore : {show: true},
saveAsImage : {show: true}
dataRange: {
orient: 'horizontal',
x : 'center',
y: 'center',
min: 2000,
max: 16000,
splitNumber: 0, // 分割段数,默认为5
text:['16,000B','2,000B'],
calculable : true,
itemWidth:40,