How to render progress bar with data from 2 Columns
How to render progress bar with data from 2 Columns
support@kosmos.de
Posts: 16Questions: 7Answers: 0
Hello,
i have added a progressbar to my table.
But iI haven been able to set the Max valu to the "betrag" valu, the value in column 1.
how can I achive this?
columns: [
{ data: "name" },
{ data: "betrag", render: $.fn.dataTable.render.number( '.', ',', 0, '€' ) },
{ data: "prognose" ,
render: function (data, type, row, meta) {
return type === 'display'
? '<progress value="' + data + '" max= "' + row[1]+'"></progress>'
: 100;
},},
],
This question has an accepted answers - jump to answer
Answers
This is used with array data. You are using objects so you need to use
row.betrag
instead.Kevin
is there a way to change the color to red?
This tutorial shows techniques to style the HTML5 progress bar. Also take a look at the CSS tab of this example.
Kevin