Closed Miautawn closed 2 months ago
@Miautawn sorry for the long wait. So I'm thinking i'll add a return_object
parameter to the offline_chart
function. It will be False
by default and if you pass return_object=True
to this function it will do what you're asking. Will keep you posted when it gets released
Hey there! Thank you, this is exactly what I was thinking about :)
@Miautawn this has been added in v3.12.0 on pypi (soon to be on conda-forge as well). Let me know how it goes. Also, whenever you get a sec would you mind tossing your ⭐ on the repo? Thanks 🙏
Hey there! I have a QOL improvement idea for jupyter notebook users - ability to easily export charts as plotly figure objects via
offline_chart
function.Currently, I use the
offline_chart
API, since in my opinion, it's the best option to create plots using Dtale within notebooks while still keeping them reproducible and easily readable, which is extremely important for me (might be a personal thing).However, sometimes you need to do something advanced, like combining the plots, and it's pretty hard to do when the
offline_chart
simply returns a rendered HTML, instead of the plotly figure object.My idea addresses just that - an option to get the resulting plotly figure object when creating plots using the convenient & powerful
offline_chart
API. As a matter of fact, you can do it right now, by simply calling the functions thatoffline_chart
uses under the hood - dtale.dash_application.charts.build_raw_chart.Below is a working example of the proposed use case:
Result:![image](https://github.com/man-group/dtale/assets/24988290/ea6c8c48-65b4-4ebd-975a-3024247a731c)