X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Numeric.html diff --git a/docs/source/Numeric.html b/docs/source/Numeric.html index 90ad2ad5..7de76990 100644 --- a/docs/source/Numeric.html +++ b/docs/source/Numeric.html @@ -1,5 +1,22 @@ -Sencha Documentation Project
/**
- * @class Ext.chart.axis.Numeric
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
+ * @class Ext.chart.axis.Numeric
  * @extends Ext.chart.axis.Axis
  *
  * An axis to handle numeric values. This axis is used for quantitative data as
@@ -75,7 +92,6 @@
  * We use a <em>grid</em> configuration to set odd background rows to a certain style and even rows
  * to be transparent/ignored.
  *
- * @constructor
  */
 Ext.define('Ext.chart.axis.Numeric', {
 
@@ -92,22 +108,20 @@ Ext.define('Ext.chart.axis.Numeric', {
     alias: 'axis.numeric',
 
     constructor: function(config) {
-        var me = this, label, f;
+        var me = this,
+            hasLabel = !!(config.label && config.label.renderer),
+            label;
+        
         me.callParent([config]);
         label = me.label;
         if (me.roundToDecimal === false) {
             return;
         }
-        if (label.renderer) {
-            f = label.renderer;
-            label.renderer = function(v) {
-                return me.roundToDecimal( f(v), me.decimals );
-            };
-        } else {
+        if (!hasLabel) {
             label.renderer = function(v) {
                 return me.roundToDecimal(v, me.decimals);
             };
-        }
+        } 
     },
     
     roundToDecimal: function(v, dec) {
@@ -115,7 +129,7 @@ Ext.define('Ext.chart.axis.Numeric', {
         return ((v * val) >> 0) / val;
     },
     
-    /**
+    /**
      * The minimum value drawn by the axis. If not set explicitly, the axis
      * minimum will be calculated automatically.
      *
@@ -124,7 +138,7 @@ Ext.define('Ext.chart.axis.Numeric', {
      */
     minimum: NaN,
 
-    /**
+    /**
      * The maximum value drawn by the axis. If not set explicitly, the axis
      * maximum will be calculated automatically.
      *
@@ -133,7 +147,7 @@ Ext.define('Ext.chart.axis.Numeric', {
      */
     maximum: NaN,
 
-    /**
+    /**
      * The number of decimals to round the value to.
      * Default's 2.
      *
@@ -142,7 +156,7 @@ Ext.define('Ext.chart.axis.Numeric', {
      */
     decimals: 2,
 
-    /**
+    /**
      * The scaling algorithm to use on this axis. May be "linear" or
      * "logarithmic".
      *
@@ -151,7 +165,7 @@ Ext.define('Ext.chart.axis.Numeric', {
      */
     scale: "linear",
 
-    /**
+    /**
      * Indicates the position of the axis relative to the chart
      *
      * @property position
@@ -159,7 +173,7 @@ Ext.define('Ext.chart.axis.Numeric', {
      */
     position: 'left',
 
-    /**
+    /**
      * Indicates whether to extend maximum beyond data's maximum to the nearest
      * majorUnit.
      *
@@ -168,7 +182,7 @@ Ext.define('Ext.chart.axis.Numeric', {
      */
     adjustMaximumByMajorUnit: false,
 
-    /**
+    /**
      * Indicates whether to extend the minimum beyond data's minimum to the
      * nearest majorUnit.
      *
@@ -183,4 +197,6 @@ Ext.define('Ext.chart.axis.Numeric', {
         return this.calcEnds();
     }
 });
-
\ No newline at end of file +
+ +