Update: I managed to achieve the result I wanted. I post my view code for future reference, in case anyone needs help on a similar issue.
<?php
use \koolreport\widgets\google\LineChart;
?>
<html>
<?php
LineChart::create(array(
"dataStore" => $this->dataStore("csv_data_processed"),
"columns" => array(
"ts_from",
"avg" => array(
"type" => "number"
),
"min" => array(
"type" => "number"
),
"max" => array(
"type" => "number"
)
),
"colorScheme" => array("#3B8778","#6FF2C2","#D5EFD2"),
"options" => array(
'legend' => 'none',
'hAxis' => [
'ticks' => $this->ticks
],
'vAxis' => [
'showTextEvery' => 5,
'viewWindow' => [
'min' => 30
],
'gridlines' => [
'color' => '#d1d1d1',
'count' => 12
]
]
)
));
?>
</html>
The ticks variable is an associative array and contains all the dates I want to show indexed by a number. To be clearer:
$ticks = array( ["v" => 1, "f" => "19-Apr"], ["v" => 2, "f" => "20-Apr"], ... , ["v" => 7, "f" => "25-Apr"] );
This format is strictly required by Google Charts in order to obtain gridlines right on non numeric/date h-axis values (keep in mind that Google Charts require specific javascript date objects, so PHP-generated dates are interpreted as strings). The "v" key contains a Google Charts indexable value, while the "f" key contains the text you want to show on the chart's h-axis label.
This is my result:
Hope this helps!
Thank you again David for your support.