first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Charts;
|
||||
|
||||
use ArielMejiaDev\LarapexCharts\LarapexChart;
|
||||
|
||||
class ExampleChart
|
||||
{
|
||||
protected $chart;
|
||||
|
||||
public function __construct(LarapexChart $chart)
|
||||
{
|
||||
$this->chart = $chart;
|
||||
}
|
||||
|
||||
public function build($options = null)
|
||||
{
|
||||
return $this->chart->areaChart()
|
||||
->setTitle('Contracts during last six months.')
|
||||
->setSubtitle('New and Completed.')
|
||||
->addData('New', [4, 9, 5, 2, 1, 8])
|
||||
->addData('Completed', [7, 2, 7, 2, 5, 4])
|
||||
->setColors(['#1A56DB', '#ff6384'])
|
||||
->setXAxis(['January', 'February', 'March', 'April', 'May', 'June'])
|
||||
->setToolbar(true)
|
||||
->toVue();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user