Javascript 从HTML表创建Highcharts时忽略tfoot表行
如何设置highcharts以忽略html表的最后一行(包含总计)?我不想在标记中包含来自单元格的数据,因为这会为total field创建另一个折线图,从而弄乱图形 HTML:Javascript 从HTML表创建Highcharts时忽略tfoot表行,javascript,html,graph,highcharts,Javascript,Html,Graph,Highcharts,如何设置highcharts以忽略html表的最后一行(包含总计)?我不想在标记中包含来自单元格的数据,因为这会为total field创建另一个折线图,从而弄乱图形 HTML: 您可以使用定义最大行的endRow参数 更多参数将在的标题中介绍 <table class="internal-table tablesorter" id="heythere"> <thead> <tr> <th>Inte
您可以使用定义最大行的
endRow
参数
更多参数将在的标题中介绍
<table class="internal-table tablesorter" id="heythere">
<thead>
<tr>
<th>Internal</th>
<th>Marks</th>
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td>20</td>
</tr>
<tr>
<th>2</th>
<td>20</td>
</tr>
<tr>
<th>3</th>
<td>10</td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="total">Total</td>
<td>50</td>
</tr>
</tfoot>
</table>
$(function () {
$('#dc-graph').highcharts({
data: {
table: document.getElementById('heythere')
},
chart: {
type: 'line',
backgroundColor: 'transparent',
style: {
fontFamily: 'Lato',
}
},
title: {
text: 'INTERNAL PERFORMANCE',
style: {
color: 'rgba(255,255,255,0.2)',
fontWeight: 'bold',
fontSize: '0.8rem',
letterSpacing: '1px'
}
},
legend: {
enabled: false
},
xAxis: {
allowDecimals: false,
lineColor: 'rgba(255,255,255,0.2)',
tickColor: 'rgba(255,255,255,0.1)',
labels: {
format: 'Internal #{value}',
style: {
color: 'rgba(255,255,255,0.5)',
}
},
}
},
});
});