options.toolbox = {
show: true,
showTitle: false,
feature: {
dataView: {
readOnly: true,
iconStyle: {
color: '#ffffff'
},
optionToContent: function (opt) {
var htmlTable = '<div class="mod mod1 parent-table" style="opacity:0;height:0px ;" id="'+chartId+'_tablewrap">' +
'<div class="mod-body " id="data-load1">' +
'<table class="data-load " width="100%" border="0" cellspacing="0" id= "'+chartId+'_table"></table>' +
'</div>' +
'</div>';
$('#content_new .chartpanel').append(htmlTable);//点击echarts的toolbox的dataview后再生成table的dom对象,否则会有很多奇怪的bug
// console.log(opt);
showTable(data1, chartId + '_table', datagrid, 1);//渲染表格
var newRenderHtml= document.getElementById(chartId + '_tablewrap');
newRenderHtml.style.opacity="1";
return newRenderHtml;//将渲染好表格的dom对象返回跟echars dataView展示
},
},
},
left: '92%',
top: '8%'
};
09-18