饼状图,对应的名称显示不出来,怎么解决
本帖最后由 jeecg_ty 于 2018-11-9 18:17 编辑
ftl文件不能上传,主要修改代码如下图:
附上代码: <#list graphList as x>
<#if (tabList?size > 1)>
if(tabName || $.trim(tabName)) {
if("${x['tab_name']!''}" == tabName) {
<#if x['graph_type'] =='pie'>
var piearr = [];
$.map(data, function(n) {
piearr.push(}"],n["${x['field_name']}"] * 1 || 0]);
});
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data:piearr });
<#else>
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data: $.map(data, function(n) {
return n["${x['field_name']}"] * 1 || 0;
})});
</#if>
}
}
<#else>
<#if x['graph_type'] =='pie'>
var piearr = [];
$.map(data, function(n) {
piearr.push(}"],n["${x['field_name']}"] * 1 || 0]);
});
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data:piearr });
<#else>
series.push({type: "${x['graph_type']}", name: "${x['graph_name']}", data: $.map(data, function(n) {
return n["${x['field_name']}"] * 1 || 0;
})});
</#if>
</#if>
</#list>效果展示:
jeecg_ty 发表于 2018-11-9 17:30 static/image/common/back.gif
ftl文件不能上传,主要修改代码如下图:
附上代码:效果展示:
名称是字典怎么可以可以调用呢
页:
[1]