<form name="input">
<input name="param" value="valueLinesOn" size=18>
<input name="paramvalue" value="true" size=18>
<input name="set" type="button" value="set" onClick=repaint()>
</form>
<script language="JavaScript">
<!--
function repaint() {
document.BarChart.setParameter(document.input.param.value, document.input.paramvalue.value);
}
//-->
</script>
HTML code:
<applet code=com.objectplanet.chart.ChartApplet archive=chart.jar
width=350 height=250 name=ResizableChart>
<param name=chart value="bar">
<param name=sampleValues value="10,20,30,40,50">
</applet>
<form name="resize">
<input name="small" type="button" value="make large" onClick=makeLarge()>
<input name="large" type="button" value="make small" onClick=makeSmall()>
</form>
<script language="JavaScript">
<!--
function makeLarge() {
document.ResizableChart.width=350;
document.ResizableChart.height=250;
}
function makeSmall() {
document.ResizableChart.width=260;
document.ResizableChart.height=180;
}
//-->
</script>
HTML code:
<form name="resize">
<INPUT TYPE="BUTTON" NAME="bar" VALUE="bar" onClick=setbar()>
<INPUT TYPE="BUTTON" NAME="line" VALUE="line" onClick=setline()>
<INPUT TYPE="BUTTON" NAME="pie" VALUE="pie" onClick=setpie()>
</form>
<script LANGUAGE="JavaScript">
<!--
function setbar() {
document.SwitchChart.setParameter("chart", "bar");
}
function setline() {
document.SwitchChart.setParameter("chart", "line");
}
function setpie() {
document.SwitchChart.setParameter("chart", "pie");
}
//-->
</script>