I have a vary basic question and very little understanding of dc.js. I am trying to create a score card using the data that i have and display it as a data table using dc.js
You can do that with css.
I'm using datatables jquery plugin.
{ targets: 3,
data: function (d) {
if (d.Rating<5) { return '<span class="red">'+d.Rating+'</span>' ;}
else if (d.Rating<7) { return '<span class="yellow">'+d.Rating+'</span>' ;}
else if (d.Rating<=10) {return '<span class="green">'+d.Rating+'</span>' ;}
else { return '<span class="grey">'+d.Rating+'</span>' ;}
}}
you can make as much categories as you want.
And modify appearence with css like this.
.red{ background-color:red; }
.yellow{ background-color:yellow; }
.green{ background-color:green; }