Applet Example 1
Probably the simplest implementation, this example demonstrates setting up the graph in a web page so that both the configuration and graph data are read from the <PARAM> tags within the HTML page.
and here is the HTML code,
<applet code="LineGraphApplet.class" archive="LineGraph.jar" width="500" height="420">
<!-- Start Up Parameters -->
<PARAM name="LOADINGMESSAGE" value="Line Graph Loading - Please Wait."> <!-- Message to be displayed on Startup -->
<PARAM name="STEXTCOLOR" value="0,0,100"> <!-- Message Text Color-->
<PARAM name="STARTUPCOLOR" value="255,255,255"> <!-- Applet Background color -->
<!-- Chart Switches -->
<PARAM name="3D" value="false"> <!-- 3D mode On/Off -->
<PARAM name="grid" value="true"> <!-- Grid On/Off -->
<PARAM name="axis" value="true"> <!-- Axis On/Off -->
<PARAM name="ylabels" value="true"> <!-- y Labels On/Off -->
<PARAM name="outline" value="true"> <!-- Outline On/Off -->
<PARAM name="legend" value="true"> <!-- Legend On/Off -->
<!-- Chart Characteristics -->
<PARAM name="nPoints" value="12"> <!-- Max Number of Points per series-->
<PARAM name="nRows" value="7"> <!-- Number of Rows for the grid -->
<PARAM name="vSpace" value="30"> <!-- Vertical spacing, number of Pixels -->
<PARAM name="nSeries" value="3"> <!-- Number of Series -->
<PARAM name="hSpace" value="30"> <!-- Horizontal spacing, Pixels-->
<PARAM name="gridxpos" value="75"> <!-- X position to start grid -->
<PARAM name="gridypos" value="350"> <!-- Y position to start grid -->
<PARAM name="gridstyle" value="3"> <!-- grid line style -->
<PARAM name="depth3D" value="15"> <!-- Depth of 3D effect, number of Pixels -->
<PARAM name="ndecplaces" value="0"> <!-- Number of Decimal places to display values -->
<PARAM name="labelOrientation" value="5"> <!-- x axis label orientation -->
<PARAM name="labelsY" value="360"> <!-- Y position of x axis labels-->
<PARAM name="chartScale" value="1000"> <!-- Chart Scale -->
<PARAM name="chartStartY" value="0"> <!-- Starting Y value -->
<!-- x axis Labels -->
<PARAM name="label1" value="Jan">
<PARAM name="label2" value="Feb|-10">
<PARAM name="label3" value="Mar">
<PARAM name="label4" value="Apr|-10">
<PARAM name="label5" value="May">
<PARAM name="label6" value="Jun|-10">
<PARAM name="label7" value="Jul">
<PARAM name="label8" value="Aug|-10">
<PARAM name="label9" value="Sep">
<PARAM name="label10" value="Oct|-10">
<PARAM name="label11" value="Nov">
<PARAM name="label12" value="Dec|-10">
<!-- Additional font information -->
<PARAM name="font14" value="Arial,N,10"> <!-- Y labels Font -->
<PARAM name="font15" value="Arial,N,10"> <!-- X labels Font -->
<!-- Additional color information -->
<PARAM name="color14" value="170,170,170"> <!-- gridcolor -->
<PARAM name="color15" value="0,0,255"> <!-- axiscolor -->
<PARAM name="color16" value="0,100,170"> <!-- floorcolor -->
<PARAM name="color17" value="0,0,0"> <!-- outline color -->
<PARAM name="color18" value="50,50,50"> <!-- label color -->
<PARAM name="color19" value="50,50,50"> <!-- Y color -->
<!-- Legend Information -->
<PARAM name="legendfont" value="Arial,N,10"> <!-- Legend Font -->
<PARAM name="legendposition" value="345,15"> <!-- Legend Position -->
<PARAM name="legendtitle" value="Products"> <!-- Legend Title -->
<PARAM name="LegendBackground"value="166,210,255">
<PARAM name="LegendBorder"value="0,50,175">
<PARAM name="LegendtextColor"value="50,50,50">
<!-- Titles - Main, x and y -->
<!-- <PARAM name="title" value="text,xpos,ypos,font-type,font-style,font-size,Rcolor,Gcolor,Bcolor"> -->
<PARAM name="title" value="Sales by Quarter|80,60|Arial,BI,18|100,100,200">
<PARAM name="xtitle" value="Year 2001|200,400|Arial,B,16|100,100,200">
<PARAM name="ytitle" value="Value $|10,300|Arial,B,16|100,100,200">
<!-- Free Form Text -->
<!-- <PARAM name="textn" value="text,xpos,ypos,font-type,font-style,font-size,Rcolor,Gcolor,Bcolor"> -->
<PARAM name="text1" value="Note :|80,85|Arial,N,10|100,100,200">
<PARAM name="text2" value="Product Z launched April|85,100|Arial,N,10|50,50,50">
<PARAM name="text3" value="Product Y discontinued in October|85,115|Arial,N,10|50,50,50">
<!-- Series Data -->
<!-- <PARAM name="seriesN" value="series color|point style|Point Size|fill|legend label"> -->
<PARAM name="series1" value="99,99,156|5|8|false|Product X">
<PARAM name="series2" value="185,53,8|3|8|true|Product Y">
<PARAM name="series3" value="239,154,65|4|8|false|Product Z">
<!-- Trend Lines -->
<!-- color|start point|end point|start value|end value|label|font -->
<PARAM name="trend1" value="0,0,0|7|12|2200|3300|Upper trend|Arial,B,12">
<PARAM name="trend2" value="0,0,0|8|12|900|1550|Lower trend|Arial,B,12">
<!-- Target Lines -->
<!-- color|style|start point|end point|value|label|font -->
<PARAM name="target1" value="0,125,0|4|1|12|5500|Target|Arial,N,10">
<PARAM name="target2" value="125,0,0|4|1|12|1500|Break Even|Arial,N,10">
<!-- Point Data -->
<!-- <PARAM name="dataNseriesN" value="value|URL|Target Frame"> -->
<PARAM name="data1series1" value="3162">
<PARAM name="data2series1" value="2516">
<PARAM name="data3series1" value="2945">
<PARAM name="data4series1" value="3980">
<PARAM name="data5series1" value="5750">
<PARAM name="data6series1" value="6230">
<PARAM name="data7series1" value="4765">
<PARAM name="data8series1" value="5636">
<PARAM name="data9series1" value="5120">
<PARAM name="data10series1" value="4365">
<PARAM name="data11series1" value="5789">
<PARAM name="data12series1" value="5623">
<PARAM name="data1series2" value="6840">
<PARAM name="data2series2" value="6704">
<PARAM name="data3series2" value="3945">
<PARAM name="data4series2" value="6780">
<PARAM name="data5series2" value="4750">
<PARAM name="data6series2" value="2230">
<PARAM name="data7series2" value="1065">
<PARAM name="data8series2" value="636">
<PARAM name="data9series2" value="520">
<PARAM name="data10series2" value="250">
<PARAM name="data4series3" value="253">
<PARAM name="data5series3" value="682">
<PARAM name="data6series3" value="989">
<PARAM name="data7series3" value="1920">
<PARAM name="data8series3" value="1240">
<PARAM name="data9series3" value="2240">
<PARAM name="data10series3" value="1450">
<PARAM name="data11series3" value="2808">
<PARAM name="data12series3" value="2050">
</applet>
For a full explanation of and range of values for the above parameters please see the Documentation.
Note: If you are using the evaluation version then in the applet a pop-up window will appear upon the startup and an evaluation message will be incorporated by the servlet. Both these features have been removed from the licensed version. Licensing information can be found at http://www.jpowered.com/graph_chart/index.htm