Highcharts's Graph Widget

v 10.0 Third Party 9 67
Download for v 10.0 Deploy on Odoo.sh
Technical Name highcharts_widget
Also available in version v 14.0 v 13.0
You bought this module and need support? Click here!
Technical Name highcharts_widget
Also available in version v 14.0 v 13.0

Highcharts Graph Widget

To include highcharts's graph into forms's views...

How to use

In your model you need create a function that return a valid Highchart's graph data, for example:

# -*- coding: utf-8 -*-
from odoo import api, models
class TestGraph(models.Model):
    _name = 'highcharts_widget.test_graph'
    _description = 'Testing graph feature...'
    def compute_graph_data(self):
        return {
            'chart': {
                'plotBackgroundColor': 'white',
                'plotBorderWidth': '0',
            'title': {
                'text': 'Browser market shares at a specific website, 2014'
            'tooltip': {
                'pointFormat': '{series.name}: {point.percentage:.1f}%'
            'plotOptions': {
                'pie': {
                    'allowPointSelect': 'true',
                    'cursor': 'pointer',
                    'dataLabels': {
                        'enabled': 'false'
                    'showInLegend': 'true'
            'series': [{
                'type': 'pie',
                'name': 'Browser share',
                'data': [
                    ['Firefox',   45.0],
                    ['IE',       26.8],
                        'name': 'Chrome',
                        'y': 12.8,
                        'sliced': 'true',
                        'selected': 'true'
                    ['Safari',    8.5],
                    ['Opera',     6.2],
                    ['Others',   0.7]

In the xml definition you should write something like that:

<?xml version="1.0" encoding="UTF-8"?>
        <record id="highcharts_widget_test_form_view" model="ir.ui.view">
            <field name="name">highcharts_widget_test_form_view</field>
            <field name="model">highcharts_widget.test_graph</field>
            <field name="arch" type="xml">
                        <widget id="test_model_graph"
        <record id="highcharts_widget_test_action" model="ir.actions.act_window">
            <field name="name">Graph Test</field>
            <field name="res_model">highcharts_widget.test_graph</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
        <menuitem name="Graph Test"
Alejandro Cora Gonzalez

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.