$res = [
[
'label' => __('Visites'),
- 'backgroundColor' => 'hsl(72 100% 38% / 100%)', // Could make bars semi-transparent if desired
- // borderColor: 'hsl(72 100% 38%)',
- // borderWidth: 1,
+ 'backgroundColor' => '#f54d00', // Could make bars semi-transparent if desired
+ 'borderColor'=> '#000000',
+ 'borderWidth'=> 1,
'data' => $this->_pagesByPeriod->pluck('nb_visits')->toArray(),
'order' => 1,
'bar_offset' => -5, // Negative offset shifts bar to left
],
[
'label' => __('Pages vues'),
- 'backgroundColor' => 'hsl(0 0% 53%)',
+ 'backgroundColor' => '#514e49',
+ 'borderColor'=> '#000000',
+ 'borderWidth'=> 1,
'data' => $this->_pagesByPeriod->pluck('nb_hits')->toArray(),
'order' => 2,
'bar_offset' => 5, // Positive offset shifts bar to right
$res = array_merge([
[
'label' => __('Visiteurs uniques'),
- 'backgroundColor' => 'hsl(19 100% 48% / 100%)',
+ 'backgroundColor' => 'hsl(72 100% 38% / 100%)',
+ 'borderColor'=> '#000000',
+ 'borderWidth'=> 1,
'data' => $this->_pagesByPeriod->pluck('nb_uniq_visitors')->toArray(),
'order' => 1,
'bar_offset' => -8, // Negative offset shifts bar to left
options: {
responsive: true,
maintainAspectRatio: false,
- maxBarThickness: 50, // Prevent bars being ridiculously wide when there isn't much data
+ maxBarThickness: 20, // Prevent bars being ridiculously wide when there isn't much data
scales: {
x: {stacked: true},
y: {
position: 'right',
reverse: false,
ticks: {
- color: '#9bc200',
+ color: '#f54d00',
},
grid: {
drawOnChartArea: false // only want the grid lines for one axis to show up