Skip to content

Height is not being updated for charts #1045

@arraydude

Description

@arraydude

Summary

The chart is not being re-rendered when the height or width is changed using a variable

Steps to reproduce

height = st.slider('Chart height:', 0, 500, 400, 100)

data = np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4]
df = pd.DataFrame(data, columns=["lat", "lon"])

st.deck_gl_chart(
    viewport={
        'latitude': 37.76,
        'longitude': -122.4,
        'zoom': 11,
        'pitch': 50,
        'height': height,
    },
    layers=[{
        'type': 'HexagonLayer',
        'data': df,
        'radius': 200,
        'elevationScale': 4,
        'elevationRange': [0, 1000],
        'pickable': True,
        'extruded': True,
    }, {
        'type': 'ScatterplotLayer',
        'data': df,
    }])

Expected behavior:

The graph should be re-rendered

Actual behavior:

There's no difference when we change the value

Additional information

https://discuss.streamlit.io/t/how-to-make-hexagon-layer-height-value-based/1757

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions