ajaxajax
Posts: 4
Joined: Thu May 06, 2021 12:37 am

Not able to plot variwide on Angular

Hi,
I am not able to plot variwide chart on "angular", Line charts, Column charts are working fine but Not "variwide"
after using require('node_modules/highcharts/modules/variwide')(Highcharts);
it's throwing an error

variwide.js:10 Uncaught TypeError: Cannot read property 'Core/Series/SeriesRegistry.js' of undefined
at variwide.js:10
at Module.NDtV (mosicChart.ts:9)
at __webpack_require__ (bootstrap:79)
at Module.Kjbg (chartmosic.component.ts:2)
at __webpack_require__ (bootstrap:79)
at Module.SwLB (mosicChart.ts:60)
at __webpack_require__ (bootstrap:79)
at Module.Sy1n (chart-holder.component.html:5)
at __webpack_require__ (bootstrap:79)
at Module.ZAI4 (app.module.ts:1)
Could you please help me to solve this issue ?? the problem is only with variwide in angular
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Not able to plot variwide on Angular

Hi,
Welcome to our forum and thanks for contacting us with your question!

I created an example in Angular where I add variwide series based on our official Angular wrapper.
There is no error, you can use it as a template, if the bug still persists, you can prepare an online version where you can reproduce it.

Demo:
https://stackblitz.com/edit/highcharts- ... ide-faharz

I'm waiting for news from you.
Best regards.
Sebastian Hajdus
Highcharts Developer
ajaxajax
Posts: 4
Joined: Thu May 06, 2021 12:37 am

Re: Not able to plot variwide on Angular

@sebastian.h Thank you so much for the example. Sorry for the late reply, After posting this questing I solved the issue by including

import { ChartModule, HIGHCHARTS_MODULES } from 'angular-highcharts';
import * as variwide from 'highcharts/modules/variwide';

app.module.ts
--------------------
providers: [{ provide: HIGHCHARTS_MODULES, useFactory: () => [variwide] }]

That is the reason for the late reply.
is this ok? if not then I will go through your code and will use your code...
Thank you,
Ajas.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Not able to plot variwide on Angular

Hi,
That's great to hear!

I think the reason was in missing modules.

In case of any further questions, feel free to contact us again.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Usage”