deephaven / deephaven-plugins

Deephaven Plugins
11 stars 15 forks source link

Deephaven express: Not using WebGL for line plots #991

Open mofojed opened 2 weeks ago

mofojed commented 2 weeks ago

Description

If you create a line plot in plotly express, it seems to just use the canvas instead of the WebGL optimized canvas. We should be using WebGL to render when it is enabled. With legacy plots it does use WebGL.

Steps to reproduce

  1. Run the following:
    
    from deephaven.plot import express as dx
    from deephaven.plot.figure import Figure

_stocks = dx.data.stocks()

p = dx.line(_stocks, "Timestamp", "Random") p_legacy = Figure().plot_xy(series_name="Plot", t=_stocks, x="Timestamp", y="Random").show()


2. Check the plot `p_legacy` Chart component props data type
3. From the React DevTools, check the plot `p` Chart component props data type

**Expected results**
2. Plot type should be `scattergl`
3. Plot type should be `scattergl`

**Actual results**
2. Plot type is `scattergl` for the legacy plot
3. Plot type is just `scatter` for the express plot

**Additional details and attachments**
![image](https://github.com/user-attachments/assets/b277e094-5481-494c-a405-c3f7965772fa)

**Versions**

Engine Version: 0.36.1
Web UI Version: 0.90.0
Java Version: 11.0.24
Barrage Version: 0.6.0
Browser Name: Chrome 129
OS Name: Linux
@deephaven/js-plugin-plotly-express: 0.11.2
@deephaven/js-plugin-ui: 0.22.0
mofojed commented 2 weeks ago

Seems p_scatter = dx.scatter(_stocks, "Timestamp", "Random") does render with scattergl, perhaps we only disabled this on line plots when downsampling is enabled?