var data = [{ name: '经费来源', itemStyle: { color: '#737373' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '中央直接拨款', itemStyle: { color: '#fd8d3c' }, label: { fontSize: 17, fontWeight: 'bold' }, children: [{ name: '财政部拨款', value: 12, itemStyle: { color: '#fdae6b' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '皇室內帑金', value: 12, itemStyle: { color: '#fdae6b' }, label: { fontSize: 15, fontWeight: 'bold' } }] }, { name: '国际援助', itemStyle: { color: '#ef6548' }, label: { fontSize: 17, fontWeight: 'bold' }, children: [{ name: '各国在华机构', value: 8, itemStyle: { color: '#fc8d59' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '如:南满铁道株式会社', value: 8, itemStyle: { color: '#fdbb84' }, label: { fontSize: 15, fontWeight: 'bold' } }], }, { name: '国际友人捐款', value: 8, itemStyle: { color: '#fc8d59' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '如:英国医生杰克逊之母', value: 8, itemStyle: { color: '#fdbb84' }, label: { fontSize: 15, fontWeight: 'bold' } }] }, { name: '各国公益组织', value: 8, itemStyle: { color: '#fc8d59' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '如:美国红十字会', value: 8, itemStyle: { color: '#fdbb84' }, label: { fontSize: 15, fontWeight: 'bold' } }] }] }, { name: '中外银行借款', itemStyle: { color: '#41ab5d' }, label: { fontSize: 17, fontWeight: 'bold' }, children: [{ name: '国内银行', value: 12, itemStyle: { color: '#78c679' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '大清银行', value: 6, itemStyle: { color: '#addd8e' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '交通银行', value: 6, itemStyle: { color: '#addd8e' }, label: { fontSize: 15, fontWeight: 'bold' } }] }, { name: '国外银行', value: 12, itemStyle: { color: '#78c679' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '四国银行', value: 3, itemStyle: { color: '#addd8e' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '道胜银行', value: 3, itemStyle: { color: '#addd8e' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '正金银行', value: 3, itemStyle: { color: '#addd8e' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '其他银行', value: 3, itemStyle: { color: '#addd8e' }, label: { fontSize: 15, fontWeight: 'bold' } }] }] }, { name: '民间防疫捐款', itemStyle: { color: '#807dba' }, label: { fontSize: 17, fontWeight: 'bold' }, children: [{ name: '个人捐款', value: 12, itemStyle: { color: '#9e9ac8' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '平民百姓', value: 3, itemStyle: { color: '#bcbddc' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '士绅巨贾', value: 3, itemStyle: { color: '#bcbddc' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '皇室贵族', value: 3, itemStyle: { color: '#bcbddc' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '政府官员', value: 3, itemStyle: { color: '#bcbddc' }, label: { fontSize: 15, fontWeight: 'bold' } }], }, { name: '团体捐款', value: 12, itemStyle: { color: '#9e9ac8' }, label: { fontSize: 15, fontWeight: 'bold' }, children: [{ name: '商会捐款', value: 4, itemStyle: { color: '#bcbddc' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '农会捐款', value: 4, itemStyle: { color: '#bcbddc' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '各行业集体捐款', value: 4, itemStyle: { color: '#bcbddc' }, label: { fontSize: 15, fontWeight: 'bold' } }] }] }, { name: '关税项下拨款', itemStyle: { color: '#74a9cf' }, label: { fontSize: 17, fontWeight: 'bold' }, children: [{ name: '海关关税', value: 12, itemStyle: { color: '#a6bddb' }, label: { fontSize: 15, fontWeight: 'bold' } }, { name: '内地商税', value: 12, itemStyle: { color: '#a6bddb' }, label: { fontSize: 15, fontWeight: 'bold' } }] }] }]; option = { backgroundColor:'#363636', title: [{ left: '63.5%', top: 20, text: '防疫款项来源', textStyle: { fontSize: 30, color: '#fff', }, },{ left: '55%', top: 50, subtext: '数据来源:《清未东北三省鼠疫灾难及防疫措施研究》,焦润明著', subtextStyle: { align: 'center', color: '#DDD', fontSize: 15, }, }], series: { type: 'sunburst', highlightPolicy: 'ancestor', data: data, center: ['70%', '50%'], radius: [0,'90%'], sort: null, // hoverAnimation: true, levels: [{}, { r0: '2%', r: '15%', itemStyle: { borderWidth: 3, }, label: { rotate: 'tangential' } }, { r0: '18%', r: '35%', label: { //align: 'right', rotate: 'tangential' }, itemStyle: { borderWidth: 2, }, }, { r0: '38%', r: '68%', label: { //position: 'outside', padding: 3, silent: false }, itemStyle: { borderWidth: 3 } }, { r0: '71%', r: '74%', label: { position: 'outside', padding: 3, silent: false }, itemStyle: { borderWidth: 3 } }] } };