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:
Modules | Core + Basic Cartesian / Base |
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 |
Modules
The Step Area chart requires adding the Core and Basic Cartesian modules:
<script src="https://cdn.anychart.com/releases/8.13.0/js/anychart-core.min.js"></script>
<script src="https://cdn.anychart.com/releases/8.13.0/js/anychart-cartesian.min.js"></script>
Alternatively, you can use the Base module, which includes, among other things, the two modules mentioned above:
<script src="https://cdn.anychart.com/releases/8.13.0/js/anychart-base.min.js"></script>
Learn more: Modules.
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
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.