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

Crashed browser when use this code #784

Open
Victorlerner opened this issue Jun 20, 2019 · 3 comments
Open

Crashed browser when use this code #784

Victorlerner opened this issue Jun 20, 2019 · 3 comments

Comments

@Victorlerner
Copy link

Crashed browser when use this code


var line = new Morris.Line({
--
  | element: 'morris-line-chart',
  | resize: true,
  | data: [
  | {
  | y: '2018-9',
  | item1: 'INR 700'
  | },
  | {
  | y: '2019-2',
  | item1: 'INR 80.93'
  | },
  | {
  | y: '2019-3',
  | item1: 'INR 78'
  | },
  |  
  | ],
  | xkey: 'y',
  | ykeys: ['item1'],
  | labels: ['Item 1'],
  | gridLineColor: '#e0e0e0',
  | lineColors: ['#8d9498'],
  | lineWidth: 1,
  | hideHover: 'auto'
  | });


why this code breaks the browser? Google Chrome 75.0.3770.100 64bit

@mosvhy
Copy link

mosvhy commented Aug 10, 2019

Just like me, it crashed when using Morris Line and Area. I implement this morris code using Promise and await inside a dynamic page that has different scripts that are loaded each page. It will be crashed if using await to load the script, and it was okay if does not use await to load the script. And the script that I mean is not the library, but the script to initialize the charts.
I test it with 5 examples morris charts: Morris Donut, Bar, BarStacked, Line, and Area. I also have another example using jQuery Flot and jQuery Sparkline in that sample script and still okay without Morris LIne and Area in await mode.

Library version: morris.js v0.5.0, jquery.js v2.1.0;
Browser version: Firefox ESR v60.7.2esr (64-bit);

@pierresh
Copy link

Hello, it would be great if you could provide any log that appears in the console.

@pierresh
Copy link

Actually, your values in item1 are not numeric. These should be numeric otherwise it is normal they cannot be shown on the Y-axis.

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

No branches or pull requests

3 participants