graph chart

2D / 3D Area Graph Examples

[ Graph Home ] [ Documentation ] [ Getting Started ] [ Solutions ]

Applet Example 2 - Data from a Text File

if you do not see the graph below then click here

 

Here the graph applet is configured to read the configuration data from the HTML <PARAM> tags and to acquire the graph data from a text file.

The graph data is acquired from the text file ../../area_graph/Examples/areadata.txt ( click here to view ) and the graph properties are set by the following HTML code,

<applet code="AreaGraphApplet.class" archive="AreaGraph.jar" width="460" height="440">
<!-- Start Up Parameters -->
<PARAM name="LOADINGMESSAGE" value="Area 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 -->

<!-- Data files -->
<PARAM name="chartdata" value="../../area_graph/Examples/areadata.txt">

<!-- 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 -->
<PARAM name="autoscale" value="true"> <!-- Auto Scaling 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="350"> <!-- Y position of x axis labels-->
<PARAM name="labelsYpre" value="$"> <!-- Y labels pre-text e.g Currency Symbol -->
<PARAM name="labelsYpost" value=" "> <!-- Y labels post-text e.g weight measurement "Kg" -->
<!-- <PARAM name="chartScale" value="2000"> --> <!-- Chart Scale -->
<!-- <PARAM name="chartStartY" value="0"> --> <!-- Starting Y value -->

<!-- x axis Labels -->
<PARAM name="label1" value="January">
<PARAM name="label2" value="February|0">
<PARAM name="label3" value="March">
<PARAM name="label4" value="April|0">
<PARAM name="label5" value="May">
<PARAM name="label6" value="June|0">
<PARAM name="label7" value="July">
<PARAM name="label8" value="August|0">
<PARAM name="label9" value="September">
<PARAM name="label10" value="October|0">
<PARAM name="label11" value="November">
<PARAM name="label12" value="December|0">

<!-- Font information -->
<PARAM name="yFont" value="Arial,N,10"> <!-- Y labels Font -->
<PARAM name="xFont" value="Arial,N,10"> <!-- X labels Font -->

<!-- Color information -->
<PARAM name="gridbg" value="#EEEEFF"> <!-- grid background color -->
<PARAM name="BgColor" value="white"> <!-- BackGround Color -->
<PARAM name="gridcolor" value="70,70,70"> <!-- gridcolor -->
<PARAM name="axiscolor" value="0,0,255"> <!-- axiscolor -->
<PARAM name="floorcolor" value="0,100,170"> <!-- floorcolor -->
<PARAM name="outlinecolor" value="0,0,0"> <!-- outline color -->
<PARAM name="labelcolor" value="50,50,50"> <!-- label color -->
<PARAM name="Ycolor" value="50,50,50"> <!-- Y color -->

<!-- Legend Information -->
<PARAM name="legendfont" value="Arial,N,10"> <!-- Legend Font -->
<PARAM name="legendposition" value="300,5"> <!-- Legend Position -->
<PARAM name="legendtitle" value="Products"> <!-- Legend Title -->
<PARAM name="LegendBackground"value="#EEEEFF">
<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 Month|80,60|Arial,BI,18|100,100,200">
<PARAM name="xtitle" value="Year 2002|200,420|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|0|8|false|Product X">
<PARAM name="series2" value="8,185,185|0|8|true|Product Y">
<PARAM name="series3" value="239,154,65|0|8|false|Product Z">

<!-- Target Lines -->
<!-- color|style|start point|end point|value|label|font -->
<PARAM name="target1" value="0,125,0|4|1|12|10500| Target|Arial,B,12">
<PARAM name="target2" value="125,0,0|4|1|12|8400| Break Even|Arial,B,12">

</applet>

For a full explanation of and range of values for the above parameters please see the Documentation - Configuration Options».

« back to Examples Index

« back to Getting Started

[ Graph Home ] [ Documentation ] [ Getting Started ] [ Solutions ]

Getting Started

Documentation

Examples

Common Problems
This section describes and provides solutions to common problems.