diff options
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 69155e7b255..2c3645341d8 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -284,7 +284,7 @@ instance.web_graph.GraphView = instance.web.View.extend({ make_cells(pivot.cols.headers, 0); } else { make_cells(pivot.cols.main.children, 1); - header_cells[0].push(self.make_border_cell(1, height).append('Total')); + header_cells[0].push(self.make_border_cell(1, height).append('Total').css('font-weight', 'bold')); } _.each(header_cells, function (cells) { @@ -323,10 +323,16 @@ instance.web_graph.GraphView = instance.web.View.extend({ html_row.append(cell); } }); - var cell = $('<td></td>').append(pivot.get_value(row.id,pivot.cols.main.id)); + var total = pivot.get_value(row.id, pivot.cols.main.id); + var cell = $('<td></td>') + .append(total) + .css('font-weight', 'bold'); if (row.is_expanded && (row.path.length <= 2)) { var color = row.path.length * 5 + 240; cell.css("background-color", "rgb(" + [color, color, color].join() + ")"); + } else if (self.heat_map_mode) { + var color = Math.floor(50 + 205*(pivot.total - total)/pivot.total); + cell.css("background-color", "rgb(255," + color + "," + color + ")"); } if (pivot.cols.main.children.length > 0) { |
