|
| xqd
@@ -117,7 +117,51 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
});
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+ var Stat = G2.Stat;
|
|
|
+ var vvvdata = [];
|
|
|
+ for(var i = 0; i <= 20; i ++) {
|
|
|
+ for(var j = 0; j <= 20; j ++) {
|
|
|
+ var x = i*25.6;
|
|
|
+ var y = j*19.2;
|
|
|
+ var z = 700-(x+0.5*y)+Math.random()*(400);
|
|
|
+ vvvdata.push({
|
|
|
+ l: x,
|
|
|
+ g: y,
|
|
|
+ Altitude: z
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var chart = new G2.Chart({
|
|
|
+ id: 'c1',
|
|
|
+ forceFit: true,
|
|
|
+ height: 450
|
|
|
+ });
|
|
|
+ //为了将数据与图片上的位置完全吻合,我们需要将横轴和纵轴的范围设定为数据对应范围,并将范围优化处理关闭
|
|
|
+ var defs = {
|
|
|
+ 'l': {
|
|
|
+ type: 'linear',
|
|
|
+ min: 0,
|
|
|
+ max: 512,
|
|
|
+ nice: false//优化处理关闭
|
|
|
+ },
|
|
|
+ 'g': {
|
|
|
+ type: 'linear',
|
|
|
+ min: 0,
|
|
|
+ max: 384,
|
|
|
+ nice: false
|
|
|
+ },
|
|
|
+ 'Altitude': {
|
|
|
+ tickCount:200
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ chart.source(vvvdata,defs);
|
|
|
+ chart.contour().position(Stat.smooth.loess.triangular('l*g*Altitude',0.01)).color('Altitude','hue').size(3);
|
|
|
+ chart.render();
|
|
|
+ document.getElementById('newchats').style.display='none';
|
|
|
});
|
|
|
+
|
|
|
$scope.change = function(selectedName){
|
|
|
$scope.name = selectedName;
|
|
|
$ionicLoading.show({
|
|
| xqd
@@ -167,6 +211,11 @@ starter.controller('showCtrl',["$scope",'$ionicHistory','$state','$timeout','$st
|
|
|
return tabUrl == $scope.currentTab;
|
|
|
};
|
|
|
$scope.onClickTab = function(tab){
|
|
|
+ if(tab.url=="strom.html"){
|
|
|
+ document.getElementById('newchats').style.display='block';
|
|
|
+ }else{
|
|
|
+ document.getElementById('newchats').style.display='none';
|
|
|
+ }
|
|
|
$scope.currentTab = tab.url;
|
|
|
};
|
|
|
//TN曲线图
|