deephaven / web-client-ui

Deephaven Web Client UI
Apache License 2.0
29 stars 31 forks source link

Plot shows infinite spinner if some series can downsample but others can't #1967

Open mattrunyon opened 4 months ago

mattrunyon commented 4 months ago

Description

If you have a plot w/ multiple series, an infinite loader is shown if some of the series can downsample while others can't.

Steps to reproduce

Run this Python

from deephaven import empty_table
t = empty_table(100000).update(["X=Instant.ofEpochMilli(ii)", "Y=ii", "Z=Y*2"])
plot_xy_scatter = (
    Figure()
    .plot_xy(series_name="Y", t=t, x="X", y="Y")
    .axes(plot_style=PlotStyle.SCATTER)
    .x_twin()
    .plot_xy(series_name="Z", t=t, x="X", y="Z")
    .show()
)

Expected results

Downsample error overlay

Actual results

Line series draws. Scatter does not. Plot loader shown infinitely and a browser error logged about needing to disable downsampling.

Versions

Engine Version: 0.34.0-SNAPSHOT Web UI Version: 0.74.0 Java Version: 11.0.19 Barrage Version: 0.6.0 Browser Name: Chrome 123 OS Name: Linux

mofojed commented 4 months ago

This is an issue as far back as Jackson: 1.20221001.343 Tested with the Groovy snippet:

t = emptyTable(100000).update("X=currentTime() + ii", "Y=ii", "Z=Y*2")
plotXyScatter = plot("Y", t, "X", "Y").plotStyle("scatter").twinX().plot("Z", t, "X", "Z").show()

Note it works if the scatter plot does not need downsampling, e.g.:

t = emptyTable(10000).update("X=currentTime() + ii", "Y=ii", "Z=Y*2")
t2 = emptyTable(100000).update("X=currentTime() + ii", "Y=ii", "Z=Y*2")
plotXyScatter = plot("Y", t, "X", "Y").plotStyle("scatter").twinX().plot("Z", t2, "X", "Z").show()

We should show the downsample error for that one series. If the user decides to dismiss the downsampling error, you should be able to see the other plots that were successful: https://github.com/deephaven/web-client-ui/pull/1850#discussion_r1516266855