diff --git a/app/Admin/Metrics/Chart/FullPaymentRateColumnCharts.php b/app/Admin/Metrics/Chart/FullPaymentRateColumnCharts.php index 548eea3..d640f5b 100644 --- a/app/Admin/Metrics/Chart/FullPaymentRateColumnCharts.php +++ b/app/Admin/Metrics/Chart/FullPaymentRateColumnCharts.php @@ -10,6 +10,7 @@ use App\Models\PaymentList; use App\Models\SecondaryCollege; use App\Models\Speciality; use App\Models\UsersMember; +use Dcat\Admin\Support\JavaScript; use Dcat\Admin\Widgets\ApexCharts\Chart; use Illuminate\Support\Facades\DB; @@ -32,12 +33,15 @@ class FullPaymentRateColumnCharts extends Chart "height"=>350, //高度 "type"=>"bar", //chart 类型 ], + ]); - $data = [[ + $data = [ + [ "name" => "缴费率", "data" => [], - ]]; + ] + ]; $label = []; // 执行你的数据查询逻辑 @@ -129,5 +133,32 @@ class FullPaymentRateColumnCharts extends Chart $this->option("labels",$label); $this->option("yaxis",["max" => 100]); //Y轴最大值 + $this->option( + 'tooltip.custom', + JavaScript::make("function({ series, seriesIndex, dataPointIndex, w }) { +