Skip to content
New issue

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

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

Already on GitHub? # to your account

clustergrammer not working inside an Electron app #59

Open
wasimaftab opened this issue Apr 10, 2021 · 1 comment
Open

clustergrammer not working inside an Electron app #59

wasimaftab opened this issue Apr 10, 2021 · 1 comment

Comments

@wasimaftab
Copy link

wasimaftab commented Apr 10, 2021

I am trying to use clustergrammer inside an electron app but I am getting Uncaught TypeError: Cannot read property 'getComputedStyle' of null (See screenshot below)

clustergrammer_error2

I've followed the instructions from the official page which describes how to use clustergrammer in a web page.

My package.json looks like below,

pkg_json2

To reproduce this issue I've created a minimal repo in GitHub. First, execute yarn install inside the repo folder to install the node modules and then execute yarn start to launch the app.

My OS is Ubuntu 20.04 and using node version 14.16.1

Is it a bug or I am missing something? I will appreciate your suggestions

@cornhundred
Copy link
Contributor

Hi @wasimaftab, thanks for raising the issue. I ran your test_clustergrammer_app and I see the same error. The error occurs in D3 at this line

   		var container_width = d3.select(params.root).style('width').replace('px', '');
   		var container_height = d3.select(params.root).style('height').replace('px', '');

So, I am guessing that the params.root value may not have been set correctly. We also have a WebGL version of Clustergrammer here Clustergrammer-GL - see example ObservableHQ notebooks

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

No branches or pull requests

2 participants