graph chart

Pie Chart Examples

Applet Example 2

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 piedata.txt ( click here to view ) and the graph properties are set by the following HTML code,

<applet code="PiechartApplet.class" archive="PieChart.jar" width="550" height="450">
<!-- Start Up Parameters -->
<PARAM name="LOADINGMESSAGE" value="Creating Chart - 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="piedata.txt">

<!-- Chart Switches -->
<PARAM name="3D" value="true">
<PARAM name="Slabels" value="true">
<PARAM name="legend" value="true">
<PARAM name="displayPercentages" value="true">

<!-- Chart Characteristics -->
<PARAM name="width" value="550">
<PARAM name="height" value="450">
<PARAM name="nPies" value="3">
<PARAM name="depth3D" value="15">
<PARAM name="ndecplaces" value="0">
<PARAM name="3Dangle" value="50">

<!-- Link Cursor -->
<!-- valid values are - crosshair, default, hand, move, text or wait -->
<PARAM name="linkCursor" value="hand">

<!-- Popup segment Value Pre & Post Symbols -->
<PARAM name="valuepresym" value="$">
<PARAM name="valuepostsym" value=" ">

<!-- Additional font information -->
<PARAM name="popupfont" value="Arial,B,12">
<PARAM name="slabelfont" value="Arial,N,10">

<!-- Additional color information -->
<PARAM name="bgcolor" value="white">
<PARAM name="labelcolor" value="50,50,50">
<PARAM name="popupbgcolor" value="175,175,200">

<!-- Legend Information -->
<PARAM name="legendfont" value="Arial,N,10">
<PARAM name="legendposition" value="400,250">
<PARAM name="legendtitle" value="Sales Regions">
<PARAM name="LegendBackground" value="255,255,255">
<PARAM name="LegendBorder" value="125,125,125">
<PARAM name="LegendtextColor" value="0,0,0">

<!-- Title -->
<!-- title text|xpos,ypos|Font|Color Defintion"> -->
<PARAM name="title" value="Sales by Region|200,15|Arial,BI,16|grey">

<!-- Free Form Text -->
<!-- textN text|xpos,ypos|Font|Color Defintion"> -->
<PARAM name="text1" value="Product X|100,45|Arial,B,12|50,50,150">
<PARAM name="text2" value="Product Y|350,100|Arial,B,12|50,150,50">
<PARAM name="text3" value="Product Z|140,275|Arial,B,12|200,50,50">

<!-- Pie Data -->
<!-- PieN x,y,size,number of segments, seperation -->
<PARAM name="Pie1" value="80,55,115,6,0">
<PARAM name="Pie2" value="310,125,140,6,10">
<PARAM name="Pie3" value="80,300,175,6,10">

<!-- Pie Segement Labels -->
<PARAM name="pie1label1" value="N.America">
<PARAM name="pie1label2" value="Europe">
<PARAM name="pie1label3" value="Asia">
<PARAM name="pie1label4" value="Africa">
<PARAM name="pie1label5" value="Australia">
<PARAM name="pie1label6" value="S.America">

<PARAM name="pie2label1" value="N.America">
<PARAM name="pie2label2" value="Europe">
<PARAM name="pie2label3" value="Asia">
<PARAM name="pie2label4" value="Africa">
<PARAM name="pie2label5" value="Australia">
<PARAM name="pie2label6" value="S.America">

<PARAM name="pie3label1" value="N.America">
<PARAM name="pie3label2" value="Europe">
<PARAM name="pie3label3" value="Asia">
<PARAM name="pie3label4" value="Africa">
<PARAM name="pie3label5" value="Australia">
<PARAM name="pie3label6" value="S.America">

<!-- Segment Data -->
<!-- segmentN series color|legend label|URL|Target Frame -->
<PARAM name="segment1" value="115,152,164|North America|http://www.jpowered.com|_self">
<PARAM name="segment2" value="99,99,156|Europe|http://www.jpowered.com|_self">
<PARAM name="segment3" value="185,53,8|Asia|http://www.jpowered.com|_self">
<PARAM name="segment4" value="239,214,115|Africa|http://www.jpowered.com|_self">
<PARAM name="segment5" value="0,63,68|Australia|http://www.jpowered.com|_self">
<PARAM name="segment6" value="17,97,158|South America|http://www.jpowered.com|_self">

<!-- Images -->
<!-- imageN imageURL,x position,y position -->
<!-- <PARAM name="image1" value="./images/productX.gif,80,45"> -->
<!-- <PARAM name="image2" value="./images/productY.gif,330,45"> -->
<!-- <PARAM name="image3" value="./images/productZ.gif,155,220"> -->

</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

 

 

 

 

<< back to Examples Index

<< back to Getting Started

Getting Started

Documentation

Examples

Purchase

Pie Chart Home

 

Graph & Charting

Pie Chart
Line Graph
Vertical Bar Graph
Stacked Bar Graph
Horizontal Bar Graph
more...

 

Advanced Data Grid Control