PHP code example of jonpurvis / radial
1. Go to this page and download the library: Download jonpurvis/radial library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jonpurvis / radial example snippets
$data = [
['label' => 'Critical', 'value' => 40, 'class' => 'text-red-500'],
['label' => 'Warning', 'value' => 25, 'class' => 'text-yellow-500'],
['label' => 'Healthy', 'value' => 35, 'class' => 'text-green-500'],
];
blade
<radial:donut :data="$data" legend="bottom" />
<radial:donut :data="$data" legend="top" />
<radial:donut :data="$data" legend="left" />
<radial:donut :data="$data" legend="right" />
blade
<radial:donut :data="$data" :static="true" :tooltip="false" />
blade
<radial:pie :data="$data" legend="right" />
blade
<radial:pie :data="$data" :static="true" :tooltip="false" />
blade
@php
$chartData = [
['label' => 'Critical', 'value' => 40, 'class' => 'text-red-500'],
['label' => 'Warning', 'value' => 25, 'class' => 'text-yellow-500'],
['label' => 'Healthy', 'value' => 35, 'class' => 'text-green-500'],
];
@endphp
<div class="flex flex-wrap gap-8 justify-center items-start">
<radial:donut :data="$chartData" label="Total" legend="bottom" />
<radial:pie :data="$chartData" legend="right" />
</div>