<?php
declare(strict_types=1);

use Fisharebest\Webtrees\I18N;

$chart_options = [
    'title' => '',
    'subtitle' => '',
    'height' => 400,
    'width'  => '50%',
    'legend' => [
        'position'  => 'right',
        'alignment' => 'center',
    ],
    'series' => [
        2 => [
            // Average
            'type' => 'line',
            'enableInteractivity' => false,
        ],
    ],
    'vAxis' => [
        'title' => I18N::translate('Total'),
    ],
    'hAxis' => [
        'title' => I18N::translate('Age'),
    ],
    'colors' => [
        '#84beff',
        '#ffd1dc',
        '#ff0000',
    ],
    'isStacked' => true,
];

echo view(
    'statistics/other/charts/column',
    [
        'data'          => $data,
        'chart_options' => $chart_options,
        'chart_title'   => $title,
    ]
);
