Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook.html overflow 样式问题 #29

Open
xvvhang opened this issue Jul 5, 2021 · 1 comment
Open

notebook.html overflow 样式问题 #29

xvvhang opened this issue Jul 5, 2021 · 1 comment

Comments

@xvvhang
Copy link

xvvhang commented Jul 5, 2021

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

@Shira-Naim
Copy link

Shira-Naim commented Feb 15, 2023

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

from pyg2plot import Plot
from pywebio.output import

body_css = """

<style> body { overflow-y: unset !important; } </style>

"""

''' 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())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants