海工商新版后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
819 B

<?php
namespace App\Admin\Metrics\Chart;
use Dcat\Admin\Widgets\ApexCharts\Chart;
class Registering extends Chart
{
public function __construct($containerSelector = null, $options = [])
{
parent::__construct($containerSelector, $options);
$this->setUpOptions();
}
//初始化方法,主要是调用$this->options()方法,执行整个option的初始化操作。
protected function setUpOptions()
{
$this->options([
"chart"=>[
"width"=>380,
"type"=>"pie"
],
]);
// 执行你的数据查询逻辑
$data = [44, 55, 13, 43, 22];
$label = ['Team A', 'Team B', 'Team C', 'Team D', 'Team E'];
$this->option("series",$data);
$this->option("labels",$label);
}
}