aboutsummaryrefslogtreecommitdiff
path: root/web/viewsjs
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-20 18:01:35 +0100
committerJochen Topf <jochen@topf.org>2013-01-20 18:01:35 +0100
commitfe22edeccef4ba8b4b0c78448bbfc292a947a35e (patch)
tree4ebd00fd8536fa9e3d7ce26b66bf634682d1dcaf /web/viewsjs
parent29bf3235f82be1f33f349fdf2f491120fea4a533 (diff)
downloadtaginfo-fe22edeccef4ba8b4b0c78448bbfc292a947a35e.tar
taginfo-fe22edeccef4ba8b4b0c78448bbfc292a947a35e.tar.gz
If no roles data is available, don't try to create chart.
Diffstat (limited to 'web/viewsjs')
-rw-r--r--web/viewsjs/relation.js.erb4
1 files changed, 4 insertions, 0 deletions
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;