score:9
This type of error can occur when you do not have definition files for exported variables. Those Highcharts extensions still require them - you might want to read more about importing modules without d.ts here: https://github.com/Urigo/meteor-static-templates/issues/9 - it might change in the future.
You need to create a d.ts file for the extensions. For highcharts-more this is my file:
/// <reference path="index.d.ts" />
declare var HighchartsMore: (H: HighchartsStatic) => HighchartsStatic;
declare module "highcharts/highcharts-more" {
export = HighchartsMore;
}
reference path points to standard DefinietelyTyped Highcharts file from here https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/highcharts/highcharts.d.ts It allows to use type from Highcharts.d.ts because initializing will need proper typing for initializing extension:
HighchartsMore(Highcharts);
And finally don't forget to include all d.ts files by defining tsconfig or writing reference path in your files.
score:2
remove these lines from webpack.config.js:
plugins: [
new webpack.ProvidePlugin({
Highcharts: 'highcharts',
HighchartsMore: 'highcharts/highcharts-more',
HighchartsExporting: 'highcharts/modules/exporting'
})
]
install typings file for highcharts using this:
npm install --save @types/highcharts
change your import statements to following:
import * as Highcharts from 'highcharts';
import HighchartsMore = require('highcharts/highcharts-more');
HighchartsMore(Highcharts);
Source: stackoverflow.com
Related Query
- how to import highcharts with webpack and babel
- Import Highcharts and highcharts-more (AngularJS 1.5 + TypeScript + webpack)
- how to import highcharts offline-exporting in typescript
- Highcharts - Global configuration with common code and unique data & Headings
- angularjs and highcharts / highchartsNG - renderTo not working
- HighCharts - Need more space between bottom of chart and Xaxis labels
- Click event and two way data binding in HighCharts using AngularJS
- How do i add mouse wheel code in Angular2 highcharts in typescript
- Highcharts more and highcharts guage issue
- How to use Highcharts in typescript and react
- How to draw multiple highcharts using highcharts-ng and angularjs
- Highcharts error #13 and AngularJs
- hover on a point in highcharts graph using playwright and typescript
- Converted PHP code that built an array to JS and now highcharts doesn't work - what did I do wrong?
- Typescript and HighCharts
- Real Time Bar chart using Highcharts and AngularJs
- Highcharts with React Legend placement and more
- Handle checkbox input in x-axis label with Highcharts and AngularJS
- Import CSV to highcharts scatterplot with tooltip populated by point name and x,y values
- Angularjs highcharts and modal windows clear previous chart
- Using the source version instead of mimified when import lib with reactjs and npm
- how can I use rangeselector and navigation in highcharts in the given code
- Calling Highcharts export to jpeg but the source is https and exporting is http (security warnings issued by browser)
- Angularjs and Highcharts directive in Nested object
- How do I set multiple unique charts in their own DIVs using an AngularJS directive and Highcharts
- How to create a column range chart in Highcharts using range and navigator functions?
- Hide axis and gridlines Highcharts
- Customize tooltip and format the number to 2 decimal places of highcharts
- Highcharts 3 cannot render more than 1000 points in one series
- Loading Highcharts via shim using RequireJS and maintaining jQuery dependency
More Query from same tag
- jsPDF addHTML method not working with no error message
- highcharts add percent sign in data values
- Highcharts: how to use multiple line formats in one series?
- Highcharts - Rails array includes empty date entries
- Highcharts, chart with two series starting in diferent points, how yo show single column?
- Highstock inputDateParser fires three times
- Heatmaps with multiple dataset + border
- Remove elements in a chart generated with highchart
- Draw a vertical line when clicking on the series in highcharts.
- Unit test for Highcharts tooltip in Angular
- Passing dynamic php values for Highchart graphs
- set font size of sankey chart in HIghcharter for R
- HighCharts not displaying all the categories
- Too long chart axis label title
- HighCharts Bug with LiveChart
- highstock display tooltip wrong in iframe
- How to create a progressive pie chart using Highcharts
- How to hide bar but keep datalabels HighCharts
- How to get Render Performance for Javascript based Charting Libraries?
- Highcharts:add click event on data label for pie chart
- jQuery variable to php variable
- Execute function after zoom highcharts
- How can i call java script function by clicking x Axis label on Highchart
- HighChart overlap columns but with two groups
- How can I display a Highcharts organization chart with level 1 nodes below other level 1 nodes?
- Reduce white space below plot area without using negative marginBottom
- Unable to hold onto variable after fetching JSON data
- Highchart legend based on unique series/names
- How to add random ticks on a line chart at a specific position
- Javascript/Jquery/Gantt Highchart : On clicking over a task progress pop-up should get open