summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2019-02-26 14:43:23 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2019-04-01 14:40:51 +0000
commit604c43640a05ea30e085381c90584f31e8bf7f7c (patch)
tree8eb67b4911c04f59a6cb537b9b920a017bd8ca85 /addons/web/static/src/xml
parenta8d3ca771f0d086767ed45a198db37ad3ebce029 (diff)
[IMP] web: use Chart.js in graph view
It has been decided to use Chart.js instead of nvd3 to render charts. In this commit the graph view has been largely rewritten to benefit from the options offered by Chart.js. Task ID: 1946138
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/base.xml3
-rw-r--r--addons/web/static/src/xml/chart.xml29
2 files changed, 3 insertions, 29 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index a12f09ef4a0..75426a36d06 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -521,6 +521,9 @@
<button class="btn btn-secondary fa fa-area-chart o_graph_button" title="Line Chart" aria-label="Line Chart" data-mode="line"/>
<button class="btn btn-secondary fa fa-pie-chart o_graph_button" title="Pie Chart" aria-label="Pie Chart" data-mode="pie"/>
</div>
+ <div class="btn-group" role="toolbar" aria-label="Change graph">
+ <button class="btn btn-secondary fa fa-database o_graph_button" title="Stacked" aria-label="Stacked" data-mode="stack"/>
+ </div>
</t>
<div t-name="GraphView.error" class="o_view_nocontent" role="alert">
<div class="o_nocontent_help">
diff --git a/addons/web/static/src/xml/chart.xml b/addons/web/static/src/xml/chart.xml
index a6f5cccc712..d45bef7af6f 100644
--- a/addons/web/static/src/xml/chart.xml
+++ b/addons/web/static/src/xml/chart.xml
@@ -7,33 +7,4 @@
</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 &amp;&amp; window.parseFloat(line.value).toFixed(2) || 0"/>
- </td>
- </tr>
- </t>
- </tbody>
- </table>
-</t>
-
</template>