|
|
2D Pie Chart
Author: Antony Corsten Reference Number: AA-00329 Views: 4518 Last Updated: 08/05/2009 06:03 AM |
0 Rating/ Voters
|
![](https://web-site-scripts.com/knowledge-base/admin/images/local/FirstTheme/ico-rating-g.gif) ![](https://web-site-scripts.com/knowledge-base/admin/images/local/FirstTheme/ico-rating-g.gif) ![](https://web-site-scripts.com/knowledge-base/admin/images/local/FirstTheme/ico-rating-g.gif) ![](https://web-site-scripts.com/knowledge-base/admin/images/local/FirstTheme/ico-rating-g.gif) |
2D Pie Chart
Sample XML for 2D Pie Chart:
<?xml version="1.0" encoding="iso-8859-1"?>
<graph>
<general_settings bg_color="ffffff" bagel="0" animation="1" />
<header text="Test header" font="Verdana" color="000000" size="18" />
<subheader text="Test Subheader" font="Verdana" color="000000" size="15" />
<legend show="1" font="Verdana" font_color="000000" font_size="11" bgcolor="ffffff" alternate_bg_color="EAEAEA" border_color="000000" />
<legend_popup font="Verdana" bgcolor="FFFFE3" font_size="10" />
<pie_chart radius="120" alpha="90" />
<data name="Czech Rep." value="20" color="f000FF" size_sliced="0" />
<data name="Ukraine" value="38.65" color="0000FF" size_sliced="0" />
<data name="Finland" value="13.43" color="999999" size_sliced="0" />
<data name="Slovakia" value="7.42" color="FFFF00" size_sliced="0" />
<data name="Shweden" value="4.24" color="FF0000" size_sliced="0" />
<data name="USA" value="2.83" color="333333" size_sliced="0" />
<data name="Iraq" value="13.43" color="00FFFF" distance_sliced="10" />
</graph>
Description:
Header tag of the XML file:
You should place a valid XML header at the beginning of every XML file. If you use symbols different from Latin-1 encoding, please set the right encoding for you. In order to get more universality you can use Unicode:
Setting up the appearance of the chart:
Data:
Attribute |
Description |
bg_color
|
"ffffff" - background general color
|
bagel
|
"0" - continuous pie chart
'1' - pie chart with a hole in the center (like a bagel)
|
animation
|
"1" - with animation
"0" - without animation
|
Setting up the top row of the Pie Chart header (the uppermost text):
Data:
Attribute |
Description |
text
|
'Test header' - Header content
|
font
|
'Verdana' - Header font
|
color
|
'000000' - Header color
|
size
|
'18' - Header font size
|
Setting up the bottom row of the Pie Chart header (the text second from above):
Data:
Attribute |
Description |
text
|
'Test subheader' - Header content
|
font
|
'Verdana' - Header font
|
color
|
'000000' - Header color
|
size
|
'15' - Header font size
|
Setting up the legend (conformity of color, name, and percentage value of sectors on the diagram) of the circular diagram (an element in a framework):
Data:
Attribute |
Description |
show
|
"1" - show the legend
'1' - to show
'0' - not to show
|
font
|
'Verdana' - caption font
|
font_color
|
'000000' - caption color
|
font_size
|
'11' - caption font size
|
alternate_bg_color
|
"EAEAEA" - legend background alternate strip color
|
border_color
|
'000000' - legend border color
|
Setting up the view of the popup hint on mouse on the sectors of Pie Chart:
Data:
Attribute |
Description |
font
|
'Verdana' - caption font
|
bgcolor
|
'FFFFE3' - popup background color
|
size
|
'10' - caption font size
|
Setting up the view of the Pie Chart:
Data:
Attribute |
Description |
radius
|
| "120" - circle radius
alpha
|
'90' - Pie Chart alfa-transparency
|
Setting up data:
Data:
Attribute |
Description |
name
|
"Czech Rep." - Pie Chart sector name
|
value
|
"20" - percent value (%). Sum of percent values for all sectors must be equal to 100% !
|
color
|
"f000FF" - Pie Chart sector color
|
distance_sliced
|
"0" - value on which the diagram sector puts forward in a direction opposite from the center of the diagram
|
|
|
|