修改OSP社区的态势分析图表显示;

仅供演示!
This commit is contained in:
ganyiang 2014-05-22 15:14:26 +08:00
parent 4b063a2c69
commit f0f807b2de
2 changed files with 113 additions and 17 deletions

View File

@ -34,7 +34,7 @@
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
<!-- <li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li> -->
<li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li>
<li><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入</a></li>
@ -52,23 +52,32 @@
<script type="text/javascript">
$(function(){
var flow=[];
for(var i=0;i<35;i++){
for(var i=0;i<24+5;i++){
flow.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
}
var data = [
{
name : 'commit',
name :'',
value:flow,
color:'#0d8ecf',
line_width:2
}
];
var labels = ["","2010","2011","2012","2013","2014"];
//创建x轴标签文本
var date = new Date()
var labels = [];
/* labels.push(date.getFullYear()-2);
labels.push(date.getFullYear()-1);
labels.push(date.getFullYear());*/
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
var line = new iChart.LineBasic2D({
render : 'canvasDiv',
data: data,
@ -109,9 +118,30 @@
width:2,
color:'#3f8695'
},
},
listeners:{
//tip:提示框对象、name:数据名称、value:数据值、text:当前文本、i:数据点的索引
parseText:function(tip,name,value,text,i){
return name+"漏洞数:"+value;
}
} ,
},
tipMocker:function(tips,i){
var index;
if (Math.floor(i/12)==0) {
index=0;
}else if (Math.floor(i/12)==1) {
index=12;
}else{
index=24;
};
return "<div style='font-weight:400'>"+
labels[index]+" "+//日期
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
"</div>"+tips.join("<br/>");
},
// legend : {
// legend : {
// enable : true,
// row:1,//设置在一行上显示与column配合使用
// column : 'max',
@ -226,7 +256,7 @@
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
<!-- <li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li> -->
<li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li>
<li><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入</a></li>
@ -243,22 +273,35 @@
<script type="text/javascript">
$(function(){
var flow=[];
for(var i=0;i<35;i++){
for(var i=0;i<24+5;i++){
flow.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
}
var data = [
{
name : 'commit',
name : '',
value:flow,
color:'#0d8ecf',
line_width:2
}
];
var labels = ["","2010","2011","2012","2013","2014"];
//创建x轴标签文本
var date = new Date()
var labels = [];
/* labels.push(date.getFullYear()-2);
labels.push(date.getFullYear()-1);
labels.push(date.getFullYear());
labels.push(date.getFullYear()+1);*/
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
var line = new iChart.LineBasic2D({
render : 'canvasDiv2',
@ -300,7 +343,29 @@
width:2,
color:'#3f8695'
},
listeners:{
//tip:提示框对象、name:数据名称、value:数据值、text:当前文本、i:数据点的索引
parseText:function(tip,name,value,text,i){
return name+"帖子数:"+value+"万";
}
} ,
},
tipMocker:function(tips,i){
var index;
if (Math.floor(i/12)==0) {
index=0;
}else if (Math.floor(i/12)==1) {
index=12;
}else{
index=24;
};
return "<div style='font-weight:400'>"+
labels[index]+" "+//日期
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
"</div>"+tips.join("<br/>");
},
crosshair:{
enable:true, //十字交叉线
line_color:'#62bce9'

View File

@ -178,22 +178,32 @@ li {
<script type="text/javascript">
$(function(){
var flow=[];
for(var i=0;i<35;i++){
for(var i=0;i<24+5;i++){
flow.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
}
var data = [
{
name : 'commit',
name : '',
value:flow,
color:'#0d8ecf',
line_width:2
}
];
//创建x轴标签文本
var date = new Date()
var labels = [];
/* labels.push(date.getFullYear()-2);
labels.push(date.getFullYear()-1);
labels.push(date.getFullYear());*/
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
var labels = ["","2010","2011","2012","2013","2014"];
//var labels = ["","2010","2011","2012","2013","2014"];
var line = new iChart.LineBasic2D({
render : 'canvasDiv',
@ -220,8 +230,29 @@ li {
radius : 5,
width:2,
color:'#3f8695'
},
},
listeners:{
//tip:提示框对象、name:数据名称、value:数据值、text:当前文本、i:数据点的索引
parseText:function(tip,name,value,text,i){
return name+"漏洞数:"+value;
}
} ,
},
tipMocker:function(tips,i){
var index;
if (Math.floor(i/12)==0) {
index=0;
}else if (Math.floor(i/12)==1) {
index=12;
}else{
index=24;
};
return "<div style='font-weight:400'>"+
labels[index]+" "+//日期
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
"</div>"+tips.join("<br/>");
},
legend : {
enable : true,