Remove package fx3costa/laravelchartjs
This commit is contained in:
parent
da48fd84dc
commit
4c54a391be
|
|
@ -31,43 +31,39 @@ class AdminController extends Controller
|
||||||
$data['texture_uploads'][] = Texture::like('upload_at', $time->toDateString())->count();
|
$data['texture_uploads'][] = Texture::like('upload_at', $time->toDateString())->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
$chart = app()->chartjs
|
$datasets = [
|
||||||
->name('overview_chart')
|
[
|
||||||
->type('line')
|
'label' => trans('admin.index.user-registration'),
|
||||||
->size(['width' => 400, 'height' => 200])
|
'backgroundColor' => 'rgba(60, 141, 188, 0.6)',
|
||||||
->labels($labels)
|
'borderColor' => '#3c8dbc',
|
||||||
->datasets([
|
'pointRadius' => 0,
|
||||||
[
|
'pointBorderColor' => '#3c8dbc',
|
||||||
'label' => trans('admin.index.user-registration'),
|
'pointBackgroundColor' => '#3c8dbc',
|
||||||
'backgroundColor' => 'rgba(60, 141, 188, 0.6)',
|
'pointHoverBackgroundColor' => '#3c8dbc',
|
||||||
'borderColor' => '#3c8dbc',
|
'pointHoverBorderColor' => '#3c8dbc',
|
||||||
'pointRadius' => 0,
|
'data' => $data['user_registration'],
|
||||||
'pointBorderColor' => '#3c8dbc',
|
],
|
||||||
'pointBackgroundColor' => '#3c8dbc',
|
[
|
||||||
'pointHoverBackgroundColor' => '#3c8dbc',
|
'label' => trans('admin.index.texture-uploads'),
|
||||||
'pointHoverBorderColor' => '#3c8dbc',
|
'backgroundColor' => 'rgba(210, 214, 222, 0.6)',
|
||||||
'data' => $data['user_registration'],
|
'borderColor' => '#d2d6de',
|
||||||
],
|
'pointRadius' => 0,
|
||||||
[
|
'pointBorderColor' => '#c1c7d1',
|
||||||
'label' => trans('admin.index.texture-uploads'),
|
'pointBackgroundColor' => '#c1c7d1',
|
||||||
'backgroundColor' => 'rgba(210, 214, 222, 0.6)',
|
'pointHoverBackgroundColor' => '#c1c7d1',
|
||||||
'borderColor' => '#d2d6de',
|
'pointHoverBorderColor' => '#c1c7d1',
|
||||||
'pointRadius' => 0,
|
'data' => $data['texture_uploads'],
|
||||||
'pointBorderColor' => '#c1c7d1',
|
]
|
||||||
'pointBackgroundColor' => '#c1c7d1',
|
];
|
||||||
'pointHoverBackgroundColor' => '#c1c7d1',
|
|
||||||
'pointHoverBorderColor' => '#c1c7d1',
|
|
||||||
'data' => $data['texture_uploads'],
|
|
||||||
]
|
|
||||||
])
|
|
||||||
->options([
|
|
||||||
'tooltips' => [
|
|
||||||
'intersect' => false,
|
|
||||||
'mode' => 'index'
|
|
||||||
]
|
|
||||||
]);
|
|
||||||
|
|
||||||
return view('admin.index', compact('chart'));
|
$options = [
|
||||||
|
'tooltips' => [
|
||||||
|
'intersect' => false,
|
||||||
|
'mode' => 'index'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('admin.index', ['chartOptions' => compact('labels', 'datasets', 'options')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function customize(Request $request)
|
public function customize(Request $request)
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@
|
||||||
"doctrine/inflector": "1.1.0",
|
"doctrine/inflector": "1.1.0",
|
||||||
"laravel/framework": "5.2.*",
|
"laravel/framework": "5.2.*",
|
||||||
"devitek/yaml-translation": "^2.0",
|
"devitek/yaml-translation": "^2.0",
|
||||||
"printempw/laravel-datatables-lite": "^1.0",
|
"printempw/laravel-datatables-lite": "^1.0"
|
||||||
"fx3costa/laravelchartjs": "^2.5"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
|
|
|
||||||
54
composer.lock
generated
54
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "93065cb8a9e776fe417866c9741f35e5",
|
"content-hash": "7cc7aede94ac363755668bb4198c9ca4",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "classpreloader/classpreloader",
|
"name": "classpreloader/classpreloader",
|
||||||
|
|
@ -301,58 +301,6 @@
|
||||||
],
|
],
|
||||||
"time": "2017-10-15T13:05:10+00:00"
|
"time": "2017-10-15T13:05:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "fx3costa/laravelchartjs",
|
|
||||||
"version": "2.5.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/fxcosta/laravel-chartjs.git",
|
|
||||||
"reference": "21eaf327118ca512b6503979d4ae75ad3a463e68"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://files.phpcomposer.com/files/fxcosta/laravel-chartjs/21eaf327118ca512b6503979d4ae75ad3a463e68.zip",
|
|
||||||
"reference": "21eaf327118ca512b6503979d4ae75ad3a463e68",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.*",
|
|
||||||
"php": ">=5.6.4"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"Fx3costa\\LaravelChartJs\\Providers\\ChartjsServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Fx3costa\\LaravelChartJs\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Felix",
|
|
||||||
"email": "fx3costa@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library",
|
|
||||||
"keywords": [
|
|
||||||
"chart",
|
|
||||||
"chartjs",
|
|
||||||
"fx3costa",
|
|
||||||
"graphics",
|
|
||||||
"laravel5",
|
|
||||||
"reports"
|
|
||||||
],
|
|
||||||
"time": "2018-02-20T17:00:36+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "gregwar/captcha",
|
"name": "gregwar/captcha",
|
||||||
"version": "v1.1.5",
|
"version": "v1.1.5",
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,6 @@ return [
|
||||||
Devitek\Core\Translation\TranslationServiceProvider::class,
|
Devitek\Core\Translation\TranslationServiceProvider::class,
|
||||||
Swiggles\Memcache\MemcacheServiceProvider::class,
|
Swiggles\Memcache\MemcacheServiceProvider::class,
|
||||||
Yajra\Datatables\DatatablesServiceProvider::class,
|
Yajra\Datatables\DatatablesServiceProvider::class,
|
||||||
Fx3costa\LaravelChartJs\Providers\ChartjsServiceProvider::class,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application Service Providers...
|
* Application Service Providers...
|
||||||
|
|
|
||||||
|
|
@ -71,9 +71,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="chart">
|
<canvas id="overview" width="400" height="200"></canvas>
|
||||||
{!! $chart->render() !!}
|
<div class="chart"></div>
|
||||||
</div>
|
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -83,4 +82,16 @@
|
||||||
</div><!-- /.content-wrapper -->
|
</div><!-- /.content-wrapper -->
|
||||||
|
|
||||||
<script type="text/javascript" src="{{ assets('js/chart.js') }}"></script>
|
<script type="text/javascript" src="{{ assets('js/chart.js') }}"></script>
|
||||||
|
<script>
|
||||||
|
var chartOptions = {!! json_encode($chartOptions) !!};
|
||||||
|
|
||||||
|
var chart = new Chart(document.getElementById('overview').getContext('2d'), {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
labels: chartOptions.labels,
|
||||||
|
datasets: chartOptions.datasets
|
||||||
|
},
|
||||||
|
options: chartOptions.options
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user