var point = new Array();
var x = new Array();
var year = new Array();
var pointx = new Array();
var p1;
function sample() {
for (s = 1; s < 1001;s++ ){
point[s] = 0;
for(sx=1;sx<11;sx++){
if(Math.random()>0.7)point[s]=point[s]+1;
}
}
for(sx=0;sx<21;sx++){
pointx[sx]=0;
}
for(s=1;s<1001;s++){
n = point[s];
pointx[n] = pointx[n] + 1;
}
paint();
}
function paint(){
var sub=new svgpaint();
str="<svg width=\"500\" height=\"500\">";
str=str+sub.rect(0,0,500,500,"blue");
for(s=0;s<11;s++){
str=str+sub.rect(50*s,500-pointx[s],50,pointx[s],"red");
}
str=str+"</svg>";
$("#memo").html(str);
}
最終更新:2016年03月03日 03:07