function ciy_chart_bank1_l2(opdata) { this.func = ['bank_l2']; this.lastdata = {}; this.resize = function () { } this.setdata = function (funame, data) { if(!data) return; this.lastdata[funame] = data; var piedatas = data.pie; var option = { series: [ { data: piedatas } ] }; chart1.setOption(option); } this.distory = function () { } var thos = this; var chart1 = null; opdata.container.append(`
监管合同统计
`); chart1 = echarts.init($5('#chart1', opdata.container)[0], 'dark'); var copn = { backgroundColor: '', textStyle:{ fontSize:Glob.fontsize }, tooltip: { trigger: 'item' }, color: ['#0098c7', '#26e394', '#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'], series: [ { type: 'pie', minAngle: 5, startAngle: 180, radius: ['25%', '40%'], center: ['50%', '50%'], avoidLabelOverlap: false, itemStyle: { borderRadius: 4 * Glob.bet, borderColor: '#fff', borderWidth: 1 * Glob.bet }, label: { show: true, padding:[0,-75 * Glob.bet,0,-75 * Glob.bet], formatter: '{c1|{c}}{c2|份} \n{b}\n\n', rich:{ c1:{ fontSize: 18 * Glob.bet, padding:[18 * Glob.bet,0,8 * Glob.bet,0] }, c2:{ padding:[10 * Glob.bet,0,0,2 * Glob.bet] } } }, labelLine: { normal: { length: 20 * Glob.bet, length2: 80 * Glob.bet } }, emphasis: { label: { show: true, color: '#ffffff' } }, data: [] } ] }; chart1.setOption(copn); this.resize(); var idx_autohight = -1; var t_autohight = setInterval(function () { var option = chart1.getOption(); chart1.dispatchAction({ type: 'downplay', dataIndex: idx_autohight }); idx_autohight = (idx_autohight + 1) % option.series[0].data.length; chart1.dispatchAction({ type: 'highlight', dataIndex: idx_autohight }); }, 2200); // var style = document.createElement("style"); // style.innerHTML = ` // `; // window.document.head.appendChild(style); }