JS百分比図と柱状図 v:* {behavior=url(#default#VML)}
a:hover {color:maroon}
h2 {color:#006600;
margin-top: 0pt;
margin-bottom: 0pt}
h3 {color:#006600;
margin-top: 6pt;
margin-bottom: 3pt}
h4 {color:#006600;
フォントファミリー: Arial;
フォントサイズ: 10pt;
margin-top: 3pt;
margin-bottom: 0pt}
h5 {color:#006600;
margin-top: 0pt;
margin-bottom: 0pt}
p {margin-top: 0pt;
margin-bottom: 12pt}
p.Chart {font-size:8pt;フォントファミリー:"タイムズ";色:黒;テキスト整列:右; }
Sample Piechart
Random numbers drawn as a simple pie
One: 30
Two: 18
Three: 13
Four: 9
Five: 5
<スクリプト言語=JavaScript>
function displayTitle( title )
{
document.write("
" title "");
}
function generatedRandomNumber(num) {
return Math.round( Math.random() * (num - 1) ) 1;
}
function Lottablehead( val )
{
document.writeln("
");
document.write(" " val "");
}
function Lottabletail()
{
document.write("
");
}
function platecolor(d, clr)
{
for(i=1;i<=d;i ){
document.write("
| ");
}
}
function setColor(foreground,background)
{
document.fgColor=foreground;
document.bgColor=background;
}
setColor("オレンジ","黒");
a=generateRandomNumber(50);
plottablehead( a );
plotcolor(a, "red");
plottabletail();
a=generateRandomNumber(50);
plottablehead( a );
plotcolor(a, "青");
plottabletail();
a=generateRandomNumber(50);
plottablehead( a );
plotcolor(a, "green");
plottabletail();
a=generateRandomNumber(50);
plottablehead( a );
plotcolor(a, " yellow");
plottabletail();
a=generateRandomNumber(50);
plottablehead( a );
plotcolor(a, "グレー");
plottabletail();
a=generateRandomNumber(50);
plottablehead( a );
plotcolor(a, "midnightblue");
plottabletail();
//-->