Skip to content

Double-clicking a dense Reflex scatter chart can blank the plot #79

Description

@amsraman
Screen.Recording.2026-07-17.at.1.10.14.PM.mov

Summary

Double-clicking the rendered scatter chart from its initial viewport causes the plot area to go dark/blank instead of preserving or resetting the chart view.

This was observed in a Reflex app using reflex-xy with a dense, state-backed scatter chart.

Reproduction

  1. Render the chart below and wait for the initial global scatter view to appear.
  2. Without first panning or zooming, double-click the chart from the initial entry/default view.
  3. Observe that the rendered plot goes dark.

Minimal usage from the application

@reflex_xy.figure
def atlas(self) -> xy.Chart:
    d = _events()
    mask = d["mag"] >= self.min_mag
    return xy.scatter_chart(
        xy.scatter(
            d["lon"][mask],
            d["lat"][mask],
            color=d["depth"][mask],
            size=np.clip((d["mag"][mask] + 2.2) * 1.35, 2, 11),
            color_domain=(0, 250),
            colormap="plasma",
            opacity=.78,
            density=True,
        ),
        xy.x_axis(label="LONGITUDE", domain=(-180, 180), tick_count=7),
        xy.y_axis(label="LATITUDE", domain=(-90, 90), tick_count=5),
        width="100%",
        height=430,
    )

reflex_xy.chart(
    State.atlas,
    on_point_hover=State.on_hover,
    on_select_end=State.on_select,
    height="430px",
    id="atlas",
)

The dataset contains approximately 10,641 points. Longitude and latitude have explicit fixed domains, while color and point size are array-valued.

Observed behavior

After the double-click, the plot rendering becomes dark/blank and the data points are no longer visible.

Expected behavior

A double-click should either:

  • leave the initial view unchanged; or
  • perform a documented zoom/reset interaction while continuing to render the data.

It should not blank the plot.

Video

Video to be added by the reporter.

Environment

  • reflex-xy 0.1.0
  • Reflex 0.9.7
  • macOS
  • Dense scatter with density=True
  • State-backed chart via @reflex_xy.figure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions