Added details++; Vendor updates
This commit is contained in:
@@ -170,5 +170,72 @@ public function details() {
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function detailspp() {
|
||||
$pagetitle = 'Details++';
|
||||
$activeNav = 'details++';
|
||||
|
||||
$arraycounter = 0;
|
||||
for ($i = 1; $i <= 2; $i++) {
|
||||
|
||||
$temperature = Stats::select('temperature')
|
||||
->where('node_id', $i)
|
||||
->limit('144')
|
||||
->orderBy('created_at', 'desc')
|
||||
->pluck('temperature');
|
||||
|
||||
$humidity = Stats::select('humidity')
|
||||
->where('node_id', $i)
|
||||
->limit('144')
|
||||
->orderBy('created_at', 'desc')
|
||||
->pluck('humidity');
|
||||
|
||||
$gm3 = Stats::select('gm3')
|
||||
->where('node_id', $i)
|
||||
->limit('144')
|
||||
->orderBy('created_at', 'desc')
|
||||
->pluck('gm3');
|
||||
|
||||
$created_at = Stats::select('created_at')
|
||||
->where('node_id', $i)
|
||||
->limit('144')
|
||||
->orderBy('created_at', 'desc')
|
||||
->pluck('created_at');
|
||||
|
||||
$chart[$arraycounter++] = Charts::multi('line', 'material')
|
||||
->title('Zusammenfassung Node ' . $i . ' (°C)')
|
||||
->dimensions(0, 400) // Width x Height
|
||||
->template("material")
|
||||
->dataset('°C', $temperature)
|
||||
//->dataset('%', $humidity)
|
||||
//->dataset('g/m³', $gm3)
|
||||
->labels($created_at);
|
||||
|
||||
$chart[$arraycounter++] = Charts::multi('line', 'material')
|
||||
->title('Zusammenfassung Node ' . $i . ' (%)')
|
||||
->dimensions(0, 400) // Width x Height
|
||||
->template("red-material")
|
||||
//->dataset('°C', $temperature)
|
||||
->dataset('%', $humidity)
|
||||
//->dataset('g/m³', $gm3)
|
||||
->labels($created_at);
|
||||
|
||||
$chart[$arraycounter++] = Charts::multi('line', 'material')
|
||||
->title('Zusammenfassung Node ' . $i . ' (g/m³)')
|
||||
->dimensions(0, 400) // Width x Height
|
||||
->template("yellow-material")
|
||||
//->dataset('°C', $temperature)
|
||||
//->dataset('%', $humidity)
|
||||
->dataset('g/m³', $gm3)
|
||||
->labels($created_at);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return view('details++')->with([
|
||||
'pagetitle' => $pagetitle,
|
||||
'activeNav' => $activeNav,
|
||||
'chart' => $chart,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user