`
Map Process
Map data rows' value and metadata
productName | orderYear | orderQuarter | dollar_sales |
---|---|---|---|
1937 Lincoln Berline | 2003 | 1 | 3726.45 |
1936 Mercedes-Benz 500K Special Roadster | 2003 | 1 | 1768.3300000000002 |
1952 Alpine Renault 1300 | 2003 | 1 | 5571.8 |
1962 LanciaA Delta 16V | 2003 | 1 | 5026.14 |
1958 Setra Bus | 2003 | 1 | 3284.28 |
->pipe(new Map(array(
'{value}' => function($row, $metaData) {
$row['orderQuarter'] = 'Q ' . $row['orderQuarter'];
return array($row);
},
'{meta}' => function($metaData) {
$metaData['columns']['productName'] = array(
'label' => 'Products',
);
$metaData['columns']['orderYear'] = array(
'label' => 'Year',
'type' => 'string',
);
$metaData['columns']['orderQuarter'] = array(
'label' => 'Quarter',
'type' => 'string',
);
$metaData['columns']['dollar_sales'] = array(
'label' => 'Sales',
'type' => 'number',
"prefix" => "$",
);
return $metaData;
},
)))
Products | Year | Quarter | Sales |
---|---|---|---|
1937 Lincoln Berline | 2003 | Q 1 | $3,726 |
1936 Mercedes-Benz 500K Special Roadster | 2003 | Q 1 | $1,768 |
1952 Alpine Renault 1300 | 2003 | Q 1 | $5,572 |
1962 LanciaA Delta 16V | 2003 | Q 1 | $5,026 |
1958 Setra Bus | 2003 | Q 1 | $3,284 |
What People Are Saying
"KoolReport helps me very much in creating data report for my corporate! Keep up your good work!"
--
Alain Melsens
"The first use of your product. I was impressed by its easiness and powerfulness. This product is a great and amazing."
--
Dr. Lew Choy Onn
"Fantastic framework for reporting!"
--
Greg Schneider