summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/pie_chart.js
AgeCommit message (Collapse)Author
2020-08-12[IMP] web: sample data in dashboard viewMathieu Duckerts-Antoine
A previous commit has paved the way for displaying sample data in the reporting views. The present commit brings the required changes in community to have sample data in dashboard views. Task ID: 2282196 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13[REF] web: Adapt views/actions to new control panelJulien Mougenot
Some web actions/controllers/viewsl have been adapted to properly instantiate the newly refactored control panel and update it accordingly. We needed to adapt the starting mechanism of actions and controllers to ensure that the control panel instantiation did not delay the loading of any widget. Part of task 2196029 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2019-06-21[MERGE] forward port branch saas-12.2 up to 8747d72f1efChristophe Simonis
2019-06-21[MERGE] forward port branch 12.0 up to 0e72b983c35Christophe Simonis
2019-06-19[FIX] web: pie chart structure not modified by favoritesMathieu Duckerts-Antoine
A pie chart widget aims to instantiate a graph view in mode 'pie', with a measure and a single groupby specified via some attributes. It turns out that if a pie chart is instantiated in a context in which the keys 'graph_mode', 'graph_measure', and 'graph_groupbys' are present, that keys prevail over the pie chart specification. This can produce a line chart for instance. This fix corrects that situation. A test has been added in a corresponding commit in enterprise (historically, the pie chart widgets are tested in dashboard views). closes odoo/odoo#34234 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-06[REF] web: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-25[IMP] web: graph view legend and tooltips improvementsJuhil Somaiya
This commit ameliorates the tooltips and the legend of the graph view in its different modes (bar, line, and pie). Related task id: 1917940 Co-authored-by: Mohammed Shekha <msh@openerp.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> closes odoo/odoo#29747
2019-01-14[MERGE] forward port branch 12.0 up to 6a0675d36ddChristophe Simonis
2019-01-09[FIX] web: make pie chart title translatableNicolas Martinelli
The Pie Chart title is not translatable, since a string defined in a `t-att-` cannot be translated. We use the attribute `title` instead. Tests are adapted in https://github.com/odoo/enterprise/pull/3379 opw-1908220 closes odoo/odoo#29991
2018-12-07[REF] web: move ControlPanel inside controllers/actionsGéry Debongnie
This branch introduces a large-scale reorganization of the component tree generated by the web client. The short version is that now, the control panel is a child of the view controller and no longer a sibling. Graphically (and simplified), we go from this: webClient / | \ ... ... actionManager / \ controlPanel viewController / \ to this: webClient / | \ ... ... actionManager | viewController / | \ ControlPanelController / \ CPRenderer CPModel The motivation is that this work moves the code where it should be. Before this commit, it was kind of weird to have code in the controllers to render buttons outside of their root node (in renderButtons). Also, the action manager had to take care of coordinating search view states between view transitions. So, this work simplifies the code. It also makes it easier to extend. We see day after day that Odoo needs to take care of more complex UI needs, and in many cases, these needs were quite difficult to implement (we prefer spaghettis in our plates, not in our code). The changes in this branch should open the way to implement these features. For example, - it will now be easy to add the possibility of views (for example, the search view or a new ControlPanel view) to add custom buttons (of type action or object) in the control panel. - Another need will be to serialize/ restore the state of the search view across action boundaries (needed by the dashboard). - Another example is the possibility for views to customize easily the presence/absence of sub menus (filters/groupbys/favorites/ time range/...) - Another need is an easier way for views/client action to customize their control panel. This commit also contains a large rewrite of the search view (so it is more inline with our architecture and easier to maintain). Part of task 1893568 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-09-24[FIX] web: graph_renderer: show graph titleAdrien Dieudonne
Since odoo/enterprise@e3b0d2a, the title wasn't set anymore. This logic is now moved in the graph renderer to be able to set a title in every graphs. For now, we only use the title attribute for pie charts embedded in dashboard views. Additional tests has been added in 'web_dashboard' (enterprise).
2018-09-20[REF] web: Use graph renderer to render pie_chart widgetAdrien Dieudonne
Before this rev., the pie_chart widget was rendered from scratch with nv.d3 and we had duplicated code. In comparison mode, two widgets were instancied and it was a bit difficult to synchronize the size of these svg graphs. nv.d3 graphs are attached when the dom is ready because it needs to calculate the available space. UI bugs can appear if the dom changes... .update() must be executed on the graph to avoid this as we already do in graph renderer. So now, the rendering of the pie_chart widget is done by the graph renderer. As comparaison mode is supported by the rendering, only one widget needs to be instancied. Task ID: 1835644
2018-08-14[IMP] web: Pie Chart WidgetFrancois Volral
This commit brings a Pie Chart Widget that allows to visualize simple information on in a single pie chart. For now it is only used in dashboard view but it could also be used in another view that uses a basic renderer. An element with tat widget with attribute name 'pie_chart' can now be added to the arch view. Three keys should also be provided in the attribute 'attrs': - measure (determines the field to aggregate on) - groupby (determines the field used to group data) - title (determines the legend of the pie chart) Task Id: 1835644