Spline Area Chart
Overview
A spline area chart is an area chart in which data points are connected by smooth curves: this modification is aimed to improve the design of a chart.
Like in the regular area chart, the area between the line segments and the X-axis is filled with color or a pattern to emphasize the magnitude of change over time.
The Spline Area and Area chart types share all the settings, so this article explains just how to create a basic Spline Area chart. To learn about other settings, read the Area Chart article. You can also see the table below to get a brief overview of the Spline Area Chart's characteristics:
API | |
---|---|
Class | anychart.core.cartesian.series.SplineArea |
DATA | |
Data Fields | x, value |
Multiple Series | YES |
OPTIONS | |
Stacked | Stacked Spline Area, Percent Stacked Spline Area |
Vertical | Vertical Spline Area |
3D | N/A |
Error Bars | Spline Area Chart with Error Bars |
SUPPORTED CHART PLOTS | |
Polar | N/A |
Radar | N/A |
Scatter | N/A |
Stock | Stock Spline Area |
RELATED TYPES | |
Area | |
Step Area | |
Range Area | |
Range Spline Area | |
Range Step Area | |
SEE ALSO | |
Chartopedia: Spline Area Chart | |
General Settings |
Quick Start
To create a Spline Area series, use the splineArea() method (before, of course, you should create a chart by using anychart.area() or any other cartesian chart constructor):
// create data
var data = [
{x: "January", value: 10000},
{x: "February", value: 12000},
{x: "March", value: 18000},
{x: "April", value: 11000},
{x: "May", value: 9000}
];
// create a chart
var chart = anychart.area();
// create a spline area series and set the data
var series = chart.splineArea(data);
// set the container id
chart.container("container");
// initiate drawing the chart
chart.draw();
Settings
The Spline Area chart is a modification of the Area chart, so these two types share almost all the settings. You can find more settings in this article: Area Chart.
Also, in AnyChart there are many settings that are configured in the same way for all chart types, including the Spline Area chart (for example, legend and interactivity settings): General Settings.
In addition, see the full list of methods available for the Spline Area series: anychart.core.cartesian.series.SplineArea.