hustcc / PyG2Plot

🎨 Python3 binding for `@AntV/G2Plot` Plotting Library .
MIT License
1.07k stars 115 forks source link

notebook.html overflow 样式问题 #29

Open xvvhang opened 3 years ago

xvvhang commented 3 years ago

在 iframe 中渲染时,notebook.html 中 overflow 属性会影响外部样式,导致外部 window 不能滚动

Shira-Naim commented 1 year ago

If using PyG2Plot with PyWebIO together This is the solution that worked for me:

from pyg2plot import Plot from pywebio.output import

body_css = """

"""

''' Column chart ''' column = Plot('Column') column.set_options({ "appendPadding": 32, "data": data, "xField": "city", "yField": "value", "seriesField": "type", "isGroup": True, "columnStyle": { "radius": [20, 20, 0, 0], }, "legend": { "position": "top" } })

''' Inject css before chart ''' pywebio.output.put_html(body_css) put_html(column.render_notebook())