> $rows label and values. * @var string $metric Name of the measure being divided up. * @var string $error Why the report is missing, when it is. * @var string $empty What to say when there is nothing to show. * @var string $id Unique id stem. */ use AdPix\Analytics\View\Chart; use AdPix\Analytics\View\Format; defined( 'ABSPATH' ) || exit; /** * Geometry of the ring. The radius and the stroke are in view-box units; the circumference is what * the dash lengths are measured along. */ $adpix_radius = 40.0; $adpix_circumference = 2 * M_PI * $adpix_radius; $adpix_values = array_map( static function ( array $row ): float { return isset( $row['values'][0] ) ? (float) $row['values'][0] : 0.0; }, $rows ); $adpix_total = array_sum( $adpix_values ); $adpix_segments = Chart::segments( $adpix_values, $adpix_circumference ); ?>

$adpix_segment ) : ?>