<html>
<head>
<script type="text/javascript" src="protovis-r3.2.js">
</script>
</head>
<body>
<script type="text/javascript+protovis">
var w = 1;
var xlimit = 10;
var x = pv.Scale.linear(0, xlimit).range(0,w);
document.getElementById("pvfunction").innerHTML
= " var x = pv.Scale.linear(0, xlimit).range(0,w);";
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.domain() = " + x.domain();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.range() = " + x.range();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.ticks() = " + x.ticks();
for(i = 0; i <= xlimit; i++)
{
document.getElementById("pvfunction").innerHTML
+= " <br /> | x(" + i + ") = " + x(i);
}
</script>
<div id="pvfunction">
</div>
</body>
</html>
<head>
<script type="text/javascript" src="protovis-r3.2.js">
</script>
</head>
<body>
<script type="text/javascript+protovis">
var w = 1;
var xlimit = 10;
var x = pv.Scale.linear(0, xlimit).range(0,w);
document.getElementById("pvfunction").innerHTML
= " var x = pv.Scale.linear(0, xlimit).range(0,w);";
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.domain() = " + x.domain();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.range() = " + x.range();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.ticks() = " + x.ticks();
for(i = 0; i <= xlimit; i++)
{
document.getElementById("pvfunction").innerHTML
+= " <br /> | x(" + i + ") = " + x(i);
}
</script>
<div id="pvfunction">
</div>
</body>
</html>
Result 1
Sample 2
<html>
<head>
<script type="text/javascript" src="protovis-r3.2.js"></script>
</head>
<body>
<script type="text/javascript+protovis">
var w = 100;
var xlimit = 5;
var x = pv.Scale.linear(0, xlimit).range(0,w);
document.getElementById("pvfunction").innerHTML
= " var x = pv.Scale.linear(0, xlimit).range(0,w);";
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.domain() = " + x.domain();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.range() = " + x.range();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.ticks() = " + x.ticks();
for(i = 0; i <= xlimit; i++)
{
document.getElementById("pvfunction").innerHTML
+= " <br /> | x(" + i + ") = " + x(i);
}
</script>
<div id="pvfunction">
</div>
</body>
</html>
<head>
<script type="text/javascript" src="protovis-r3.2.js"></script>
</head>
<body>
<script type="text/javascript+protovis">
var w = 100;
var xlimit = 5;
var x = pv.Scale.linear(0, xlimit).range(0,w);
document.getElementById("pvfunction").innerHTML
= " var x = pv.Scale.linear(0, xlimit).range(0,w);";
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.domain() = " + x.domain();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.range() = " + x.range();
document.getElementById("pvfunction").innerHTML
+= " <br /> | x.ticks() = " + x.ticks();
for(i = 0; i <= xlimit; i++)
{
document.getElementById("pvfunction").innerHTML
+= " <br /> | x(" + i + ") = " + x(i);
}
</script>
<div id="pvfunction">
</div>
</body>
</html>
Result 2
No comments:
Post a Comment