3D Cylindrical Columns Chart in Angular using HighChart

In this article, we saw how to draw 3d cylindrical columns charts in angular using HighChart. In last article, we saw 3D pie and donut chart in HighChart.
For drawing the chart First, we need to install High chart node modules in our application.

npm install highcharts --save
npm install highcharts-angular --save

After installing module lets add a module in our app.module.ts file.

import { HighchartsChartModule } from 'highcharts-angular';
imports:      [ ..., HighchartsChartModule],

After adding a module in the app.module file we can use it in our component to draw the chart. Let’s create app.component.ts file and add import highchat module using “import * as Highcharts from ‘highcharts’;” then assign options and values to the chart in this chart we need to chart type as “Pie” and adding series data we need to pass the browser name and percentage in json format to draw the data. In last article we show for 3D chart option enable we need to import “highcharts-3d” in our component. How to import “highcharts-3d” modules display in below code.

import highcharts3D from 'highcharts/highcharts-3d';

For cylindrical layout we need also import “cylinder” module in our component.

import Cylinder from 'highcharts/modules/cylinder';

Below is the full code for component and the html files.

import { Component, VERSION ,OnInit } from '@angular/core';
import * as Highcharts from 'highcharts';

declare var require: any;
const More = require('highcharts/highcharts-more');

import Histogram from 'highcharts/modules/histogram-bellcurve';

import highcharts3D from 'highcharts/highcharts-3d';

import Cylinder from 'highcharts/modules/cylinder';

const Exporting = require('highcharts/modules/exporting');

const ExportData = require('highcharts/modules/export-data');

const Accessibility = require('highcharts/modules/accessibility');
import * as newdata from './data';

  selector: 'my-app',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.css' ]
export class AppComponent  implements OnInit{

  public activity;
  public xData;
  public label;

  constructor() {

    this.options = {
    chart: {
        type: 'cylinder',
        options3d: {
            enabled: true,
            alpha: 20,
            beta: 15,
            depth: 50,
            viewDistance: 30
    title: {
        text: 'Highcharts Cylinder Chart'
    plotOptions: {
        series: {
            depth: 25,
            colorByPoint: true
    series: [{
        data: [29.9, 81.5, 116.4, 119.2, 164.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
        name: 'Cylinders',
        showInLegend: false


    Highcharts.chart('container', this.options);

<h1 style="text-align:center">3D Cylindr Chart in Angular</h1>
<div id="container"></div>

Below is the full embeded code for the 3D cylindrical chart using Highchart you can easily used in your application.

Spread the love
  • 1
  • 2