Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-data-to-display can't read property parts/Globals.js of undefined #10465

Closed
chook opened this issue Apr 2, 2019 · 7 comments
Closed

no-data-to-display can't read property parts/Globals.js of undefined #10465

chook opened this issue Apr 2, 2019 · 7 comments

Comments

@chook
Copy link

chook commented Apr 2, 2019

Started today with v7.1.0 using Chrome 72 on macOS

HTML has:
<script src="https://code.highcharts.com/modules/no-data-to-display.js"></script>

Uncaught TypeError: Cannot read property 'parts/Globals.js' of undefined
    at no-data-to-display.src.js:32
    at no-data-to-display.src.js:23
    at no-data-to-display.src.js:12
(anonymous) @ no-data-to-display.src.js:32
(anonymous) @ no-data-to-display.src.js:23
(anonymous) @ no-data-to-display.src.js:12
@jon-a-nygaard
Copy link
Contributor

Hi @chook, thanks for reporting.

I was unable to recreate the issue, and it seems to be working as expected in our demos. See Line chart with no-data module.

Could you recreate the issue in a live example? JSFiddle often works well for this purpose.

@pawelfus
Copy link
Contributor

pawelfus commented Apr 2, 2019

It's probably cache issue. Error shows up when using Highcharts v7.0.3 and modules from v7.1.0: https://jsfiddle.net/BlackLabel/L254wvcp/

@jon-a-nygaard
Copy link
Contributor

Thanks @pawelfus! 👍 Then I will consider this not a bug, as we do not support the use of Highcharts modules from one version together with a Highcharts instance from a different version.

The way to solve this is either to make sure all the Highcharts files are of the same version number, or to have one Highcharts instance for each version.
To have multiple instances you will have to use some sort of module system for the loading (CommonJS, AMD, etc), or remove the Highcharts instance from window before loading the next.

I assume that the reproduction above is the same issue as reported by @chook, and will therefore close this issue as not a bug. Should anyone have any further details or questions about this issue then feel free to let us know in a comment.

@t-briz
Copy link

t-briz commented Apr 2, 2019

@jon-a-nygaard
I have a complaint from client, found this same exact issue started yesterday out of nowhere:
Highcharts chart is blank.
We have not touched this program in weeks and it stopped working yesterday.

Console errors:

IE 11
SCRIPT5007: Unable to get property 'parts/Globals.js' of undefined or null reference
data.src.js (31,5)

Microsoft Edge 44.17763.1.0
SCRIPT5007: SCRIPT5007: Unable to get property 'parts/Globals.js' of undefined or null reference
data.js (10,368)

Chrome 73.0.3683.86
Uncaught TypeError: Cannot read property 'parts/Globals.js' of undefined
at data.src.js:31
at data.src.js:22
at data.src.js:11

Using local highcharts.js file in project folder
Highcharts JS v6.1.1 (2018-06-27)

But linking to this file:
script src = "https://code.highcharts.com/modules/data.js"></script

If this is not a bug is there a suggested solution for my situation?
Do I need to stop using my local set of highcharts.js files and connect to code.highcharts.com and use the latest version? (Note: our license is only for version 6, so I cannot do this. How do I find a compatible version of data.js?)

@chook
Copy link
Author

chook commented Apr 3, 2019

I changed to code to point to https://code.highcharts.com/6.1.4/modules/no-data-to-display.js
to get it to work.
We weren't even using it directly but rather were using mixpanel-platform to call highcharts.

@pawelfus
Copy link
Contributor

pawelfus commented Apr 3, 2019

Hi @t-briz

If this is not a bug is there a suggested solution for my situation?
Do I need to stop using my local set of highcharts.js files and connect to code.highcharts.com and use the latest version?

You don't use local set of highcharts.js files, not for data module: <script src = "https://code.highcharts.com/modules/data.js"></script> - this loads data module for version v7.

Note: our license is only for version 6, so I cannot do this. How do I find a compatible version of data.js?

Everything is written on our CDN: http://code.highcharts.com/ :) For example the one @chook posted will work (but first you should check your current exact version).

@t-briz
Copy link

t-briz commented Apr 3, 2019

@chook @pawelfus thank you both so much, this solution worked, changed the url to contain my version number:

script src = "https://code.highcharts.com/6.1.1/modules/data.js"></script

hopefully this will help someone else as well.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants