Author: |
Vauxoo, Odoo Community Association (OCA) |
License: |
LGPL-3 |
Branch: |
15.0 |
Repository: |
AITIC/web |
Dependencies: |
web |
Languages: |
HTML (415, 65.3%),
JavaScript (26, 4.1%),
Python (28, 4.4%),
XML (6, 0.9%),
and
reStructuredText (161, 25.3%) |
Other repositories: |
AntoniRomera/web,
AyoubZahid/web,
Change2improve/web,
Darknroses/web,
Digital5-Odoo/web,
Dobtor-OCA/web,
ERPLibre/web,
ForgeFlow/web,
GSLabIt/web,
Gabinete-Digital/web,
GlodoUK/oca-web,
Ingeos/web,
Jarsa/web,
KKamaa/web,
LevelPrime/web,
Martronic-SA/web,
MihranThalhath/web,
OCA/web,
SeuMarco/web,
SimoRubi/web,
Studio73/web,
Tecnativa/web,
VanMoof/web,
Vauxoo/web,
WilldooIT/web,
aaltinisik/web,
acsone/web,
anhvu-sg/web,
aurestic/web,
bizzappdev/web,
blooparksystems/web,
brain-tec/web,
camptocamp/web,
coopiteasy/web,
diggy128/web,
dingguijin/web,
dynapps/web,
eLBati/web,
ecosoft-odoo/web,
factorlibre/web,
focusate/web-oca,
gfcapalbo/web,
hbrunn/web,
i-vyshnevska/web,
initOS/web,
jeroen7s/web,
kmee/web,
kos94ok-3D/web,
leanhtuan1996/web,
legalsylvain/web,
mharenz/web,
modoolar/oca-web,
mohamedhagag/web,
multidadosti-erp/web,
onurugur/web,
pegonzalezspesol/web,
petrus-v/web,
sergiocorato/web,
sewisoft/web,
solvosci/web,
steingabelgaard/web,
sunflowerit/web,
takinobori/oca-web,
tarteo/web,
tegin/web,
tirix/web,
tirma-sa/web,
trevi-software/web,
trobz/web,
tvtma/web,
unitek-solusi/OCA-web,
ursais/web,
vialaurea/OCA-web,
xcgd/web,
zarumaru/web,
and
zcyuefan/web |
<h1 class="title">Web Widget JSON Graph</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/15.0/web_widget_json_graph"><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-15-0/web-15-0-web_widget_json_graph"><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/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows to load a line graph per ordered pair from an One2many or
Many2many field.</p>
<img alt="Widget in action" src="https://raw.githubusercontent.com/OCA/web/15.0/web_widget_json_graph/static/description/widget_in_action.png" style="width: 400px;" />
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</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="usage"></a>
<h2><a class="toc-backref" href="#id1">Usage</a></h2>
<p>Use this widget by including:</p>
<pre>
<code><field name="field_text_json" widget="json_graph" /></code>
</pre>
<p>For example:</p>
<pre>
<code><field name="values_data" widget="json_graph"/></code>
</pre>
<p>The JSON needs to be like:</p>
<pre>
<code>info = {
"type": "line",
"data": {"datasets": [], "labels": []},
"options": {
"scales": {
"yAxes": [
{
"ticks": {"beginAtZero": True, "stacked": False},
"scaleLabel": {"display": True, "labelString": "Quantity"},
}
],
"xAxes": [
{
"scaleLabel": {"display": True, "labelString": "Date"},
}
],
},
"elements": {"point": {"radius": 3}},
"legend": {"labels": {"usePointStyle": True}},
"tooltips": {"intersect": False, "axis": "xy", "mode": "index"},
},
}
self.field_text_json = json.dumps(info)</code>
</pre>
<p>For example:</p>
<pre>
<code>plot_dataset = [1, 2, 3, 4, 3, 2]
labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
info = {
"type": "line",
"data": {"datasets": plot_dataset, "labels": labels},
"options": {
"scales": {
"yAxes": [
{
"ticks": {"beginAtZero": True, "stacked": False},
"scaleLabel": {"display": True, "labelString": "Quantity"},
}
],
"xAxes": [
{
"scaleLabel": {"display": True, "labelString": "Date"},
}
],
},
"elements": {"point": {"radius": 3}},
"legend": {"labels": {"usePointStyle": True}},
"tooltips": {"intersect": False, "axis": "xy", "mode": "index"},
},
}
self.values_data = json.dumps(info)</code>
</pre>
<p>For more information, please see <cite>Chart Js Documentation <https://www.chartjs.org/docs/2.9.4/></cite>.</p>
<a name="known-issues-roadmap"></a>
<h2><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h2>
<ul class="simple">
<li>None</li>
</ul>
<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_json_graph%0Aversion:%2015.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>Vauxoo</li>
</ul>
<a name="contributors"></a>
<h3><a class="toc-backref" href="#id6">Contributors</a></h3>
<ul class="simple">
<li>Francisco Luna <<a class="reference external" href="mailto:fluna@vauxoo.com">fluna@vauxoo.com</a>></li>
<li>José Robles <<a class="reference external" href="mailto:josemanuel@vauxoo.com">josemanuel@vauxoo.com</a>></li>
<li>Luis González <<a class="reference external" href="mailto:lgonzalez@vauxoo.com">lgonzalez@vauxoo.com</a>></li>
<li>Nhomar Hernández <<a class="reference external" href="mailto:nhomar@vauxoo.com">nhomar@vauxoo.com</a>></li>
</ul>
<a name="other-credits"></a>
<h3><a class="toc-backref" href="#id7">Other credits</a></h3>
<p>Vauxoo</p>
<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>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external" href="https://github.com/luisg123v"><img alt="luisg123v" src="https://github.com/luisg123v.png?size=40px" /></a> <a class="reference external" href="https://github.com/frahikLV"><img alt="frahikLV" src="https://github.com/frahikLV.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_widget_json_graph">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>