$ 29.00
Web Widget mpld3 Chart
This module adds the possibility to insert mpld3 charts into Tulio standard views. This is an interactive D3js-based viewer which brings matplotlib graphics to the browser.
If you want to see some samples of mpld3’s capabilities follow this link.
Table of contents
Usage
To insert a mpld3 chart in a view proceed as follows:
Import the required libraries:
import matplotlib.pyplot as plt, mpld3
Declare a text computed field like this:
mpld3_chart = fields.Text( string='Mpld3 Chart', compute='_compute_mpld3_chart', )In its computed method do:
def _compute_mpld3_chart(self): for rec in self: # Design your mpld3 figure: plt.scatter([1, 10], [5, 9]) figure = plt.figure() rec.mpld3_chart = mpld3.fig_to_html(figure)In the view, add something like this wherever you want to display your mpld3 chart:
<div> <field name="mpld3_chart" widget="mpld3_chart" nolabel="1"/> </div>
| Technical name | web_widget_mpld3_chart |
|---|---|
| Module version | 12.0.1.0.0 |
| Tulio versions | 1.0 |
| Category | Tools |
| Publisher | Contaura LLC
Ported to Tulio, tested and supported by Contaura LLC. |
| Original authors | ForgeFlow, OCA |
| License | LGPL-3
Open source: you may use, change and share
this module under its license. The price covers the Tulio port, its testing on Tulio
1.0 and the download. |
| Python libraries | mpld3
Install them on the server with pip before installing the module. |
| Requires (Tulio core) | web |
| Lines of code | 47 |
| Downloads | 0 |
| Released | 12/06/2026 |