Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

Add an example on how to integrate Matplotlib #558

Open FabienLelaquais opened 1 year ago

FabienLelaquais commented 1 year ago

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 a Partial).

Acceptance Criteria

abhayg-07 commented 10 months ago

@FabienLelaquais can u assign this issue to me

FabienLelaquais commented 10 months ago

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.

FredLL-Avaiga commented 9 months ago

With the latest content property on part, you can simply provide a Matplotlib figure as a value <|part|content={mp_figure}|>

FabienLelaquais commented 9 months ago

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.