- Components
- funnel
Funnel
Funnels for conversion steps.
Simple
One step per row, in order.
| Step | People |
|---|---|
| Visited pricing | 12.4k |
| Started checkout | 3.9k |
| Entered payment | 2.1k |
| Paid | 1.7k |
@php
$steps = [
['step' => 'Visited pricing', 'people' => 12400],
['step' => 'Started checkout', 'people' => 3900],
['step' => 'Entered payment', 'people' => 2100],
['step' => 'Paid', 'people' => 1650],
];
@endphp
<x-ui.echart type="funnel" :data="$steps" index="step" label="Checkout funnel" class="h-72 w-full max-w-lg" />
Values inside the steps
options
puts the labels inside, with the value of each step.
| Step | Users |
|---|---|
| Signed up | 5.2k |
| Created a token | 3.1k |
| Installed a component | 2.5k |
| Installed a Pro block | 890 |
@php
$onboarding = [
['step' => 'Signed up', 'users' => 5200],
['step' => 'Created a token', 'users' => 3100],
['step' => 'Installed a component', 'users' => 2450],
['step' => 'Installed a Pro block', 'users' => 890],
];
@endphp
{{-- Labels inside the steps, values shown: all through `options`. --}}
<x-ui.echart type="funnel" :legend="false" :data="$onboarding" index="step" label="Onboarding funnel" class="h-80 w-full max-w-lg" :options="[
'series' => [[
'label' => ['position' => 'inside', 'formatter' => '{b}: {c}', 'color' => '#fff', 'fontWeight' => 500],
'minSize' => '20%',
]],
]" />
See Chart for installation and every prop.