You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Altair chart with GeoShape marks from a GeoDataFrame.
It renders correctly on it's own in a Jupyter notebook.
However, it fails to render when inside a Panel pane.
Simple to reproduce in a notebook:
import csv
from io import StringIO
import panel as pn
import altair as alt
from geopandas import GeoDataFrame
from shapely.geometry import box
pn.extension('vega')
pn.pane.Vega(bays) no output JS Console:
TypeError: undefined has no properties in [main.min.js:396:2301]
pn.Row(bays) also no output JS Console:
TypeError: undefined has no properties in [main.min.js:396:2301]
Important
GeoShape marks render correctly when the data is not from a GeoDataFrame, for instance this example renders correctly when wrapped in a pd.Row and does not produce JS Console errors.
hi,
I have an Altair chart with GeoShape marks from a GeoDataFrame.
It renders correctly on it's own in a Jupyter notebook.
However, it fails to render when inside a Panel pane.
Simple to reproduce in a notebook:
some dummy data
csv_data = 'i,bid,minx,maxx,miny,maxy\n0,SR01-01,20.0,120.0,855.0,925.0\n1,SR02-02,20.0,120.0,940.0,1010.0\n2,SR03-03,140.0,240.0,940.0,1010.0\n3,SR04-04,260.0,360.0,940.0,1010.0\n4,SR05-05,380.0,480.0,940.0,1010.0\n5,SR06-06,500.0,600.0,940.0,1010.0\n6,SR07-07,620.0,720.0,940.0,1010.0\n7,SR08-08,740.0,840.0,940.0,1010.0\n8,SR09-09,860.0,960.0,940.0,1010.0\n9,SR10-10,860.0,960.0,855.0,925.0\n10,BY01-11,625.0,725.0,730.0,800.0\n11,BY01-12,745.0,845.0,730.0,800.0\n12,BY01-14,865.0,965.0,730.0,800.0\n13,BY01-16,625.0,725.0,645.0,715.0\n14,BY01-15,745.0,845.0,645.0,715.0\n15,BY02-17,745.0,845.0,520.0,590.0\n16,BY02-18,865.0,965.0,520.0,590.0\n17,BY02-21,625.0,725.0,435.0,505.0\n18,BY02-20,745.0,845.0,435.0,505.0\n19,BY02-19,865.0,965.0,435.0,505.0\n20,BY03-22,745.0,845.0,310.0,380.0\n21,BY03-23,865.0,965.0,310.0,380.0\n22,BY03-26,625.0,725.0,225.0,295.0\n23,BY03-25,745.0,845.0,225.0,295.0\n24,BY03-24,865.0,965.0,225.0,295.0\n25,BY04-27,625.0,725.0,100.0,170.0\n26,BY04-28,745.0,845.0,100.0,170.0\n27,BY04-29,865.0,965.0,100.0,170.0\n28,BY04-31,625.0,725.0,15.0,85.0\n29,BY04-30,745.0,845.0,15.0,85.0\n30,BY05-36,20.0,120.0,180.0,250.0\n31,BY05-35,20.0,120.0,95.0,165.0\n32,BY05-34,20.0,120.0,10.0,80.0\n33,BY05-33,140.0,240.0,10.0,80.0\n34,SR32-32,375.0,475.0,10.0,80.0\n'
into a GeoDataFrame
chart
renders

pn.pane.Vega(bays)
no output
JS Console:
TypeError: undefined has no properties in [main.min.js:396:2301]
pn.Row(bays)
also no output
JS Console:
TypeError: undefined has no properties in [main.min.js:396:2301]
Important
GeoShape marks render correctly when the data is not from a GeoDataFrame, for instance this example renders correctly when wrapped in a pd.Row and does not produce JS Console errors.
Environment
Firefox Developer 76
Python 3.8
Libs
altair==4.1.0
bokeh==2.0.2
geopandas==0.7.0
jupyter-client==6.1.3
notebook==6.0.3
panel==0.9.5
No error messages from Jupyter.
The text was updated successfully, but these errors were encountered: