3
In my system I have a table mounted by DataTables
. Data is received from the server via Ajax.
Example of the data structure loaded in the table:
DDD | Processed | Approved | Percentage |
11 - 19 | 2.660 | 574 | 21.58% |
21 - 28 | 2.249 | 298 | 13.25% |
And the way I’m using the configuration parameters:
var oTable = $('#tblList').dataTable({
"aaData": dtData,
"bFilter": true,
"bInfo": true,
"bStateSave": false,
"oLanguage": {
"sUrl": "pt.txt"
},
"bJQueryUI": true,
"bProcessing": true,
"bDestroy": true,
"bPaginate": true,
"bLengthChange": false,
"sPaginationType": "full",
"aLengthMenu": [[10], [10]],
"dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>',
"bAutoWidth": false,
"aoColumns": [{ "sWidth": "50%" }, { "sWidth": "15%" }, { "sWidth": "15%" }, { "sWidth": "20%" }],
"aoColumnDefs":
[{ "sTitle": "DDD", "bSortable": true, "sName": "ddd", "aTargets": [0] },
{ "sTitle": "Processados", "bSortable": true, "sName": "Processados", "aTargets": [1] },
{ "sTitle": "Aprovados", "bSortable": true, "sName": "Aprovados", "aTargets": [2] },
{ "sTitle": "Percentual de Aprovação", "bSortable": true, "sName": "Percentual de Aprovação", "aTargets": [3] }]
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
I need to know some way to highlight the line that has the highest percentage, in this case (21.58%). Using a background color, or text color, font, etc.
I don’t quite understand what you’re wanting, you want to highlight the color in the Datatable class? or in some grid ?
– Marco Souza
I want to highlight the Datatable line. Using some function or configuration of the https://datatables.net plugin/
– Diego Moreno