【发布时间】:2018-04-17 21:09:51
【问题描述】:
我正在尝试将显示在表格上的信息更改为显示在表格左侧的信息 <td>。这是我的代码:
var tableData = [
[null],
["${apiInstanceList[0].serverName}"],
["${apiInstanceList[1].serverName2}"]
];
var cheapestByAirlineByLeg_data1 = [];
var cheapestByAirlineByLeg_data2 = [];
var cheapestByAirlineByLegChart = anychart.column();
<g:each in="${apiInstanceList}" var="apiInstance">
<g:each in="${apiInstance.cheapestByAirlineByLegMap}" var="leg">
var entry = [];
entry.push("${leg.legs}");
entry.push("${leg.price}");
<g:if test="${apiInstance.id % 2 == 0}">
cheapestByAirlineByLeg_data2.push({x: entry[0], value: entry[1]});
tableData[0].push(entry[0]);
tableData[1].push("$"+entry[1]);
</g:if>
<g:else>
cheapestByAirlineByLeg_data1.push({x: entry[0], value: entry[1]});
if(tableData[0].indexOf(entry[0]) == -1){ tableData[0].push(entry[0]); }
tableData[2].push("$"+entry[1]);
</g:else>
</g:each>
</g:each>[enter image description here][1
这是查看页面的方式。例如,我无法将 de [B6, B6] 更改为 GDSQA1。
【问题讨论】:
标签: html html-table datatables anychart