Search code examples
highchartsangular5sankey-diagramhighcharts-ng

How to use Sankey chart from highchart in Angular5


I have been using angular5 and have install the highchart using npm install.

Now I am able to use all the chart using the same except the sankey charts.

It gives me hightchart error 17.

Please help.


Solution

  • In your app.module.ts file add these three lines it will will work.

    import { Component } from '@angular/core';

    import * as Highcharts from 'highcharts';
    import * as highchartsSankey from 'highcharts/modules/sankey';
    highchartsSankey(Highcharts);