Spline Chart

Overview

A spline chart is a line chart in which data points are connected by smooth curves: this modification is aimed to improve the design of a chart.

Like the regular line chart, it is commonly used to emphasize trends in data over equal time intervals.

The Line and Spline chart types share all the settings, so this article explains just how to create a basic Spline chart. To learn about other settings, read the Line Chart article. You can also see the table below to get a brief overview of the Spline chart's characteristics:

API
Classanychart.core.cartesian.series.Spline
DATA
Data Fieldsx, value
Multiple SeriesYES
OPTIONS
StackedN/A
VerticalVertical Spline
3DN/A
Error BarsSpline Chart with Error Bars
SUPPORTED CHART PLOTS
PolarN/A
RadarN/A
ScatterN/A
StockStock Spline
RELATED TYPES
Line
Step Line
SEE ALSO
Chartopedia: Spline Chart
General Settings

Quick Start

To create a Spline series, use the spline() method (before, of course, you should create a chart by using anychart.line() 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.line();

// create a spline series and set the data
var series = chart.spline(data);

// set the container id
chart.container("container");

// initiate drawing the chart
chart.draw();

Playground

Settings

The Spline chart is a modification of the Line chart, so these two types share all the settings. You can find more settings in this article: Line Chart.

Also, in AnyChart there are many settings that are configured in the same way for all chart types, including the Spline chart (for example, legend and interactivity settings): General Settings.

In addition, see the full list of methods available for the Spline series: anychart.core.cartesian.series.Spline.

You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.