Skip to content

Heat-map Error for Specific Data/Layout #6033

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

Closed
cagantomer opened this issue Nov 21, 2021 · 2 comments
Closed

Heat-map Error for Specific Data/Layout #6033

cagantomer opened this issue Nov 21, 2021 · 2 comments

Comments

@cagantomer
Copy link

I encounter an issue with heatmap visualization - with specific data / layout, the heat map is not drawn and the following error is raised:

plotly-latest.js:26976 Error: attribute width: Expected length, "NaN".
attrConstant @ plotly-latest.js:26976

Immediately followed by:

plotly-latest.js:26976 Error: attribute x: Expected length, "NaN".
attrConstant @ plotly-latest.js:26976

Here is a minimal codepen example that reproduces the error.

I am suspecting it has to do with interpreting the X values as numeric. If I change the first item from a number-like (i.e. "1310") to a string (i.e. "1310_") the heat map is rendered properly.

@archmoj
Copy link
Contributor

archmoj commented Nov 24, 2021

Please see this codepen which illustrated the notes bellow:

  1. You could use autotypenumbers: 'strict' in the layout or axis level (cc: Implement strict autotypenumbers #5240) to disable axis auto type which was implemented in v1.58.0.
  2. The plotly-latest.js stayed at the last v1 release. You need to load specific v2 version to load the "latest" release.
  3. Plotly.plot is no longer part of the v2 API. So Plotly.newPlot is used in the codepen.
    Hope this could help closing the issue.

@gvwilson
Copy link
Contributor

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

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