The FusionCharts Suite XT standard charts are simple charts used to plot single-series data. For example, you can plot the revenue for each month of one year using a single-series chart. These charts are rendered with a single y-axis. You can choose to render the column chart and the bar chart in 2D or 3D.
The standard single-series charts available in the FusionCharts Suite XT are:
Column 2D
Column 3D
Bar 2D
Bar 3D
Line 2D
Area 2D
In this section, you will be shown a few examples of how the standard charts look and work.
Creating the Column 2D Chart
A single-series column 2D chart looks like this:
In the above chart, we have shown the monthly revenue for the last one year for Harry’s SuperMart. We have plotted the months along the x-axis and the revenue, which is a numeric value, along the y-axis.
The data structure needed to create a column 2D chart is given below:
Creating the Bar 2D Chart
A single-series bar 2D chart looks like this:
A bar chart is like a column chart that is inverted. Therefore, the numeric values, plotted along the y-axis in a column chart, are plotted along the x-axis in a bar chart and the data plot labels are plotted along the y-axis.
In the above chart, we have shown the five stores in a supermarket that have the highest sales. The sales figures have been plotted along the x-axis and the store names have been plotted along the y-axis.
The data structure needed to render the above bar 2D chart is given below:
Creating the Line 2D Chart
A single-series line 2D chart looks like this:
In the above chart, we have shown the total footfall at Bakersfield Central. We have plotted the days along the x-axis and the number of visitors along the y-axis.
The data structure needed to create a line 2D chart is given below:
Creating the Area 2D Chart
A single-series area 2D chart looks like this:
An area chart is similar to chart, except that the area marked by the anchors and line segments is filled.
In the above chart, we have shown the sales of liquor in a store for each day of a week. The sales figures have been plotted along the y-axis and the days have been plotted along the x-axis.
The data structure needed to render an area chart is given below:
Brief Explanation of the JSON Data
In the JSON data, the attributes and their corresponding values are written in the following key-value pair format:
"<attributeName>": "<value>"
Given below is a brief description of the data structure needed to render a standard single-series chart:
Attribute Name | Description |
---|---|
type |
It is used to specify the type of chart you want to render. For example, to render a column 2D chart, the value for this attribute will be column2d . |
renderAt |
It is used to specify the container object where the chart will be rendered. |
width |
It is used to specify the width of the chart. |
height |
It is used to specify the height of the chart. |
dataFormat |
It is used to specify the type of data that will be passed to the chart object. This attribute takes two values: json , when the JSON data to render the chart is passed to the dataSource attribute, and jsonurl , when the relative path to a .json file is passed to the dataSource attribute. |
dataSource |
It specifies the source from where the data will be fetched, depending on the value passed to the dataFormat attribute. |
caption |
It is used to specify the chart caption. This attribute belongs to the chart object. |
subCaption |
It is used to specify the chart sub-caption. This attribute belongs to the chart object. |
xAxisName |
It is used to specify the name for the x-axis. |
yAxisName |
It is used to specify the name for the y-axis. |
numberPrefix |
It is used to specify the character that will precede all numeric values on the chart, e.g. $ for the currency symbol. |
theme |
It is used to specify the theme for the chart. A theme is a pre-defined configuration for the visual elements of a chart - you can configure various elements like the background color, the color for the data plots, etc. at once and use the theme wherever you want the same configuration. |
label |
It is used to specify the label for a data item. The label is rendered on the x-axis. This attribute belongs to the data object. |
value |
It is used to specify the value for a data item. This attribute belongs to the data object. |
There! You have now seen how you can create simple standard charts