Still have questions?
Contact support

3D Charts

Overview

AnyChart supports 3D versions of the following chart types: Area, Bar, Column, and Pie. Some modifications of these types can be also drawn in 3D – see the Supported Types section.

This article explains how to create and configure 3D charts.

Quick Start

To create a 3D chart, use one of the following chart constructors:

You can either pass your data to the chart constructor or create a series, using one of these methods:

That is how it looks like:

// create a data set
var data = anychart.data.set([
  ["January", 10000],
  ["February", 12000],
  ["March", 18000],
  ["April", 11000],
  ["May", 9000]
]);

// create a 3d column chart
chart = anychart.column3d();

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

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

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

JsFiddle Playground

Z-Angle

3D charts can be shown from different angles of view: to set the angle, use the zAngle() method with any 3D chart except the 3D Pie.

Note: The value you use as a parameter should fall in the range from 0 to 90. By default, the angle is 45°.

In the following sample, there is a 3D Column chart with the Z-angle set to 20°.

// configure the z-angle of the chart
chart.zAngle(20);

JsFiddle Playground

Z-Aspect

3D charts can vary in depth: to set it, use the zAspect() method with any 3D chart except the 3D Pie.

Note: You can set the depth either in pixels (numeric value) or in percentage (string value).

In the sample below, there is a 3D Column chart with the Z-aspect set to 100% (the Z-angle is also configured):

// configure the z-aspect of the chart
chart.zAspect("100%"");

JsFiddle Playground

Z-Distribution

In 3D multi-series charts, series are distributed along the X-axis by defalut. However, you can also distribute them along the Z-axis: call the zDistribution() method and use "true" as a parameter. The "false" paramater enables the default X-distribution.

Here is a sample 3D Column chart with the Z-axis distribution enabled:

// enable the z-axis distribution mode
chart.zDistribution(true);

JsFiddle Playground

Supported Types

Here is the list of supported 3D charts:

See also 3D stacked charts: