2

How should I be using Highcharts in Angular?

I imported it

import * as Highcharts from 'highcharts'

then tried

Highcharts.chart(tag, options)

where tag is a string id of an HTML element, and options is the plot options. But typescript claims there is no such overload for chart(), or more explicitly

Type 'string' has no properties in common with type 'Options'

However, when I peeked into chart(), I quickly noticed that there sure is one, specifically one that take renderTo as its first argument.

Why typescript lying? Or more likely, what am I missing?

0 Answers0