You can have labels and guides in the data file (but only if you are using the XML data format). This is useful if you have multiple charts with the same settings, and only the labels/guides are different.
Adding labels and guides to the data XML is easy - the syntax of the XML is exactly the same as it is in the settings file. Here is an example:
<chart> <series> <value xid="0">Xbox 360</value> <value xid="1">PlayStation 3</value> <value xid="2">Wii</value> </series> <graphs> <graph gid="0" color="#9FCD95" gradient_fill_colors="#FFFFFF, #9FCD95"> <value xid="0" description="Click for more info about the Xbox 360" url="http://www.xbox360.com">399</value> <value xid="1" description="Click for more info about the PlayStation 3" url="http://www.playstation.com">599</value> <value xid="2" description="Click for more info about the Wii" url="http://www.wii.com">249</value> </graph> </graphs> <labels> <label> <x>0</x> <y>20</y> <align>center</align> <text> <![CDATA[<b>Prices of Game Consoles</b>]]> </text> </label> </labels> <guides> <guide> <start_value>26.16</start_value> <title>Average world ($26,16)</title> <color>#00CC00</color> <inside>true</inside> </guide> </guides> </chart>
| © Antanas Marcelionis Contact and feedback: info@amcharts.com | Subscribe to amCharts news |