fuel gauage modification
This commit is contained in:
21
app/Charts/StructureFuelGauge.php
Normal file
21
app/Charts/StructureFuelGauge.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Charts;
|
||||||
|
|
||||||
|
//Internal Library
|
||||||
|
use ConsoleTVs\Charts\Classes\ChartJs\Chart;
|
||||||
|
|
||||||
|
class StructureFuelGauge extends Chart
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Initializes the chart.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ use Log;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Khill\Lavacharts\Lavacharts;
|
use Khill\Lavacharts\Lavacharts;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Charts;
|
||||||
|
|
||||||
//Library Helpers
|
//Library Helpers
|
||||||
use App\Library\Assets\AssetHelper;
|
use App\Library\Assets\AssetHelper;
|
||||||
@@ -57,6 +58,7 @@ class FuelController extends Controller
|
|||||||
public function displayStructureFuel($id) {
|
public function displayStructureFuel($id) {
|
||||||
//Declare class variables
|
//Declare class variables
|
||||||
$lava = new Lavacharts;
|
$lava = new Lavacharts;
|
||||||
|
$chartJs = new StructureFuelGauage;
|
||||||
$aHelper = new AssetHelper(null, null, null);
|
$aHelper = new AssetHelper(null, null, null);
|
||||||
|
|
||||||
$structure = Structure::where(['structure_id' => $id])->first();
|
$structure = Structure::where(['structure_id' => $id])->first();
|
||||||
@@ -71,12 +73,15 @@ class FuelController extends Controller
|
|||||||
->addRow(['Liquid Ozone', $liquidOzone]);
|
->addRow(['Liquid Ozone', $liquidOzone]);
|
||||||
$lava->GaugeChart('Liquid Ozone', $gauge, [
|
$lava->GaugeChart('Liquid Ozone', $gauge, [
|
||||||
'width' => 400,
|
'width' => 400,
|
||||||
'redFrom' => 0,
|
'greenFrom' => 0,
|
||||||
'redTo' => 75000,
|
'greenTo' => 75000,
|
||||||
|
'greenColor' => '#DC3912',
|
||||||
'yellowFrom' => 75000,
|
'yellowFrom' => 75000,
|
||||||
'yellowTo' => 150000,
|
'yellowTo' => 150000,
|
||||||
'greenFrom' => 150000,
|
'yellowColor' => '#FF9900',
|
||||||
'greenTo' => 1000000,
|
'redFrom' => 150000,
|
||||||
|
'redTo' => 1000000,
|
||||||
|
'redColor' => '#109618',
|
||||||
'majorTicks' => [
|
'majorTicks' => [
|
||||||
'Empty',
|
'Empty',
|
||||||
'Ok',
|
'Ok',
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ return [
|
|||||||
//nullx27\Socialite\EveOnline\Providers\EveOnlineServiceProvider::class,
|
//nullx27\Socialite\EveOnline\Providers\EveOnlineServiceProvider::class,
|
||||||
Laravel\Socialite\SocialiteServiceProvider::class,
|
Laravel\Socialite\SocialiteServiceProvider::class,
|
||||||
Khill\Lavacharts\Laravel\LavachartsServiceProvider::class,
|
Khill\Lavacharts\Laravel\LavachartsServiceProvider::class,
|
||||||
|
ConsoleTVs\Charts\ChartsServiceProvider::class,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -218,6 +219,7 @@ return [
|
|||||||
'Html' => Collective\Html\HtmlFacade::class,
|
'Html' => Collective\Html\HtmlFacade::class,
|
||||||
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
|
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
|
||||||
'Lava' => Khill\Lavacharts\Laravel\LavachartsFacade::class,
|
'Lava' => Khill\Lavacharts\Laravel\LavachartsFacade::class,
|
||||||
|
'Charts' => ConsoleTVs\Charts\Charts::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
15
config/charts.php
Normal file
15
config/charts.php
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default library used in charts.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value is used as the default chart library used when creating
|
||||||
|
| any chart in the command line. Feel free to modify it or set it up
|
||||||
|
| while creating the chart to ignore this value.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'default_library' => 'Chartjs',
|
||||||
|
];
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
@extends('layouts.b4')
|
@extends('logistics.layouts.b4')
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<br>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -11,4 +12,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
@endsection
|
@endsection
|
||||||
41
resources/views/logistics/layout/b4.blade.php
Normal file
41
resources/views/logistics/layout/b4.blade.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
<head>
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-140677389-1"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'UA-140677389-1');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<title>{{ config('app.name', 'W4RP Services') }}</title>
|
||||||
|
<!-- Required meta tags -->
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
|
||||||
|
<!-- CSRF Token -->
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
<!-- Bootstrap CSS
|
||||||
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
|
||||||
|
-->
|
||||||
|
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||||
|
<link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
@include('layouts.navbar')
|
||||||
|
<div class="container">
|
||||||
|
@include('inc.messages')
|
||||||
|
</div>
|
||||||
|
@yield('content')
|
||||||
|
<!-- Optional JavaScript -->
|
||||||
|
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||||
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js" charset="utf-8"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user