Definitelytyped: Unable to import HighchartsNoDataToDisplay

Created on 22 Aug 2018  路  1Comment  路  Source: DefinitelyTyped/DefinitelyTyped

Unable to import HighchartsNoDataToDisplay

import HighchartsNoDataToDisplay from 'highcharts/modules/no-data-to-display';

saying @type/highcharts/modules/no-data-to-display has no default export.

Most helpful comment

@prameetpradhan This is my solution:

import * as Highcharts from 'highcharts';
declare function require(name: string);
const HighchartsNoDataToDisplay = require('highcharts/modules/no-data-to-display');
HighchartsNoDataToDisplay(Highcharts);

Happy coding :+1: :100: ;-)

>All comments

@prameetpradhan This is my solution:

import * as Highcharts from 'highcharts';
declare function require(name: string);
const HighchartsNoDataToDisplay = require('highcharts/modules/no-data-to-display');
HighchartsNoDataToDisplay(Highcharts);

Happy coding :+1: :100: ;-)

Was this page helpful?
0 / 5 - 0 ratings