question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't register module scatter3d

See original GitHub issue

Browser: Chrome 65 Device: Desktop Plotly.js version: 1.35.2

Problem: It’s not possible to use Plotly.register(require('plotly.js/lib/scatter3d')) to show up 3d charts. Error message appears:

Webgl is not supported by your browser

And console logs

app.bundle.js:8 Uncaught TypeError: Cannot read property ‘canvas’ of undefined

Using the same set-up and registering the bar components works fine. Repository for reproduction: https://github.com/ndabAP/plotly.js-scatter3d-issue/tree/master

Steps to reproduce:

  1. $ npm i
  2. Open file dist/index.html. You should see a bar chart
  3. Comment out line 20-21 and comment in line 6-17
  4. $ npm run build
  5. Open the file dist/index.html again. The error appears

When I import the whole Plotly.js library instead of registering the single chart components the 3d chart works fine.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ndabAPcommented, Mar 27, 2018

That did it. Sorry for bothering you. Should more rely on documentation 😉 Have a nice day!

0reactions
etpinardcommented, Mar 27, 2018

Your config isn’t right yet (I think, I’m no webpack expert). You do need to use ify-loaded on node_modules files. That is, that exclude: /(node_modules|bower_components)/, line seems off.

See full example here: https://github.com/plotly/plotly-webpack/blob/master/webpack.config.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

What must I register to get scatter 3d chart to work? - plotly.js
Hey, I'm using plotly.register to register my charts. However, I can't register scatter3d . It only works when I require the full plotly.js/dist ......
Read more >
Highcharts / Typescript: How to use scatter3d rotation?
So I have import * as Highcharts from 'highcharts' and my highcharts chart: any inside a .ts file, not a .js file. The...
Read more >
Scatterplot3d: 3D graphics - R software and data visualization
This tutorial describes how to generate a scatter pot in the 3D space using R software and the package scatterplot3d. scaterplot3d is very...
Read more >
series.scatter3d | highcharts API Reference
Options for all scatter3d series are defined in plotOptions.scatter3d. ... The draggable-points module allows points to be moved around or modified in the ......
Read more >
plotly package — 5.11.0 documentation - Plotly Help Center
Modules : tools: some helpful tools that do not require access to Plotly's servers. utils: functions that you probably won't need, but that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found