holoviz / hvplot

A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews
https://hvplot.holoviz.org
BSD 3-Clause "New" or "Revised" License
1.13k stars 108 forks source link

Interactive DataFrame not displaying properly in Jupyter Lab #992

Open Nick-Hemenway opened 1 year ago

Nick-Hemenway commented 1 year ago

ALL software version info

hvplot: 0.8.2 python: 3.9.1 jupyterlab: 3.4.8

Description of expected behavior and the observed behavior

I create a pandas dataframe from a .csv file and then turn it into an interactive object. When I simply output the interactive dataframe, it renders incorrect (all of the columns are overlapping). Note that I covered up some of the data as it contains sensitive information.

Complete, minimal, self-contained example code that reproduces the issue

import pandas
import hvplot.pandas

df = pd.read_csv('test_data.csv')
idf = df.interactive()
idf

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

image

Nick-Hemenway commented 1 year ago

I just realized that a lot of the examples shown in the docs contain an optional width argument that can be included to set the display width of the interactive dataframe. This fixed my issue.

Example:

idf = df.interactive(width=600)

I couldn't find a description of the acceptable parameters for the interactive accessor anywhere in the documentation though. If there is one, maybe someone could include that here in the comments before this issue get's closed.

philippjfr commented 1 year ago

Agreed, we should document this. Also worth noting that this issue arises from limitations in the Bokeh layout engine. With Panel 1.0 we will update to Bokeh 3.0 which will no longer exhibit this issue.

itsgifnotjiff commented 1 year ago

@philippjfr will Holoviews/Geoviews and HvPlot be updated at Panel 1.0 release or gradually afterwards?

philippjfr commented 1 year ago

They should all be updated now, if you're encountering issues please report them.