-
Notifications
You must be signed in to change notification settings - Fork 31
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
Figure().figure_title()
does not render a title in the IDE or in Jupyter
#1674
Labels
Comments
alexpeters1208
added
bug
Something isn't working
web-client-ui
triage
Issue requires triage
labels
Nov 29, 2023
Fix for this is simple enough - for some reason Web UI was pulling from the first chart title set, rather than the figure title that was set. |
mofojed
added a commit
that referenced
this issue
Dec 19, 2023
…1676) - Previously for some reason we were mapping the first subplot chart title to the figure title, which was incorrect. Instead map the Figure title attribute to the figure, and then chart title to the individual subplots - Annoyingly plotly doesn't have a chart title property, so we need to map these titles to `annotations` to get it to work correctly - Fixes #1674 , Fixes #1675 - Tested with the following snippet: ``` from deephaven.plot.figure import Figure from deephaven import read_csv insurance = read_csv("https://media.githubusercontent.com/media/deephaven/examples/main/Insurance/csv/insurance.csv") insurance_by_region = insurance.view(formulas=["region", "expenses"]).avg_by(["region"]) insurance_by_sex = insurance.view(formulas=["sex", "expenses"]).avg_by(["sex"]) insurance_by_children = insurance.view(formulas=["children", "expenses"]).avg_by(["children"]).sort(order_by=["children"]) insurance_by_smoker = insurance.view(["smoker", "expenses"]).avg_by(["smoker"]) insurance_cat_plots = Figure(rows=2, cols=2).\ new_chart(row=0, col=0).\ plot_cat(series_name="Region", t=insurance_by_region, category="region", y="expenses").\ chart_title(title="Average charge ($) by region").\ new_chart(row=0, col=1).\ plot_cat(series_name="Sex", t=insurance_by_sex, category="sex", y="expenses").\ chart_title(title="Average charge ($) by sex").\ new_chart(row=1, col=0).\ plot_cat(series_name="Children", t=insurance_by_children, category="children", y="expenses").\ chart_title(title="Average charge ($) per number of children").\ new_chart(row=1, col=1).\ plot_cat(series_name="Smoker", t=insurance_by_smoker, category="smoker", y="expenses").\ chart_title(title="Average charge ($) smokers vs nonsmokers").\ chart_legend(visible=False).\ figure_title("Figure Title").\ show() ``` ![image](https://github.com/deephaven/web-client-ui/assets/4505624/f9a6f7fc-3110-492a-8d57-1d49616ce387)
mofojed
added a commit
to deephaven/deephaven-core
that referenced
this issue
Dec 22, 2023
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.58.0 ### Bug Fixes * `figure_title` and `chart_title` were not mapped up correctly ([#1676](deephaven/web-client-ui#1676)) ([73e0b65](deephaven/web-client-ui@73e0b65)), closes [#1674](deephaven/web-client-ui#1674) [#1675](deephaven/web-client-ui#1675) ### Features * "Group" column for rollup/tree tables ([#1636](deephaven/web-client-ui#1636)) ([ba1d51b](deephaven/web-client-ui@ba1d51b)), closes [#1555](deephaven/web-client-ui#1555) * Add alt+click shortcut to copy cell and column headers ([#1694](deephaven/web-client-ui#1694)) ([4a8a81a](deephaven/web-client-ui@4a8a81a)), closes [deephaven/web-client-ui#1585](deephaven/web-client-ui#1585) * Theming - Spectrum variable mapping and light theme ([#1680](deephaven/web-client-ui#1680)) ([2278697](deephaven/web-client-ui@2278697)), closes [#1669](deephaven/web-client-ui#1669) [#1539](deephaven/web-client-ui#1539) --------- Co-authored-by: deephaven-internal <deephaven-internal@users.noreply.github.com> Co-authored-by: mikebender <mikebender@deephaven.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When creating a plot in the IDE or Jupyter with the
Figure()
function, using the.figure_title()
method does not render a title.Steps to reproduce
Go to the IDE and run this code:
Expected results
I expect the rendered plot to have a title.
Actual results
The rendered plot does not have a title.
Versions
The text was updated successfully, but these errors were encountered: