Search 1.9 billion lines of Odoo code on GitHub

web_widget_x2many_graph

Author: Vauxoo, Odoo Community Association (OCA)
License: AGPL-3
Branch: 8.0
Repository: Vauxoo/web
Dependencies: web
Languages: CSS (23, 1.6%), JavaScript (70, 4.7%), Python (26, 1.8%), RobotFramework (1281, 86.9%), XML (20, 1.4%), and reStructuredText (54, 3.7%)

<a name="multi-value-dimension"></a> <h2>Multi Value Dimension</h2> <p>This module allows load a line graph per ordered pair in a x2many field.</p> <img alt="Screenshot" src="https://www.evernote.com/l/AJ5Fxuoyfn5DPZCq0oTlbakT4KWh7YisWL0B/image.png" /> <a name="usage"></a> <h2>Usage</h2> <p>Use this widget by saying:</p> <pre> <code>&lt;field name=&quot;field_one2many_ids&quot; widget=&quot;x2many_graph&quot; color_field_name=&quot;HEXCOLOR&quot;&gt; &lt;graph &gt; &lt;field name=&quot;sequence&quot;/&gt; &lt;!-- default name for field_x --&gt; &lt;!-- The rest of fields will be taken as Y --&gt; &lt;field name=&quot;value&quot;/&gt; &lt;field name=&quot;sma&quot;/&gt; &lt;field name=&quot;cma&quot;/&gt; &lt;field name=&quot;wma&quot;/&gt; &lt;/graph&gt; &lt;/field&gt;</code> </pre> <p>For example:</p> <pre> <code>&lt;field name=&quot;value_ids&quot; widget=&quot;x2many_graph&quot; color_value=&quot;#2CA02C&quot; color_sma=&quot;#FFBB78&quot; color_cma=&quot;#1F77B4&quot; color_wma=&quot;#D62728&quot;&gt; &lt;graph &gt; &lt;field name=&quot;sequence&quot;/&gt; &lt;field name=&quot;value&quot;/&gt; &lt;field name=&quot;sma&quot;/&gt; &lt;field name=&quot;cma&quot;/&gt; &lt;field name=&quot;wma&quot;/&gt; &lt;/graph&gt; &lt;/field&gt;</code> </pre> <p>You can pass the following parameters:</p> <p>field_x:</p> <pre> <code>The field which define X. (not mandatory you can set in your model a field named sequence).</code> </pre> <p>field_label_x:</p> <pre> <code>Label for field_x</code> </pre> <p>color_[[field_name]]:</p> <pre> <code>As much colors as fields you have in your graph view.</code> </pre> <a name="known-issues-roadmap"></a> <h2>Known issues / Roadmap</h2> <ul class="simple"> <li>nolabel is ignored, this image will never bring a label, by default simply use an extra separator.</li> <li>A graph will use always 100% of the width, pending the css dynamic attribute.</li> <li>The height is wired.</li> </ul> <a name="bug-tracker"></a> <h2>Bug Tracker</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 feedback <a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_x2many_2d_graph%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">here</a>.</p> <a name="credits"></a> <h2>Credits</h2> <a name="contributors"></a> <h3>Contributors</h3> <ul class="simple"> <li>Nhomar Hernández &lt;<a class="reference external" href="mailto:nhomar&#64;vauxoo.com">nhomar&#64;vauxoo.com</a>&gt;</li> </ul> <a name="maintainer"></a> <h3>Maintainer</h3> <a class="reference external image-reference" href="http://odoo-community.org"><img alt="Odoo Community Association" src="http://odoo-community.org/logo.png" /></a> <p>This module is maintained by the OCA.</p> <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>To contribute to this module, please visit <a class="reference external" href="http://odoo-community.org">http://odoo-community.org</a>.</p>