Yes:
AreaChart::create(array(
"dataSource" => $breakeven_data,
"columns" => array(
"date_time" => array(
"label" => "Date",
),
"total_cost" => array(
"label" => "Total Cost",
"type" => "number",
"prefix" => '$',
),
"sold_amount" => array(
"label" => "Revenue",
"type" => "number",
"prefix" => '$',
),
),
"options" => [
'yaxis | labels' => [ // yaxis | labels: Customize the Y axis labels
'style' => [
"colors" => ['#adadad']
],
'formatter' => "function(value, index) {
return '$ ' + value.toLocaleString();
}"
],
'xaxis | labels' => [ // xaxis | labels: Customize the x axis labels
'style' => [
"colors" => '#adadad'
],
'formatter' => "function(value) {
return typeof value === 'string' ? (value.length > 15 ? value.substring(0, 15) + '...' : value) : '';
}",
'show' => true,
'rotate' => -45 // Rotate labels if they overlap
],
'xaxis | tickAmount' => 10, // Defines the number of ticks on the X axis to avoid overlap.
'legend' => [
'position' => 'bottom', // Move legend to the bottom for small screens
'horizontalAlign' => 'center',
'floating' => false //the legend should float above the chart
],
'chart' => [
'height' => 260, // Default height
],
'responsive' => [
[
'breakpoint' => 1000,
'options' => [
'chart' => [
'height' => 350
],
'xaxis' => [
'labels' => [
'rotate' => -30
]
]
]
],
[
'breakpoint' => 600,
'options' => [
'chart' => [
'height' => 300
],
'xaxis' => [
'labels' => [
'rotate' => -45
]
],
'legend' => [
'position' => 'bottom'
]
]
]
]
],
'colors' => [
'#008ffb',
'#00e396'
],
"widthHeightAutoRatio" => 3,
"showLegend" => true
));
?>