try and get ctrl-enter to add a clear all
[roojs1] / Roo / bootstrap / Graph.js
index 4be9a65..9d8e8f7 100644 (file)
@@ -81,14 +81,22 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
         var cfg = {
             tag: 'div',
             html : null
-        }
+        };
         
         
         return  cfg;
     },
 
     onRender : function(ct,position){
+        
+        
         Roo.bootstrap.Graph.superclass.onRender.call(this,ct,position);
+        
+        if (typeof(Raphael) == 'undefined') {
+            Roo.bootstrap.MessageBox.alert("Error","Raphael is not availabe");
+            return;
+        }
+        
         this.raphael = Raphael(this.el.dom);
         
                     // data1 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
@@ -124,7 +132,8 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
 
     },
 
-    load : function(graphtype,xdata,opts){
+    load : function(graphtype,xdata,opts)
+    {
         this.raphael.clear();
         if(!graphtype) {
             graphtype = this.graphtype;