1
Как настроить высокие диаграммы для игнорирования последней строки таблицы html (которая содержит общее количество)? Я не хочу включать данные из ячеек в теги, так как это испортит график, создав еще один график линии для полного поля.Игнорировать строки таблицы tfoot при создании 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)',
}
},
}
},
});
});