diff options
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_model.js')
| -rw-r--r-- | addons/web/static/src/js/views/graph/graph_model.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_model.js b/addons/web/static/src/js/views/graph/graph_model.js index 8679fafe4ff..b1bcddb47c2 100644 --- a/addons/web/static/src/js/views/graph/graph_model.js +++ b/addons/web/static/src/js/views/graph/graph_model.js @@ -35,7 +35,7 @@ return AbstractModel.extend({ * @returns {Object} */ __get: function () { - return _.extend({}, this.chart); + return Object.assign({ isSample: this.isSampleModel }, this.chart); }, /** * Initial loading. @@ -165,7 +165,12 @@ return AbstractModel.extend({ this.chart.comparisonFieldIndex = -1; } }, - + /** + * @override + */ + _isEmpty() { + return this.chart.dataPoints.length === 0; + }, /** * Fetch and process graph data. It is basically a(some) read_group(s) * with correct fields for each domain. We have to do some light processing |
