[BUG] Client side error in plotly when trying to draw a heatmap with height set and just a few values.

Aperta
#3,363 1 commento 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@T4rk1n ci sta già lavorando.

Dal 3/7/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug P1 regression

I'm using dash 3.1.1 installed from python3.13.5 virtual env from ubuntu24.0.4.2LTS.

When I run this minimal example:

import dash
from dash import dcc, html
import plotly.express as px
import pandas as pd

df = pd.DataFrame({"x": ["Out Of Bounds Read or Write"] * 15, "y": [9.8] * 15})
fig = px.density_heatmap(df, x="x", y="y")

app = dash.Dash(__name__)
app.layout = html.Div(
    [
        dcc.Graph(
            figure=fig,
            style={"height": 100},
        )
    ]
)

if __name__ == "__main__":
    app.run(debug=True)

The web page stays blank instead of displaying the chart, and I can see the following error message on dev tools from my browser:

Uncaught (in promise) Error: Something went wrong with axis scaling
    setScale plotly.min.js:20
    lmt plotly.min.js:21
    omt plotly.min.js:21
    each plotly.min.js:15
    bt plotly.min.js:15
    each plotly.min.js:15
    omt plotly.min.js:21
    drawMarginPushers plotly.min.js:21
    b plotly.min.js:21
    syncOrAsync plotly.min.js:20
    nht plotly.min.js:21
    lht plotly.min.js:21
    _ht plotly.min.js:21
    plot React
plotly.min.js:20:174757

On the top of this plotly.min.js I have:

/**
* plotly.js v3.0.1
* Copyright 2012-2025, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/

When I comment the line style={"height": 100}, everything is working well.

Lingua principale
Python
Stelle
24.5k
Fork
2.3k
Merge medio
3g 7h
PR unite (30g)
30

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di plotly/dash

Tutte le issue di plotly/dash

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.