The following code correctly produces a plotly graph within a Jupyter notebook:
import holoviews as hv
import numpy as np
import pandas as pd
import xarray as xr
import panel as pn
hv.extension('plotly')
pn.extension('plotly')
df = pd.DataFrame({"date":[0,1,2],"price":[3,4,5]}).set_index("date")
z = xr.DataArray(df.price,dims=("date"),
coords={"date":df.index})
k = hv.Curve(z)
p2 = pn.Column(k)
p2.servable()
But when trying to serve the app with ‘panel serve’ in the console, the graph is rendered by the bokeh backend:
Is there a way to fix this?