taipy
taipy copied to clipboard
Add an example on how to integrate Matplotlib
What would that feature address
Many Python programmers are using Matplotlib as a way to create charts.
These are static, and we want to let users in charge of defining their charts entirely.
Description of the ideal solution
The best way to do this seems to be using mpld3
and the plugins
module.
An example would show how to create a Matplotlib chart, and how to integrate it in a Taipy page (certainly using the figure
property of the chart control).
Acceptance Criteria
- [ ] The example is part of the documentation set.
@FabienLelaquais can u assign this issue to me
Sure thing, thanks a lot!
Note that my approach would be to use the part
control, where the page property would be set to the returned value of taipy.gui.get_user_content_url()
... Not really straightforward hu? Any idea on simplifying that is welcome!
Thanks again.
With the latest content property on part, you can simply provide a Matplotlib figure as a value
<|part|content={mp_figure}|>
Indeed as @FredLL-Avaiga mentioned, Taipy GUI (only in the develop branch at this point) was complemented with a new property for the part
control that makes it possible to insert any HTML content coming from a third-party library.
This needs a bit of documentation, which is on the way (see doc issue).
We plan to close this issue at the end of next week.