Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] web: graph view legend and tooltips improvements
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 #29747
- Loading branch information
1 parent
23dcaf4
commit b3b29f3
Showing
6 changed files
with
117 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template> | ||
|
||
<t t-name="web.PieChart"> | ||
<graph type="pie" t-att-title="title"> | ||
<field t-att-name="modifiers.groupby.split(':')[0]" t-att-interval="modifiers.groupby.split(':')[1]"/> | ||
<field t-if="modifiers.measure" t-att-name="modifiers.measure" type="measure"/> | ||
</graph> | ||
</t> | ||
|
||
<t t-name="web.Chart.Tooltip"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<td colspan="3"> | ||
<strong class="x-value"> | ||
<t t-esc="title"/> | ||
</strong> | ||
</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<t t-foreach="lines" t-as="line"> | ||
<tr> | ||
<td class="legend-color-guide"> | ||
<div t-att-style="'background-color:' + line.color +';'"/> | ||
</td> | ||
<td class="key"> | ||
<t t-esc="line.label"/> | ||
</td> | ||
<td class="value"> | ||
<t t-esc="line.value && window.parseFloat(line.value).toFixed(2) || 0"/> | ||
</td> | ||
</tr> | ||
</t> | ||
</tbody> | ||
</table> | ||
</t> | ||
|
||
</template> |
This file was deleted.
Oops, something went wrong.