如何设置highcharts以忽略html表的最后一行(包含总计)?我不想在标签中包含来自单元格的数据,因为这会通过为总字段创建另一个折线图来弄乱图表。
HTML:
<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>
JS:
$(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)',
}
},
}
},
});
});