Web Widget mpld3 Chart

Web Widget mpld3 Chart

by Contaura LLC · original work by ForgeFlow, OCA
web_widget_mpld3_chart
$ 29.00

This widget allows to display charts using MPLD3 library.

1.0

One purchase covers every version. Already bought it? Sign in.

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

Installation

You need to install the python mpld3 library:

pip install mpld3

Usage

To insert a mpld3 chart in a view proceed as follows:

  1. Import the required libraries:

    import matplotlib.pyplot as plt, mpld3
    
  2. Declare a text computed field like this:

    mpld3_chart = fields.Text(
        string='Mpld3 Chart',
        compute='_compute_mpld3_chart',
    )
    
  3. 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)
    
  4. 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 nameweb_widget_mpld3_chart
Module version12.0.1.0.0
Tulio versions1.0
CategoryTools
PublisherContaura LLC
Ported to Tulio, tested and supported by Contaura LLC.
Original authorsForgeFlow, OCA
LicenseLGPL-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 librariesmpld3
Install them on the server with pip before installing the module.
Requires (Tulio core)web
Lines of code47
Downloads0
Released12/06/2026
12.0.1.0.0 Tulio 1.0 · 12/06/2026