The code below (most of which is from the example) is showing a percent complete of zero. I can see that the num_titles=5 and the num_title_complete=3 in the dataStore with my debugger. Where is the array that is created? I'd like to check the values in it? When I hardcode 5 and 3 into value and baseValue, it works fine.
\koolreport\amazing\ProgressCard::create(array(
"title"=>"Percent Complete",
"infoText"=>"Three Way Risk Analysis",
"value"=>$this->dataStores['global_summary']['rows'][0]['num_titles_complete'], //completed rows
"preset"=>"primary",
"baseValue"=>$this->dataStores['global_summary']['rows'][0]['num_titles'], //number of rows
"format"=>array(
"value"=>array(
"prefix"=>"complete"
),
"indicator"=>array(
"decimals"=>2
)
),
"cssClass"=>array(
"icon"=>"fa fa-euro"
),
));
I also tried using a SimpleCard like this:
SimpleCard::create(array(
"title"=>"Number of Employees",
"value"=>$this->dataStores['campaigns2']['rows'][0]['number_of_employees'],
"preset"=>"primary",
"cssClass"=>array(
"icon"=>"fa fa-shopping-cart",
"card"=>"p-3",
),
));
But again, the value is not working correctly for me.