Chart limits are the minimum and maximum y-axis values. While FusionCharts Suite XT can automatically calculate the best chart limits, it also allows you to specify them explicitly.
The axis limits encompass all values present in the chart; no data value in the chart can be less than the minimum y-axis value or greater than the maximum y-axis value. If an axis limit outside of this range is specified, FusionCharts Suite XT will automatically adjust it.
This section will guide you on how you can configure the chart limits for single and dual y-axis charts. This section talks about:
Setting chart limits explicitly
Setting y-axis minimum value based on data values
Setting axis limits for charts with dual y-axis
Setting same axis limits for primary and secondary y-axes
Showing or hiding y-axis values
Setting chart limits explicitly
A column 2D chart with the chart limits explicitly set to 2,500,000 looks as below:
Given below is the attributes used to define the chart limits:
Attribute | Description |
---|---|
yAxisMinValue and yAxisMaxValue |
They specify the values to be set as lower and upper chart limits, respectively, on the y-axis. |
The data structure used, in the chart above, to configure chart limits is as follows:
Setting y-axis minimum value based on data values
You can decide whether to set the y-axis lower limit to 0
(zero) or should the y-axis lower limit adapt itself to a different figure based on the values provided to the chart.
A column 2D chart with adaptive minimum value for the y-axis set looks as below:
Given below is the attribute used to set an adaptive minimum value for the y-axis:
Attribute | Description |
---|---|
setAdaptiveYMin |
If set to 1 , the minimum value of the y-axis adapts itself based on the minimum data value in the chart. If set to 0 (default), the y-axis minimum value is set to 0. |
The data structure needed to set adaptive minimum value for the y-axis is given below:
Setting axis limits for charts with dual y-axis
A combination chart with chart limits explicitly defined for the primary and secondary y-axis looks as below:
Given below are the attributes used to explicitly set chart limits for the primary and secondary y-axis:
Attribute | Description |
---|---|
pYAxisMinValue and pYAxisMaxValue |
They specify the values to be rendered as lower and upper limits, respectively, for the primary y-axis. |
sYAxisMinValue and sYAxisMaxValue |
They specify the values to be rendered as lower and upper limits, respectively, for the secondary y-axis. |
The data structure used, in the chart above, to define chart limits for the primary and secondary y-axis is given below:
Setting same axis limits for primary and secondary y-axes
You can configure your charts to have the chart limits for the primary and secondary y-axis synced. For charts with static data this can be done by specifying the minimum and maximum y-axis values. This won’t work for dynamic chart data. You can use the sync axis limit feature to ensure that both y-axes have the same limits. A column 2D chart with synced chart limits for the primary and secondary y-axis looks as below:
Given below is the attribute used to sync the chart limits in a dual y-axis chart:
Attribute | Description |
---|---|
syncAxisLimits |
If set to 1 , it will sync chart limits in a dual y-axis chart. By default, the chart limits are not synced. |
The data structure needed to sync chart limits in a dual y-axis chart is given below:
Showing or hiding y-axis values
A column 2D chart with the y-axis limits showing, but all other y-axis values hidden looks as below:
Given below is the attribute used to hide chart limits:
Attribute | Description |
---|---|
showLimits |
Set it to 0 , to hide the chart limits and to 1 (default) to show the chart limits. This overrides the setting of the showYAxisValues attribute. |
showYAxisValues |
Set it to 0 , to hide all values on the y-axis and to 1 (default) to show all values. |
The data structure needed to hide chart limits is given below: