Closed jj-github-jj closed 1 week ago
I also changed views.py as follows
def _view_main(data_id, iframe=False):
"""
Helper function rendering main HTML which will also build title and store whether we are viewing from an <iframe>
:param data_id: integer string identifier for a D-Tale process's data
:type data_id: str
:param iframe: boolean flag indicating whether this is being viewed from an <iframe> (usually means ipython)
:type iframe: bool, optional
:return: HTML
"""
title = "D-Tale"
main_title = global_state.get_app_settings().get("main_title") # TODO
print (f'main title: {main_title}')
title = main_title or "D-Tale2" # TODO
name = global_state.get_name(data_id)
if name:
title = "{} ({})".format(title, name)
return base_render_template("dtale/main.html", data_id, title=title, iframe=iframe)
@jj-github-jj you can now set these properties by doing the following:
d = dtale.show(df, main_title="test title", main_title_font="Arial")
If you don't set the main_title_font
it will just take the default font you see now for the title.
I have added this functionality to the v3.13.0 release on pypi (will be on conda-forge shortly). Let me know if you have any issues. Also, whenever you get a sec would you mind tossing your ⭐ on the dtale repo? Thanks 🙏