The above example shows you how to create RadialBarChart
using ApexCharts package. In this example, for purpose of chart demonstration only, we do use mock-up data from array. As you can see, the KoolReport's widget in general support dataSource could be DataStore, Process, DataSource or even simple array.
<?php
require_once "../../../../load.koolreport.php";
require_once "MyReport.php";
$report = new MyReport;
$report->run()->render();
<?php
class MyReport extends \koolreport\KoolReport
{
}
<div class="report-content">
<div class="text-center">
<h1>RadialBarChart</h1>
<p class="lead">
This example shows how to create beautiful RadialBarChart
</p>
</div>
<style>
.apexcharts-canvas {
margin: 0 auto;
}
</style>
<div style="margin-bottom:50px;">
<?php
$data = [
[
'label',
'series-1'
],
[
'Volatility',
67
]
];
\koolreport\apexcharts\RadialBarChart::create(array(
// "title" => "Product Trends by Month",
"dataSource" => $data,
"columns" => array(
"label",
"series-1"
),
"options" => [
'plotOptions | radialBar' => [
'hollow' => [
'margin' => 15,
'size' => '70%',
'image' => './images/clock.png',
'imageWidth' => 64,
'imageHeight' => 64,
'imageClipped' => false
],
'dataLabels | name' => [
'show' => false,
'color' => '#fff'
],
'dataLabels | value' => [
'show' => true,
'color' => '#333',
'offsetY' => 70,
'fontSize' => '22px'
]
],
'fill | image' => [
'src' => '../with_image/images/4274635880_809a4b9d0d_z.jpg',
],
'stroke | lineCap' => 'round',
],
'fillType' => 'image',
"showLegend" => false,
// "showLabel" => true,
// "height" => "600px",
// "width" => "85%",
"maxWidth" => "450px",
));
?>
</div>
</div>