Search 1.9 billion lines of Odoo code on GitHub

web_widget_plotly_chart

Author: LevelPrime srl, Odoo Community Association (OCA)
License: LGPL-3
Branch: 8.0
Repository: OpenPymeMx/web
Dependencies: web
Languages: HTML (388, 67.6%), JavaScript (34, 5.9%), PO File (22, 3.8%), Python (18, 3.1%), XML (11, 1.9%), and reStructuredText (101, 17.6%)
Other branches: python3
Other repositories: 001101/web-1, 965714601/web-1, AITIC/web, Abdulrahman3282/web, AlexandreDias23/web, AntoniRomera/web, AyoubZahid/web, BADEP/web, BS-creator/web, BT-nstuder/web, Bochelly/web, CB-Gran-Canaria/web, ChanFeei/web, Change2improve/web, ClancyQiao/web, ComitorDevTeam/web, Cy-Ghost/web, Daemo00/web, Dan-Stephen/web, Darknroses/web, Decikingship/web, Digital5-Odoo/web, DjamelEd/web, Dobtor-OCA/web, DudhatShivam/web, ELMARDI0107/web, ERPLibre/web, Ecnart/web, EdyKend/web, ElgatodeSchrodinger/web, ForgeFlow/web, GSLabIt/web, Gabinete-Digital/web, GlodoUK/oca-web, HirenDangar/web, HomerDeoDatu/web, Ingeos/web, Jarsa/web, JoanMarin/web, JohnmarkEnriquez/web, Jonathan-pr/web, KENLYLST/web, KKamaa/web, KonaERP/web, LevelPrime/web, Martronic-SA/web, MathBenTech/web, MaxyMoos/web, Meyjan/web, MicheleZak/web, MindAndGo/web, NL66278/web, Netsoro/web, NextERP-Romania/web, Nowheresly/web, OCA-MUK/web, OCA/web, PESOL/web, Paul98isep/web, Phaunswater/web, RLeeOSI/web, SanteLibre/web, Saul-Qiang2/web, SequarSrl/web, SerpentConsultingServices/web, SimoRubi/web, SirumTME/web, SolutionSeekers/web, StefanRijnhart/web, Studio73/web, Syci-Consulting/web, Tecnativa/web, VanMoof/web, Vauxoo/web, WilldooIT/web, aaltinisik/web, acsone/web, agrista/odoo-web, ahmedgenina/web, akloptim/web, akretion/web, alan80080/web, androettop/web, anhvu-sg/web, ansinaesmejor/web, antilhue/web, arkyalpyae/web, asphaltzipper/web, aurestic/web, bizzappdev/web, blooparksystems/web, bmya/web, boskowski/web, brain-tec/web, brian10048/web, bud-e/web, camptocamp/web, conandark/web, coopiteasy/web, dani-xtendoo/web, denvian/web, diggy128/web, dingguijin/web, dndoanh/web, druidoo-dev/web, dvalladares66/web, eLBati/web, ecosoft-odoo/web, edlwise/web, ehsu0407/web, eng-eslam-a-y/web, enmasys/web, essamcis/web, etobella/web, evansadji/web, exosoftware/oca-web, fallewi/web, farinoire/web, fjouatte/web, focusate/web-oca, foramaktiv/web, gab-net/web, gastonfeng/web, gfcapalbo/web, grindtildeath/web, gtorresemmanuel/web, hassanfadl/web, hbrunn/web, hiren-serpentcs/web, huntergps/web, i-vyshnevska/web, ibudgie/web, ideaspositivas-group/web, ilecyang/web, initOS/web, insscn/web, jacky82669513/web, jans23/web, janverb/web, jchanme/web, jeroen7s/web, jguerriat/web, jhonaelramos/web, josueBulle/web, kamasteve/web, karol1985/web, kejuswiss/web, khanvuthy88/web, kitworks-systems/web, kkasing11/web, kmee/web, kos94ok-3D/web, leanhtuan1996/web, legalsylvain/web, lideritjnma/web, lilotter45/web, lincersolucoes/oca-web, lincoln6delta/web, liunux4odoo/web, loftwah/web, lubw/web, luisrodriguez-e2e/web, lweiming/web, magnuscolors/web, mashanz/web, mhadi12/web, mharenz/web, mingkongz/web, mochammadrizanaufal/web, modoolar/oca-web, mohamedhagag/web, multidadosti-erp/web, myonnet/oca-web, netzweltmex/web, newtratip/web, nikhil150355/web, nilshamerlinck/web, niulinlnc/web, noorealam96/web, ob0420/web, onurugur/web, onyanga/web, orlandosorio/web, osamaegypt/web, paraita/web, petrus-v/web, phuctranerp/web, pnajman-modoolar/web-1, popsolutions/web, praxigento/oca-web, presenceverte/web, qgzhiguo/web, quentingigon/web, raizs/web, redcor/web, ristecona/web, robertsvx27/web, rquintanam/web, sahil-navadiya/web, samsagaz/web, sanjay-hercules/web, sanube/web, scottliu/web, sebalix/web, sergiocorato/web, sgheller/web, shiram/web, shurshilov/web-1, sinandurgut07/web, sodexis/web, solvosci/web, steingabelgaard/web, stevematos/web, stuti135/web, sunflowerit/web, syci/web, szellmark20/web, takinobori/oca-web, tarteo/web, tegin/web, thoongnv/web, tirix/web, tirma-sa/web, tpa-odoo/web, trevi-software/web, trionoharjadi/web, trobz/web, tvtma/web, ursais/web, vasiljevicmarko/web, versada/web, vertelab/web, vialaurea/OCA-web, wahello/oca-web, waveFuncjs/web, x0rzkov/odoo-web, xcgd/web, xiaoyi-yanqing/web, xtjie/web, y2gsmith/web, yanpierchirino/web, zarumaru/web, zcyuefan/web, and zeroheure/web

<h1 class="title">Web Widget Plotly</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_plotly_chart"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_plotly_chart"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module add the possibility to insert Plotly charts into Odoo standard views.</p> <img alt="Plotly Chart inserted into an Odoo view" src="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_plotly_chart/static/description/example.png" style="width: 600px;" /> <p><a class="reference external" href="https://plot.ly/">Plotly</a> is a Python interactive visualization library built on top of d3.js and stack.gl, plotly.js is a high-level, declarative charting library. plotly.js ships with over 40 chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts, and more.</p> <p>If you want to see some samples of plotly's capabilities follow this <a class="reference external" href="https://github.com/plotly/plotly.py#overview">link</a>.</p> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#installation" id="id1">Installation</a></li> <li><a class="reference internal" href="#usage" id="id2">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id4">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id5">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li> <li><a class="reference internal" href="#other-credits" id="id7">Other credits</a></li> <li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li> </ul> </li> </ul> </div> <a name="installation"></a> <h2><a class="toc-backref" href="#id1">Installation</a></h2> <p>You need to install the python plotly library:</p> <pre> <code>pip3 install plotly==4.1.0</code> </pre> <a name="usage"></a> <h2><a class="toc-backref" href="#id2">Usage</a></h2> <p>To insert a Plotly chart in a view proceed as follows:</p> <ol class="arabic"> <li><p class="first">Declare a text computed field like this:</p> <pre> <code>plotly_chart = fields.Text( string='Plotly Chart', compute='_compute_plotly_chart', )</code> </pre> </li> <li><p class="first">In its computed method do:</p> <pre> <code>def _compute_plotly_chart(self): for rec in self: data = [{'x': [1, 2, 3], 'y': [2, 3, 4]}] rec.plotly_chart = plotly.offline.plot(data, include_plotlyjs=False, output_type='div')</code> </pre> </li> <li><p class="first">In the view, add something like this wherever you want to display your plotly chart:</p> <pre> <code>&lt;div&gt; &lt;field name=&quot;plotly_chart&quot; widget=&quot;plotly_chart&quot; nolabel=&quot;1&quot;/&gt; &lt;/div&gt;</code> </pre> </li> </ol> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id3">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_plotly_chart%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id4">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id5">Authors</a></h3> <ul class="simple"> <li>LevelPrime srl</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id6">Contributors</a></h3> <ul class="simple"> <li>Roberto Fichera &lt;<a class="reference external" href="mailto:roberto.fichera&#64;levelprime.com">roberto.fichera&#64;levelprime.com</a>&gt;</li> <li>Michele Zaccheddu &lt;<a class="reference external" href="mailto:michele.zaccheddu&#64;levelprime.com">michele.zaccheddu&#64;levelprime.com</a>&gt;</li> </ul> <a name="other-credits"></a> <h3><a class="toc-backref" href="#id7">Other credits</a></h3> <ul class="simple"> <li>This module uses the library <a class="reference external" href="https://github.com/plotly/plotly.js">Plotly.js</a> which is under the open-source MIT License. Copyright (c) 2019 Plotly, Inc</li> <li>Odoo Community Association (OCA)</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id8">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_plotly_chart">OCA/web</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>