-
Notifications
You must be signed in to change notification settings - Fork 49
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
xarray DataArray and Dataset HTML representation #164
Comments
I am interested in this as well. |
It should be a matter of adding some CSS styles. We do that for pandas so they look good. |
Based on damianavila/RISE#594, I added this to my CSS to at least remove the repetition of the dataset contents in pretty and simple HTML: .md-typeset pre.xr-text-repr-fallback {
display: none;
} Ideally the dropdowns would all be closed by default but it seems that it only closes them when there are >=10 items in the dropdown. |
I've gone into the CSS and made more tweaks that now lead to what I think is the correct formatting for the xarray dataset HTML representation: .md-typeset pre.xr-text-repr-fallback {
display: none;
}
.md-typeset ul.xr-sections, .jupyter-wrapper .jp-OutputArea-output dl.xr-attrs {
display: grid;
}
.md-typeset li.xr-var-item, .md-typeset ul.xr-var-list {
display: contents;
}
.md-typeset .xr-section-details {
display: none;
}
.md-typeset ul.xr-dim-list li {
margin-bottom: 0;
margin-left: 0;
}
.md-typeset ul.xr-dim-list {
margin-bottom: 0;
margin-top: 0;
}
.jupyter-wrapper .jp-OutputArea-output .xr-attrs dt {
padding: 0;
margin: 0;
float: left;
padding-right: 10px;
width: auto;
font-weight: normal;
grid-column: 1;
} |
Hi mkdocs-jupyter, Thanks for providing this support. It's been great to work with.
One thing I've run into is the Xarray DataArray and Dataset HTML representations are not rendered the same as they are in a Jupyter Notebook.
In Jupyter
Rendered in MkDocs (light and dark theme in mkdocs material)
Some of the elements are there, but it doesn't look quite right.
I was expecting it to render similar to how mkdocs-jupyter nicely handles a Pandas DataFrame
Thanks for your consideration on this issue.
The text was updated successfully, but these errors were encountered: