var schema = [ {name: 'Income', index: 0, text: '人均收入', unit: '美元'}, {name: 'LifeExpectancy', index: 1, text: '人均寿命', unit: '岁'}, {name: 'Population', index: 2, text: '总人口', unit: ''}, {name: 'Country', index: 3, text: '国家', unit: ''} ]; var dataBJ = [ [1,55,9,56,0.46,18,6,"良"], [2,25,11,21,0.65,34,9,"优"], [3,56,7,63,0.3,14,5,"良"], [4,33,7,29,0.33,16,6,"优"], [5,42,24,44,0.76,40,16,"优"], [6,82,58,90,1.77,68,33,"良"], [7,74,49,77,1.46,48,27,"良"], [8,78,55,80,1.29,59,29,"良"], [31,46,5,49,0.28,10,6,"优"] ]; var age=[611, 932, 901, 934, 1290, 1330, 1320]; var jg=[12,24,24,52,53,24,52,52,23,52,11]; var xl=[232,533,252,154,175,133,164,162,121,211,100] option = { title: { text: '折线图堆叠' }, tooltip: { padding: 5, backgroundColor: '#222', borderColor: '#777', borderWidth: 1, formatter: function (obj) { console.log(obj) var value = obj.value; var aa=obj.dataIndex; console.log(obj) return '<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px;width:300px;height:300px" id="tuc">' } },//我想在小黑框里面设置一个饼图,但不知道如何设置,还有数据绑定 legend: { data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎'] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: 'category', boundaryGap: false, data: ['周一','周二','周三','周四','周五','周六','周日'] }, yAxis: { type: 'value' }, series: [ { name:'邮件营销', type:'line', stack: '总量', data:[120, 132, 101, 134, 90, 230, 210] }, { name:'联盟广告', type:'line', stack: '总量', data:[220, 182, 191, 234, 290, 330, 310] }, { name:'视频广告', type:'line', stack: '总量', data:[150, 232, 201, 154, 190, 330, 410] }, { name:'直接访问', type:'line', stack: '总量', data:[320, 332, 301, 334, 390, 330, 320] }, { name:'搜索引擎', type:'line', stack: '总量', data:[820, 932, 901, 934, 1290, 1330, 1320] } ] };