' . esc_html__( 'Not enough data yet.', 'praisebloom' ) . '
'; } $width = 560; $height = 150; $max = max( 1, max( $values ) ); $points = array(); foreach ( $values as $i => $value ) { $x = round( $i / ( $count - 1 ) * $width, 1 ); $y = round( $height - 10 - ( $value / $max ) * ( $height - 30 ), 1 ); $points[] = $x . ',' . $y; } $line = implode( ' ', $points ); $area = 'M' . str_replace( ' ', ' L', $line ) . ' L' . $width . ',' . $height . ' L0,' . $height . ' Z'; $labels = array(); $label_count = 5; for ( $i = 0; $i < $label_count; $i++ ) { $idx = (int) round( $i / ( $label_count - 1 ) * ( $count - 1 ) ); $labels[] = date_i18n( 'M j', strtotime( $keys[ $idx ] ) ); } $svg = ''; $svg .= '[praisebloom_form]
[praisebloom layout="grid" template="classic" columns="3"]
[praisebloom layout="grid" template="classic" columns="3" limit="9"]