Open xvvhang opened 3 years 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())
在 iframe 中渲染时,notebook.html 中 overflow 属性会影响外部样式,导致外部 window 不能滚动