changes to sms packages and option to create user
This commit is contained in:
@@ -11,8 +11,8 @@ class ExampleChart
|
||||
public function __construct(LarapexChart $chart)
|
||||
{
|
||||
$this->chart = $chart;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function build($options = null)
|
||||
{
|
||||
$data = \App\Models\ClientCase::query()
|
||||
@@ -22,20 +22,19 @@ public function build($options = null)
|
||||
->groupByRaw('EXTRACT(MONTH from created_at)')
|
||||
->orderByRaw('EXTRACT(MONTH from created_at)')
|
||||
->get();
|
||||
|
||||
|
||||
$months = $data->pluck('month')->map(
|
||||
fn($nu)
|
||||
=> \DateTime::createFromFormat('!m', $nu)->format('F'))->toArray();
|
||||
|
||||
fn ($nu) => \DateTime::createFromFormat('!m', $nu)->format('F'))->toArray();
|
||||
|
||||
$newCases = $data->pluck('count')->toArray();
|
||||
|
||||
return $this->chart->areaChart()
|
||||
->setTitle('Novi primeri zadnjih šest mesecev.')
|
||||
->addData('Primeri', $newCases)
|
||||
//->addData('Completed', [7, 2, 7, 2, 5, 4])
|
||||
// ->addData('Completed', [7, 2, 7, 2, 5, 4])
|
||||
->setColors(['#ff6384'])
|
||||
->setXAxis($months)
|
||||
->setToolbar(true)
|
||||
->toVue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user