Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Hi Jacky,
For the first column, you may use the "formatValue"
<?php
Table::create(array(
...
"columns"=>array(
"amount"=>array(
'formatValue'=>function($value)
{
return "$ ".$value; //You should return html containing name and colored circle
}
),
),
...
));
?>
For second column, you may use the cssClass like below:
Table::create(array(
"cssClass"=>array(
"td"=>function($row,$columnName)
{
if($columnName=="column2") //Replace with your real name of column 2
{
//Base on $row["{column_name}"], you return correct css class to add css class
if($row["first_column"]=="water")
{
return "blueCss";
}
}
}
)
));
?>
Now you should have the <style>
to define color
<style>
.blueCss
{
background-color;blue;
}
</style>
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo