fusion chart basics
whats the difference between these in Fusion charts?
- name and label 开发者_JAVA技巧
- graph and chart
Here is an example for an Chart and an Graph:
The tags for the axis in the Chart (Sales and Years) are called names in Fusioncharts and we have labels for the represented values (2008 - 2010).
In the graph wie have one Caption (Sales 2011) and some labels (Hardware, Software and Service).
When is it an Chart?
We call it a chart if it shows something in relation - in this example the sales over time. Another example could be the population of an city over time or the graphical illustration of an equation like y=x².
In the example there is only one quantity (the overall sale) per time. There could also be multiple quantities. E.g. the per category splitted sales from the Graph-example, but over time - as an bar-chart with either multiple bars ("Multi-series Bar" in FusionCharts) or an single fractioned bar ("Stacked Bar" in FusionCharts) or an line-chart with multiple lines ("Multi-series Line" in FusionCharts) per year.
When is it an Graph?
When you compare quantities that are not necessarily linked together, then it is an graph. In this example the fraction of hardware/software/service in sales of one year.
Another example are the electors of the different partys in an election.
Whereas it would be an chart if you show the alteration of the electors over several elections (even if you show the electors for all partys, that is the same as in the Sales for all categorys over time from above).
I assume that your question was with respect to FusionCharts data XML. If yes, then my answer below would be pertinent.
Difference between <chart> and <graph> XML nodes
FusionCharts data XML starts with a root XML node whose name is <chart> or <graph>.
FusionCharts Free supports <graph> and FusionCharts v3 supports <chart> tags and also supports <graph> tag for backward compatibility. (Refer to the data xml documentation of FusionCharts Free and FusionCharts v3 to know more.)
This root node for the data is same across all charts and widgets of FusionCharts suite except that for FusionMaps, it uses <map> tag.
Difference between name and label attributes
Similar to the above issue of root data node's name, the "name" attribute (generally of <set> nodes or <category> nodes) is for FusionCharts Free and for FusionCharts v3, it is "label". However, for backward compatibility, FusionCharts v3 also supports "name" attribute.
精彩评论