-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. finish - but the chat is not good for this statistic
- Loading branch information
Showing
8 changed files
with
279 additions
and
278 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
63.58,60.00,,21.98,70,7.70,3.30,99.00,42.00,43,461.85,45.32 | ||
63.58,60.00,,21.98,70,7.70,3.30,99.00,42.00,43,823.85,45.32 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
|
||
@extends('layouts.foot') | ||
@section('content') | ||
<style> | ||
.btn130Width{ | ||
width:130px;text-align: left; | ||
} | ||
</style> | ||
<div class="line"> | ||
<div class="xl3"> | ||
<button class="btn btn-primary btn130Width" type="button" onclick="javascript:window.location.href='{{url('statistics/2016/profits')}}'"> | ||
{{trans('statistic.profits')}} <span class="badge">2016</span> | ||
</button> | ||
</div> | ||
<div class="xl3"> | ||
<button class="btn btn-primary btn130Width" type="button" onclick="javascript:window.location.href='{{url('statistics/2017/profits')}}'"> | ||
{{trans('statistic.profits')}} <span class="badge">2017</span> | ||
</button> | ||
</div> | ||
<div class="xl3"> | ||
<button class="btn btn-primary btn130Width" type="button" onclick="javascript:window.location.href='{{url('statistics/All/profits')}}'"> | ||
{{trans('statistic.profits')}} <span class="badge">{{trans('statistic.all')}}</span> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="line" style="padding-top: 10px"> | ||
<div class="xl3"> | ||
<button class="btn btn-warning btn130Width" type="button" onclick="javascript:window.location.href='{{url('statistics/2016/customer')}}'"> | ||
{{trans('statistic.customer')}} <span class="badge">2016</span> | ||
</button> | ||
</div> | ||
<div class="xl3"> | ||
<button class="btn btn-warning btn130Width" type="button" onclick="javascript:window.location.href='{{url('statistics/2017/customer')}}'"> | ||
{{trans('statistic.customer')}} <span class="badge">2017</span> | ||
</button> | ||
</div> | ||
<div class="xl3"> | ||
<button class="btn btn-warning btn130Width" type="button" onclick="javascript:window.location.href='{{url('statistics/All/customer')}}'"> | ||
{{trans('statistic.customer')}} <span class="badge">{{trans('statistic.all')}}</span> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div class="line-middle" style="padding-top: 10px"> | ||
<div class="xl2"> | ||
<button class="btn btn-success btn130Width" type="button" onclick="javascript:window.location.href='{{url('statisticsAllItem')}}'"> | ||
{{trans('statistic.items')}} <span class="badge">{{trans('statistic.all')}}</span> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" src='{{url("js/Chart.min.js")}}'></script> | ||
<canvas id="myChart" width="600" height="300"></canvas> | ||
<script> | ||
var color = [ | ||
'rgba(255, 99, 132, 1)', | ||
'rgba(54, 162, 235, 1)', | ||
'rgba(255, 206, 86, 1)', | ||
'rgba(75, 192, 192, 1)', | ||
'rgba(153, 102, 255, 1)', | ||
'rgba(255, 159, 64, 1)', | ||
'rgba(199,21,133, 1)', | ||
'rgba(95,158,160, 1)', | ||
'rgba(85,107,47, 1)', | ||
'rgba(0,255,0, 1)', | ||
'rgba(165,42,42, 1)', | ||
'rgba(105,105,105, 1)', | ||
]; | ||
var returnData = '{!! $dataSet !!}'; | ||
var jsonData = eval('(' + returnData + ')'); | ||
var arr = []; | ||
var i = 0; | ||
for(var label in jsonData){ | ||
i++; | ||
if(i > 12) { | ||
var r = GetRandomNum(0, 250).toString(); | ||
var g = GetRandomNum(0, 250).toString(); | ||
var b = GetRandomNum(0, 250).toString(); | ||
color.push('rgba('+r+', '+g+', '+b+', 0.8)'); | ||
} | ||
var json = { | ||
label: label, | ||
data: jsonData[label], | ||
backgroundColor: color[i], | ||
//hoverBackgroundColor: "#FF6384", | ||
}; | ||
arr.push(json); | ||
} | ||
var bubbleChartData = { | ||
datasets: arr | ||
}; | ||
window.onload = function() { | ||
var ctx = document.getElementById("myChart").getContext("2d"); | ||
window.myChart = new Chart(ctx, { | ||
type: 'bubble', | ||
data: bubbleChartData, | ||
options: { | ||
responsive: true, | ||
title:{ | ||
display:true, | ||
text:'Chart.js Bubble Chart' | ||
}, | ||
tooltips: { | ||
mode: 'point' | ||
} | ||
} | ||
}); | ||
}; | ||
//get refresh page | ||
function refresh() { | ||
var url = document.URL; | ||
url = url.replace('/refresh', ''); | ||
url += '/refresh'; | ||
window.location.href = url; | ||
} | ||
//get random number | ||
function GetRandomNum(Min,Max) | ||
{ | ||
var Range = Max - Min; | ||
var Rand = Math.random(); | ||
return(Min + Math.round(Rand * Range)); | ||
} | ||
</script> | ||
|
||
<button type="button" class="btn btn-default btn-lg btn-block" onclick="refresh();"><strong>{{trans('statistic.refresh')}}</strong></button> | ||
@endsection |