Spline charts are a specialized form of line charts that display smooth curves through the different data points.
In this section, you will be introduced to the:
Basics of spline charts
Types of spline charts
Basics of Spline Charts
Spline charts integrate all the characteristics of a conventional line chart except for the fact that unlike line charts, which connect data points with straight lines, spline charts draw a fitted curved line to join the data points.
Spline charts can be used for plotting data that requires the usage of curve-fitting e.g. an impulse-response chart, a product life cycle chart, etc. It is also significantly used in designing Pareto charts.
Types
FusionCharts Suite XT includes four types of spline charts:
Single-series spline 2D chart
Multi-series spline 2D chart
Single-series spline area 2D chart
Multi-series spline area 2D chart
Single-series Spline 2D Chart
A single-series spline 2D chart draws a single fitted curve through the data points.
A simple single-series spline 2D chart looks like this:
The data structure needed to render a single-series spline 2D chart is given below:
Multi-series Spline 2D Chart
A simple multi-series spline 2D chart looks like this:
To render a multi-series spline chart:
Set the
type
attribute tomsspline
.Use the
seriesname
attribute and thedata
object, which belong to thedataset
object, to specify multiple datasets.
Multi-series Spline Area 2D Chart
A multi-series spline area 2D chart is nothing but a conventional area with a smoothened curve drawn through the data points in the series. It allows you to plot data for multiple data sets.
A simple multi-series spline area 2D chart looks like this:
The data structure needed to render a multi-series spline area 2D chart is given below:
Single-series Spline Area 2D Chart
A simple single-series spline area area 2D chart looks like this:
To render a single-series spline chart:
- Set the
type
attribute tosplinearea
.
Spline and spline area charts do not support joining of empty data points in the chart. That means, if your chart does not contain data at a particular point, the data points cannot be connected to each other and will appear as a broken dataset.
There! You have now seen and understood the basics of spline charts and how the various types can be rendered.