X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Axis.html diff --git a/docs/source/Axis.html b/docs/source/Axis.html index db718c4d..8ab8166b 100644 --- a/docs/source/Axis.html +++ b/docs/source/Axis.html @@ -1,4 +1,21 @@ -
/**
+
+
+
+
+ The source code
+
+
+
+
+
+
+ /**
* @class Ext.chart.axis.Axis
* @extends Ext.chart.axis.Abstract
*
@@ -53,23 +70,67 @@ Ext.define('Ext.chart.axis.Axis', {
/* End Definitions */
- /**
+ /**
+ * @cfg {Boolean | Object} grid
+ * The grid configuration enables you to set a background grid for an axis.
+ * If set to *true* on a vertical axis, vertical lines will be drawn.
+ * If set to *true* on a horizontal axis, horizontal lines will be drawn.
+ * If both are set, a proper grid with horizontal and vertical lines will be drawn.
+ *
+ * You can set specific options for the grid configuration for odd and/or even lines/rows.
+ * Since the rows being drawn are rectangle sprites, you can set to an odd or even property
+ * all styles that apply to {@link Ext.draw.Sprite}. For more information on all the style
+ * properties you can set please take a look at {@link Ext.draw.Sprite}. Some useful style properties are `opacity`, `fill`, `stroke`, `stroke-width`, etc.
+ *
+ * The possible values for a grid option are then *true*, *false*, or an object with `{ odd, even }` properties
+ * where each property contains a sprite style descriptor object that is defined in {@link Ext.draw.Sprite}.
+ *
+ * For example:
+ *
+ * axes: [{
+ * type: 'Numeric',
+ * grid: true,
+ * position: 'left',
+ * fields: ['data1', 'data2', 'data3'],
+ * title: 'Number of Hits',
+ * grid: {
+ * odd: {
+ * opacity: 1,
+ * fill: '#ddd',
+ * stroke: '#bbb',
+ * 'stroke-width': 1
+ * }
+ * }
+ * }, {
+ * type: 'Category',
+ * position: 'bottom',
+ * fields: ['name'],
+ * title: 'Month of the Year',
+ * grid: true
+ * }]
+ *
+ */
+
+ /**
* @cfg {Number} majorTickSteps
* If `minimum` and `maximum` are specified it forces the number of major ticks to the specified value.
*/
- /**
+ /**
* @cfg {Number} minorTickSteps
* The number of small ticks between two major ticks. Default is zero.
*/
-
- /**
+
+ //@private force min/max values from store
+ forceMinMax: false,
+
+ /**
* @cfg {Number} dashSize
* The size of the dash marker. Default's 3.
*/
dashSize: 3,
- /**
+ /**
* @cfg {String} position
* Where to set the axis. Available options are `left`, `bottom`, `right`, `top`. Default's `bottom`.
*/
@@ -78,13 +139,13 @@ Ext.define('Ext.chart.axis.Axis', {
// @private
skipFirst: false,
- /**
+ /**
* @cfg {Number} length
* Offset axis position. Default's 0.
*/
length: 0,
- /**
+ /**
* @cfg {Number} width
* Offset axis width. Default's 0.
*/
@@ -160,6 +221,14 @@ Ext.define('Ext.chart.axis.Axis', {
out = Ext.draw.Draw.snapEnds(min, max, me.majorTickSteps !== false ? (me.majorTickSteps +1) : me.steps);
outfrom = out.from;
outto = out.to;
+ if (me.forceMinMax) {
+ if (!isNaN(max)) {
+ out.to = max;
+ }
+ if (!isNaN(min)) {
+ out.from = min;
+ }
+ }
if (!isNaN(me.maximum)) {
//TODO(nico) users are responsible for their own minimum/maximum values set.
//Clipping should be added to remove lines in the chart which are below the axis.
@@ -185,7 +254,7 @@ Ext.define('Ext.chart.axis.Axis', {
return out;
},
- /**
+ /**
* Renders the axis into the screen and updates it's position.
*/
drawAxis: function (init) {
@@ -319,7 +388,7 @@ Ext.define('Ext.chart.axis.Axis', {
me.drawLabel();
},
- /**
+ /**
* Renders an horizontal and/or vertical grid into the Surface.
*/
drawGrid: function() {
@@ -633,7 +702,7 @@ Ext.define('Ext.chart.axis.Axis', {
return maxWidth;
},
- /**
+ /**
* Renders the labels in the axes.
*/
drawLabel: function() {
@@ -694,7 +763,7 @@ Ext.define('Ext.chart.axis.Axis', {
return true;
},
- /**
+ /**
* Updates the {@link #title} of this axis.
* @param {String} title
*/
@@ -757,4 +826,6 @@ Ext.define('Ext.chart.axis.Axis', {
}
}, true);
}
-});
\ No newline at end of file
+});
+
+