knobelman
Posts: 8
Joined: Tue Apr 06, 2021 12:56 pm

Adding an sma on top of a scatter chart

Hello,
In my Angular project, I'm trying to use this example: https://jsfiddle.net/gh/get/library/pur ... ators/sma/
to add a sma series to overlay a scatter series, but nothing works. I keep receiving the next error: "ERROR Error: Highcharts error #17: www.highcharts.com/errors/17/?missingModuleFor=sma missingModuleFor: sma"
I've tried adding so many scripts, I just can't find one that works.

Please help, thank you :D
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Adding an sma on top of a scatter chart

Hello knobelman!

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

I've prepared a simple demo in angular with indicators so you can compare it to your demo and see the differences. Probably you didn't import indicators properly. :)

Demo: https://stackblitz.com/edit/highcharts- ... ors-9tqcey

Best regards!
Dominik Chudy
Highcharts Developer
knobelman
Posts: 8
Joined: Tue Apr 06, 2021 12:56 pm

Re: Adding an sma on top of a scatter chart

dominik.c wrote: Wed Apr 07, 2021 9:05 am Hello knobelman!

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

I've prepared a simple demo in angular with indicators so you can compare it to your demo and see the differences. Probably you didn't import indicators properly. :)

Demo: https://stackblitz.com/edit/highcharts- ... ors-9tqcey

Best regards!
Thank you for the quick reply!
I'm still getting an error:
Uncaught TypeError: Cannot read property 'prototype' of undefined
at indicators.js:12
at f (indicators.js:10)
at indicators.js:11


The way I use highcharts is a bit different- maybe that plays a roll in this.
I create the options, fill up the data, and then run this line: "Highcharts.chart(this.id, this.chartOpt);" (this.id is the id of the div where the chart will be rendered). Is this the cause for the issue? (I'm not using the Highcharts Angular wrapper)
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Adding an sma on top of a scatter chart

Hi again!

It should work anyway. Could you reproduce the issue in an online editor that I could work on? Then it'll get easier to get to the heart of this problem.

Best regards!
Dominik Chudy
Highcharts Developer
knobelman
Posts: 8
Joined: Tue Apr 06, 2021 12:56 pm

Re: Adding an sma on top of a scatter chart

Hi again!
The problem is solved, i wasn't using 'import * as Highcharts from "highcharts/highstock";'
Thanks! :)
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Adding an sma on top of a scatter chart

That's great to hear!

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

Return to “Highcharts Usage”