aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/views/relation.erb4
-rw-r--r--web/viewsjs/relation.js.erb4
2 files changed, 8 insertions, 0 deletions
diff --git a/web/views/relation.erb b/web/views/relation.erb
index 0ed3dd9..089100c 100644
--- a/web/views/relation.erb
+++ b/web/views/relation.erb
@@ -39,8 +39,12 @@
</div>
<div id="graph">
<h2><%= t.pages.relation.graph.title %></h2>
+<% if @count_relation_roles > 0 %>
<div class="canvas">
</div>
+<% else %>
+ <p class="empty"><%= t.pages.relation.roles.no_roles_info %></p>
+<% end %>
</div>
<div id="wiki">
<h2><%= t.pages.relation.wiki_pages.title %></h2>
diff --git a/web/viewsjs/relation.js.erb b/web/viewsjs/relation.js.erb
index c2e003b..4e9544a 100644
--- a/web/viewsjs/relation.js.erb
+++ b/web/viewsjs/relation.js.erb
@@ -87,6 +87,10 @@ var create_flexigrid_for = {
// Marimekko chart based on http://bl.ocks.org/1005090
function create_role_chart(data) {
+ if (data.length == 0) {
+ return;
+ }
+
var width = 800,
height = 360,
margin = 20;