| Contact | FAQ | Forum | Blog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Chart data format
Whether what type of chart you need to display, their data format is the same, which allows you to easily create a dynamic output XML formatted data server-side program. the data in forms of two-dimensional table chart data, you can understand it as a two-dimensional table, for example, the following is a typical two-dimensional form:
this two-dimensional form's XML output format is as follows:
<?xml version='1.0' encoding='utf-8'?>
<graph title="Area of sale report" column_unit="Mouth">
<row title="North America" info="">
<column title="Jan">
<data unit="US$ 1000" title="amount of sales" value="48.27" alt="US$ 48.27 thousand" info=""/>
<data unit="piece" title="volume of sales" value="50" alt="" info=""/>
</column>
<column title="Feb">
<data unit="US$ 1000" value="54.8" alt="" info=""/>
<data unit="piece" value="259" alt="" info=""/>
</column>
<column title="Mar">
<data unit="US$ 1000" value="55.82" alt="15.82ÍòÔª" info=""/>
<data unit="piece" value="168" alt="" info=""/>
</column>
<column title="Apr">
<data unit="US$ 1000" value="42.2" alt="" info=""/>
<data unit="piece" value="506" alt="" info=""/>
</column>
</row>
<row title="Asia" info="">
<column title="Jan">
<data unit="US$ 1000" value="47.2222" alt="5" info=""/>
<data unit="piece" value="231" alt="" info=""/>
</column>
<column title="Feb">
<data unit="US$ 1000" value="44.8" alt="" info=""/>
<data unit="piece" value="129" alt="" info=""/>
</column>
<column title="Mar">
<data unit="US$ 1000" value="51" alt="15.82" info=""/>
<data unit="piece" value="138" alt="" info=""/>
</column>
<column title="Apr">
<data unit="US$ 1000" value="32.2" alt="" info=""/>
<data unit="piece" value="236" alt="" info=""/>
</column>
</row>
...
</graph>
look at the corresponding between XML format with the two-dimensional table, you'll find, a <row/> tag in XML presents a row of the chart; <column/> tag is one column in the chart, and <data/> tag is a data item in the chart¡¯s lines and rows.
XML tags and attributes description
<?xml version='1.0' encoding='utf-8'?>
<graph [ title="" column_unit=""]>
<row title="" [ info=""]>
<column title="">
<data value="" unit="" title="" [ alt="" info=""]/>
</column>
</row>
</graph>
JSON data format new JSON (JavaScript Object Notation) is a lightweight data-interchange format.The DChart2.1 version adds support for JSON format, you can choose to use json or XML as the data source. Either with a return URL json or XML data as a data source, you can also assign a string or XML string json way to spread the chart component. json, xml, mapping each other, and some tools to handle this conversion. Xml format and the same, for a variety of chart types, json format is the same, such as the following XML data and the corresponding JSON code:
<?xml version='1.0' encoding='utf-8'?>
<graph title="Unit Sales" column_unit="Product">
<row title="New York" info="Jan"]>
<column title="Gym shoes" info="Gym shoes">
<data value="456" unit="Units" title="amount of sales" alt="456" info="456"/>
</column>
</row>
</graph>
{"graph":
Please note that these red square brackets, even if only a Row / column or data, also must use the "[]" expressed in the form of an array. examples of several typical data the following data has only one column (a <column/> label); it is clear that in this case, line charts and radar charts have only one point, so it should not be allowed to switch displaying charts to line charts and radar charts of no significance; this type of data only one best suited to the data shows that pie chart
Some data have the following problems: in the second line, the U.S. dollar and the euro should have a different coordinate system, not be compared together; In addition, the maximum data gap among loans rose, upfront profit and Non-performing Loans have been so large, with unobviou relationship between the contrast. Therefore, the data should not be modeled according to the charts below, but adopt the following form of "data of only one row"
3.data of only one row (amendment to the above error) The following charts¡¯ data changed the data forms of the above charts, to avoid wrong comparisons among different coordinate systems; there is only one <row/> label, and the pie chart does not make sense when there is only one row , so the displaying chart should not be allowed to switch to a pie chart without practical significance.
Sometimes we want to highlight the data of a certain row, such as in a histogram, when there are one or more rows displayed in lines or graphs, or one or more rows displayed by histogram in a lines or graph chart, this definition is closely related with the data, so the definition shall be filed in the data file (this is the only definition of attribute related to display). Dcharts 2.1 version adds features dual coordinates, which coordinates in the presence of left main case, there is also another dimension of the right coordinates. A, column chart, stacked column chart, lines chart, curve chart support dual coordinates, bar, pie, radar and bar stacked charts of the double coordinates meaningless or can not be achieved, as in many types of charts under the switch, such as coordinates of a chart double the proposed limit in the configuration diagram of switching range; B, double coordinates only increase in the xml configuration file instead of <row/> <linerow/> can, all <row/> display properly, but <linerow/> is shown as the right coordinates; C, such as the switch does not support dual-chart type to the type of coordinates, <linerow/> tag does not work, the chart shows only <row/> part; D, non-dual column line coordinates also shows the situation: if the chart does not use double coordinates can also be based on property designated grptype <row> tag appears as lines or columns, such as the right sample.html in the fourth graph, if The data added to <linerow/> label, the original grptype property no longer works, when stacked column chart to bar graph or chart, <row/> be displayed as the corresponding data column, <linerow/> corresponding all the data displayed as line, when the chart for the line or curve chart, <linerow/> be displayed as the corresponding data column, <row/> corresponding data are shown as lines. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2003 - 2008 OriginSoft Components Inc. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||