加入可视化的链接地址,修改了数据集的展示名称

This commit is contained in:
Li Jianxuan 2014-05-22 08:59:35 +00:00
parent c986d6c535
commit a8df49bff7
3 changed files with 83 additions and 70 deletions

View File

@ -102,6 +102,7 @@ $this->headTitle()->setSeparator(' - ');
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/offlineapp">离线数据服务记录最近20个</a></li> <li>-&nbsp;&nbsp;&nbsp;<a href="/data/offlineapp">离线数据服务记录最近20个</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/request">如何从数据中心申请数据</a></li> <li>-&nbsp;&nbsp;&nbsp;<a href="/data/request">如何从数据中心申请数据</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/submit">如何在数据中心发布数据</a></li> <li>-&nbsp;&nbsp;&nbsp;<a href="/data/submit">如何在数据中心发布数据</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/visual">数据可视化</a></li>
</ul> </ul>
</div> </div>

View File

@ -10,36 +10,52 @@ $this->breadcrumb('数据可视化');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div class="row"> <div class="row">
<div class="span3"> <div class="span12">
<h3>选择数据集</h3> <h3>选择数据集</h3>
<hr /> <hr />
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="sc" data-subdataset="avg" data-seriename="逐月含沙量平均值">
逐月含沙量平均值 <div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">青海三江源自然保护区2012年水资源监测含沙量数据集</a></li>
<li><a href="#tab2" data-toggle="tab">青海三江源区珍秦草地生态综合站2011年土壤水分监测数据</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="sc" data-subdataset="avg" data-seriename="2012逐月含沙量平均值">
平均值
</a> </a>
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="sc" data-subdataset="max" data-seriename="逐月含沙量最大值"> <a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="sc" data-subdataset="max" data-seriename="2012逐月含沙量最大值">
逐月含沙量最大值 最大值
</a> </a>
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="sc" data-subdataset="min" data-seriename="逐月含沙量最小值"> <a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="sc" data-subdataset="min" data-seriename="2012逐月含沙量最小值">
逐月含沙量最小值 最小值
</a> </a>
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="20cm" data-seriename="土壤水分20CM"> </div>
土壤水分20CM <div class="tab-pane" id="tab2">
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="20cm" data-seriename="珍秦草地生态综合站2011土壤水分20CM">
20CM
</a> </a>
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="30cm" data-seriename="土壤水分30CM"> <a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="30cm" data-seriename="珍秦草地生态综合站2011土壤水分30CM">
土壤水分30CM 30CM
</a> </a>
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="40cm" data-seriename="土壤水分40CM"> <a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="40cm" data-seriename="珍秦草地生态综合站2011土壤水分40CM">
土壤水分40CM 40CM
</a> </a>
<a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="50cm" data-seriename="土壤水分50CM"> <a class="btn btn-default control-btn" href="javascript:void(0);" data-dataset="SoilMoisture" data-subdataset="50cm" data-seriename="珍秦草地生态综合站2011土壤水分50CM">
土壤水分50CM 50CM
</a> </a>
</div> </div>
</div>
</div><!-- Tabbable -->
</div>
<!-- 页面内容 --> <!-- 页面内容 -->
<div class="span9"> <div class="span12">
<div id="datachart" style="width:100%;height:500px;"></div> <div id="datachart" style="width:100%;height:500px;"></div>
<div id="loading" style="display:none">Loading...</div> <a class="btn btn-primary control-btn-cls" href="javascript:void(0);">
清除图像
</a>
</div> </div>
<!-- //页面内容 --> <!-- //页面内容 -->
</div> </div>
@ -95,18 +111,14 @@ $(function() {
}); });
}); $(".control-btn-cls").click(function(e) {
for(i in chart.series)
function onDataReceived(data)
{ {
chart.addSeries({ chart.series[i].remove();
name: 'Sediment Concentration',
data: data,
type : 'column'
});
alert(chart.series[0].name)
} }
});
});
$( document ).ajaxSend(function() { $( document ).ajaxSend(function() {
$('#loading').css('display','none'); $('#loading').css('display','none');
}); });