XML/SWF Charts| CSS/XML Timeline Eons(New)| Timeline Eons| SlickBoard

 < previous 

 

Chart Attributes

 

Chart attributes can be modified to create different charts. This is done by adding the corresponding XML elements to the sample.xml source file. Example:


<chart>

<!-- change the chart to a bar chart -->
<chart_type>bar</chart_type>

</chart>

 


XML Attributes

The above <chart_type> XML element sets a single value. However, most XML elements have attributes holding several chart values like this:


<chart>

<!-- make the chart's border red, 4 pixels thick, except for the top -->
<chart_border top_thickness='0' bottom_thickness='4' left_thickness='4' right_thickness='4' color='FF0000' />

</chart>

 


Setting Multiple Chart Attributes

To edit several chart attributes, add as many XML elements as needed to the XML source:


<chart>

<!-- change the chart to a bar chart -->
<chart_type>bar</chart_type>

<!-- make the chart's border red, 4 pixels thick, except for the top -->
<chart_border top_thickness='0' bottom_thickness='4' left_thickness='4' right_thickness='4' color='FF0000' />

</chart>

 


Omitting Chart Attributes

Setting chart attributes is optional. When omitted, the default attributes are used instead:


<chart>

<!-- make the chart's border red, and keep the default thickness -->
<chart_border color='FF0000' />

</chart>

 


XML Syntax

  • The XML source must have the <chart> root element
  • XML tags are case sensitive (<chart_type> is correct. <Chart_Type> is not).
  • XML elements must be properly nested
  • Attribute values must be enclosed in either single or double quotes (<chart_border color='FF0000' /> or <chart_border color="FF0000" />)

 


What Next?

Next, explore the reference section, which lists and describes all the XML tags used to create elaborate charts and graphs.

For examples, explore the gallery section and click below each chart to see its code.

 

 

 < previous 


Copyright © 2003-2017, maani.us