Data within DataTables can be easily rendered to add graphics or colour to your tables, as demonstrated in the example on this page. These examples make use of columns.render and drawCallback to customise the cells in three ways:1. the colour of the cell is determine by the relative price of the stock.
2. a 'sparkline' class is added to the numeric array in the 'last' column.
3. the jQuery Sparklines plugin is called to turn that array into a line graph.
Name
Symbol
Price
Difference
Last
Name
Symbol
Price
Difference
Last
Row Create Callback
For each row that is generated for display, the createdRow function is called once and once only. It is passed the create row node which can then be modified.the 'salary' column Primary and bold by adding a CSS class to the container cell if the salary is greater than $150,000.the 'salary' column danger and bold by adding a CSS class to the container cell if the salary is less than $40,000.