-
Notifications
You must be signed in to change notification settings - Fork 3
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
Embed options are lost #7
Comments
Thanks - sphinx does not use the renderers framework, unfortunately, so renderer settings will not apply. You'll need to find another way to specify those settings. Renderers are what are used to render charts in Jupyter/IPython environments. |
I think this is more of a documentation issue than a bug, to be honest. |
Through some digging in the code I see that it is possible to call Regarding sphinx, perhaps the renderers framework is not the most appropriate location for the embed options in sphinx, but those settings are still relevant in the sphinx context I think. Perhaps the sphinx extension could pick up the locale settings from sphinx and apply those to the plots, or allow specification of the embed options in |
I saw this message in the CI of Altair in the build run that might be related to this issue: /home/runner/.local/share/hatch/env/virtual/altair/801ceKDt/doc/lib/python3.10/site-packages/sphinxext_altair/altairplot.py:261: UserWarning: altair-plot: /home/runner/work/altair/altair/doc/user_guide/customization.rst:826 Code Execution failed:NameError: name 'format_locale' is not defined |
@mattijn that warning ended up being unrelated to this Obviously you'd know this now, just adding here to rule things out |
I include several altair plots in a Sphinx project, and I wish to set the locale to Dutch. In Jupyter I can use the following to set the locale:
However, when exporting to json/html or using sphinxext these settings are lost from the embed options:
The variable
embedOpt
is missing the configured locale settings.I can workaround this in the sphinx extension by rewriting the jinja2 template for the plot, at least hard coding the required options, but I would expect these settings to be included automatically.
Please follow these steps to make it more efficient to solve your issue:
vega_datasets
.The text was updated successfully, but these errors were encountered: