Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 1460 |
Technical Name |
tko_scatter_plot_view |
License | AGPL-3 |
Website | https://tkopen.com |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 1460 |
Technical Name |
tko_scatter_plot_view |
License | AGPL-3 |
Website | https://tkopen.com |
Scatter Plot View
Create a scatter_plot view
<record id="_my_model_scatter_plot_action" model="ir.ui.view">
<field name="name">_my_model_scatter_plot</field>
<field name="model">_my_model_</field>
<field name="arch" type="xml">
<scatter_plot x_field="field_a" y_field="field_b"
background="1" grid="1" legend="1"
rows="3" columns="3"
x_min="0" x_max="10" y_min="0" y_max="10"
label="field_x" color_field="field_x"
domain="[]" context="{'group_by': 'field_x'}">
<field name="field_a"/>
...
<field name="field_x"/>
</scatter_plot>
</field>
</record>
And create an action
<record id="action_my_model_scatterplot" model="ir.actions.act_window">
<field name="name">My Model</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">_my_model</field>
<field name="view_mode">scatter_plot,tree,form</field>
</record>
With a scatter_plot view mode...
Options description
- x_field: required, x axis value, numeric (e.g. integer, float, currency)
- y_field: required, y axis value, numeric (e.g. integer, float, currency)
- grid: optional, set as 1 to draw a grid, 0 to not draw, if absent draw
- background: optional, set as 1 to draw a background, 0 to not draw, optional, if absent draw
- legend: optional, set as 1 to draw legends, 0 to not draw, optional, if absent draw
- rows: optional, number of rows in the grid, optional, if absent don't draw grid
- columns: optional, number of columns in the grid, optional, if absent don't draw grid
- x_min: optional, force minimum value in x axis, optional, if absent get minimum from dataset
- x_max: optional, force maximum value in x axis, optional, if absent get maximum from dataset
- y_min: optional, force minimum value in y axis, optional, if absent get minimum from dataset
- y_max: optional, force maximum value in y axis, optional, if absent get maximum from dataset
- label: optional, field to get the label from
- color_field: optional, field to get the color from
- domain: optional, domain for the dataset
- context: optional, context for the dataset
Clicking in one of the circles opens the respective record form view, if more than one overlapped open tree view with all of them.
You can use filtering and group by Odoo features.

Credits
Contributors
- Carlos Almeida <carlos.almeida@tkopen.com>
Author & Maintainers
This module is proudly maintained by TKOpen, a leader in custom Odoo solutions. For assistance or to learn more about how we can help your business thrive, visit our website or contact us at info@tkopen.com.
Issues
This module is maintained in GitLab. Feel free to create issues here.
Please log in to comment on this module