Merge remote-tracking branch 'upstream/develop' into develop

pull/54/head
Caozhenhui 2021-07-23 17:19:22 +08:00
commit 301c51eb5e
5 changed files with 0 additions and 357 deletions

View File

@ -1,63 +0,0 @@
Highcharts.theme = {
// colors:['#01A4CD','#25C43F','#E07326','#E0F300','#0CD7E8','#34EB7E','#FFAC62','#FFF570','#39FACA','#87E6FF'], //skin1-g
// colors:['#049FDC','#43C166','#E96D46','#E9F200','#1DD4F0','#55EAA0','#FFA788','#FFF494','#5BFADB','#A5E4FF'], //skin2-g
//colors:['#01A6D7','#29C659','#E1763B','#E1F300','#0ED8ED','#38EC94','#FFAE7B','#FFF588','#3EFBD5','#8BE6FF'], //skin3-g
colors : ['#1abc9c', '#f1c40f', '#2ecc71', '#e67e22', '#3498db', '#e74c3c', '#9b59b6', '#95a5a6', '#34495e'], //flat colors
// colors: ['#4572A7','#AA4643','#89A54E','#80699B','#3D96AE','#DB843D','#92A8CD','#A47D7C','#B5CA92'], //default
// colors:['#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263','#6AF9C4'],
tooltip : {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y} </b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true,
valueDecimals: 3,
// dateTimeLabelFormats:{
// minute:'%Y-%m-%d %H:%M',
// hour : '%Y-%m-%d %H:%M',
// day : '%Y-%m-%d',
// month : '%Y-%m',
// year : '%Y'
// },
// formatter:function (){
// return '<b>'+Highcharts.dateFormat('%y-%m-%d %H:%M',new Date(this.x))
// + '~' + Highcharts.dateFormat('%H:%M',new Date(this.x+1000*60*30))
// + ':</b><br/><span style="color:'+this.series.color+';padding:0"> '+
// this.series.name + ':</span><b>'+
// this.y.toFixed(3) +'</b>';
// },
},
chart:{
height:300
},
yAxis : {
//min : 0,
//startOnTick : false,
title : {
text : null
},
//showLastLabel:true,
},
title:{
text:null
},
legend:{
enabled:true,
//maxHeight:60,
//labelFormatter:function(){return this.name.substring(0,50);}
}
};
Highcharts.setOptions(Highcharts.theme);
Highcharts.setOptions({
global : {
useUTC : false,
//timezoneOffset: -480,
},
credits : {
enabled : false
},
});

View File

@ -1,101 +0,0 @@
'use strict';
app.controller('MultiBarChartController', function($scope,highchartsNG) {
$scope.$on('handleBroadcastLineOptionChanged', function(event, data) {
if(angular.isDefined(data.load)){
$scope.multiConfig.loading=true;
}else{
$scope.multiConfig.series=data.equipment;
$scope.multiConfig.loading=false;
}
});
$scope.mouseEvent = function(chart) {
angular.element('.chart').bind('mousedown.hc touchstart.hc', function(eStart) {
eStart = chart.pointer.normalize(eStart);
var posX = eStart.pageX,
posY = eStart.pageY,
alpha = chart.options.chart.options3d.alpha,
beta = chart.options.chart.options3d.beta,
newAlpha,
newBeta,
sensitivity = 5; // lower is more sensitive
angular.element(document).bind({
'mousemove.hc touchdrag.hc': function(e) {
// Run beta
newBeta = beta + (posX - e.pageX) / sensitivity;
chart.options.chart.options3d.beta = newBeta;
// Run alpha
newAlpha = alpha + (e.pageY - posY) / sensitivity;
chart.options.chart.options3d.alpha = newAlpha;
chart.redraw(false);
},
'mouseup touchend': function() {
angular.element(document).unbind('.hc');
}
});
});
};
$scope.multiConfig = {
options: {
chart: {
type: 'column',
options3d: {
enabled: true,
alpha: 10,
beta: 15,
depth: 70
}
},
plotOptions: {
column: {
depth: 25
}
},
navigator: {
xAxis: {
type: 'datetime',
labels: {
formatter: function() {
var dateStr = Highcharts.dateFormat('%m-%d', this.value);
return dateStr;
},
},
},
},
xAxis: {
startOnTick: false,
type: 'datetime',
labels: {
formatter: function() {
var dateStr = Highcharts.dateFormat('%m-%d', this.value);
return dateStr;
},
},
crosshair: null
},
},
loading:true,
series: [],
//noData:'No data to display',
func: function(chart) {
$scope.mouseEvent(chart);
}
};
});

View File

@ -1,61 +0,0 @@
'use strict';
app.controller('PieChartController', function($scope,highchartsNG) {
$scope.$on('handleBroadcastLineOptionChanged', function(event, data) {
if(angular.isDefined(data.load)){
$scope.pieConfig.loading=true;
}else{
$scope.pieConfig.series[0].data=data.equipment_percentage;
$scope.pieConfig.loading=false;
}
});
$scope.pieConfig = {
options: {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45
}
},
tooltip: {
pointFormat: '</br> <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
innerSize: 100,
depth: 45,
//allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
},
series: [{
name: 'Percentage',
colorByPoint: true,
data: []
}],
//noData:'No data to display',
loading:true,
title: {
text: null
},
//useHighStocks: true
};
});

View File

@ -1,125 +0,0 @@
'use strict';
app.controller('SingleBarChartController', function($scope,highchartsNG) {
$scope.$on('handleBroadcastLineOptionChanged', function(event, data) {
if(angular.isDefined(data.load)){
$scope.singleConfig.loading=true;
$scope.dynamic=[];
}else{
$scope.singleConfig.series=data.line;
$scope.singleConfig.loading=false;
if(angular.isDefined(data.category)){
angular.forEach(data.category,function(item,key){
item.chart=$scope.getChartConfig(item);
});
$scope.dynamic=data.category;
}
}
});
$scope.getChartConfig=function(item){
var newchart=angular.copy($scope.singleConfig);
newchart.series=item.metadata;
return newchart;
};
$scope.singleConfig = {
options: {
chart: {
type: 'column',
options3d: {
enabled: true,
alpha: 10,
beta: 15,
depth: 70
}
},
legend: {
enabled: false
},
plotOptions: {
column: {
depth: 25
}
},
navigator: {
xAxis: {
type: 'datetime',
labels: {
formatter: function() {
var dateStr = Highcharts.dateFormat('%m-%d', this.value);
return dateStr;
},
},
},
},
xAxis: {
startOnTick: false,
type: 'datetime',
labels: {
formatter: function() {
var dateStr = Highcharts.dateFormat('%m-%d', this.value);
return dateStr;
},
},
crosshair: null
},
},
loading:true,
series: [],
//noData: 'No data to display',
func: function(chart) {
$scope.mouseEvent(chart);
}
};
$scope.mouseEvent = function(chart) {
angular.element('.chart').bind('mousedown.hc touchstart.hc', function(eStart) {
eStart = chart.pointer.normalize(eStart);
var posX = eStart.pageX,
posY = eStart.pageY,
alpha = chart.options.chart.options3d.alpha,
beta = chart.options.chart.options3d.beta,
newAlpha,
newBeta,
sensitivity = 5; // lower is more sensitive
angular.element(document).bind({
'mousemove.hc touchdrag.hc': function(e) {
// Run beta
newBeta = beta + (posX - e.pageX) / sensitivity;
chart.options.chart.options3d.beta = newBeta;
// Run alpha
newAlpha = alpha + (e.pageY - posY) / sensitivity;
chart.options.chart.options3d.alpha = newAlpha;
chart.redraw(false);
},
'mouseup touchend': function() {
angular.element(document).unbind('.hc');
}
});
});
};
});

View File

@ -53,8 +53,6 @@ app.controller('MainController', [
}; };
$rootScope.isAdminCookie=function(){ $rootScope.isAdminCookie=function(){
// var admin_uuid="dfa793a3-1a1d-49be-ad46-99f4196079de";
// var cur_cookie="dfa793a3-1a1d-49be-ad46-99f4196079de";
var currentUser = undefined; var currentUser = undefined;
if ($window.localStorage.getItem("currentUser")){ if ($window.localStorage.getItem("currentUser")){
currentUser = JSON.parse($window.localStorage.getItem("currentUser")); currentUser = JSON.parse($window.localStorage.getItem("currentUser"));
@ -64,11 +62,6 @@ app.controller('MainController', [
}else{ }else{
return false; return false;
} }
// if(cur_cookie==admin_uuid){
// return true;
// }else{
// return false;
// }
} }
} }
]); ]);