Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / docs / source / Chart.html
index ec59f43..ec076ea 100644 (file)
@@ -1,11 +1,17 @@
-<html>\r
-<head>\r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
-    <pre class="prettyprint lang-js"><div id="cls-Ext.chart.Chart"></div>/**\r
+<html>
+<head>
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
+    <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.chart.Chart"></div>/**\r
  * @class Ext.chart.Chart\r
  * @extends Ext.FlashComponent\r
  * The Ext.chart package provides the capability to visualize data with flash based charting.\r
      */\r
     bindStore : function(store, initial){\r
         if(!initial && this.store){\r
-            this.store.un("datachanged", this.refresh, this);\r
-            this.store.un("add", this.delayRefresh, this);\r
-            this.store.un("remove", this.delayRefresh, this);\r
-            this.store.un("update", this.delayRefresh, this);\r
-            this.store.un("clear", this.refresh, this);\r
             if(store !== this.store && this.store.autoDestroy){\r
                 this.store.destroy();\r
+            }else{\r
+                this.store.un("datachanged", this.refresh, this);\r
+                this.store.un("add", this.delayRefresh, this);\r
+                this.store.un("remove", this.delayRefresh, this);\r
+                this.store.un("update", this.delayRefresh, this);\r
+                this.store.un("clear", this.refresh, this);\r
             }\r
         }\r
         if(store){\r
         this.swf.setType(this.type);\r
 \r
         if(this.chartStyle){\r
-            this.setStyles(Ext.apply(this.extraStyle || {}, this.chartStyle));\r
+            this.setStyles(Ext.apply({}, this.extraStyle, this.chartStyle));\r
         }\r
 \r
         if(this.categoryNames){\r
     \r
     onDestroy: function(){\r
         Ext.chart.Chart.superclass.onDestroy.call(this);\r
-        delete window[this.tipFnName];\r
+        this.bindStore(null);\r
+        var tip = this.tipFnName;\r
+        if(!Ext.isEmpty(tip)){\r
+            delete window[tip];\r
+        }\r
     }\r
 });\r
 Ext.reg('chart', Ext.chart.Chart);\r
@@ -719,6 +730,6 @@ Ext.chart.PieSeries = Ext.extend(Ext.chart.Series, {
     type: "pie",\r
     dataField: null,\r
     categoryField: null\r
-});</pre>    \r
-</body>\r
+});</pre>
+</body>
 </html>
\ No newline at end of file