app/Statistics/Google/ChartDistribution.php
private function createChartData(array $places): array
    {
        $data = [
            [
                I18N::translate('Country'),
                I18N::translate('Total'),
            ],
        ];

        // webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes.
        foreach ($places as $country => $count) {
            $data[] = [
                [
                    'v' => $country,
                    'f' => $this->country_service->mapTwoLetterToName($country),
                ],
                $count
            ];
        }

        return $data;
    }
private function createChartData(array $places): array
    {
        $data = [
            [
                I18N::translate('Country'),
                I18N::translate('Total'),
            ],
        ];

        // webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes.
        foreach ($places as $country => $count) {
            $data[] = [
                [
                    'v' => $country,
                    'f' => $this->country_service->mapTwoLetterToName($country),
                ],
                $count
            ];
        }

        return $data;
    }
private function createChartData ( array $ places ) : array { $ data = [ [ I18N :: translate ( 'Country' ) , I18N :: translate ( 'Total' ) , ] , ] ; // webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes. foreach ( $ places as $ country => $ count ) { $ data [ ] = [ [ 'v' => $ country , 'f' => $ this -> country_service -> mapTwoLetterToName ( $ country ) , ] , $ count ] ; } return $ data ; }
Returns the data structure required by google geochart.

@param array $places

@return array
Returns the data structure required by google geochart .