diff --git a/app/Admin/Metrics/Users.php b/app/Admin/Metrics/Users.php index 53c34465..f832d023 100644 --- a/app/Admin/Metrics/Users.php +++ b/app/Admin/Metrics/Users.php @@ -23,6 +23,7 @@ class Users extends Donut $this->chartHeight(300); $this->chartOption('chart.width', '300'); $this->chartOption('dataLabels.enabled', true); + // $this->chartOption('plotOptions.pie.donut.total.show', true); $this->chartMarginBottom(50); $this->chart->style('float: none;'); $color = Admin::color(); @@ -74,6 +75,19 @@ class Users extends Donut // dd($data); return $this->chart([ 'series' => array_values($data), + 'plotOptions' => [ + 'pie' => [ + 'donut' => [ + 'labels'=>[ + 'show'=>'true', + 'total' => [ + 'show' => true, + 'label'=>'会员总数', + ], + ], + ], + ], + ], ]); }