f69d245bb21be88752420e834a6b6be37e9b525fTripp * The ColumnSeries class renders columns positioned horizontally along a category or time axis. The columns'
f69d245bb21be88752420e834a6b6be37e9b525fTripp * lengths are proportional to the values they represent along a vertical axis.
f69d245bb21be88752420e834a6b6be37e9b525fTripp * and the relevant data points.
a75ebc38c1de401b679953a9b87bd323f0f48d02Tripp * @module charts
f69d245bb21be88752420e834a6b6be37e9b525fTripp * @class ColumnSeries
8648721e29bb657dd5c5ff20f03e86fe50628ce6Tripp * @extends MarkerSeries
8648721e29bb657dd5c5ff20f03e86fe50628ce6Tripp * @uses Histogram
f69d245bb21be88752420e834a6b6be37e9b525fTripp * @constructor
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTrippY.ColumnSeries = Y.Base.create("columnSeries", Y.MarkerSeries, [Y.Histogram], {
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * Helper method for calculating the size of markers.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @method _getMarkerDimensions
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @param {Number} xcoord The x-coordinate representing the data point for the marker.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @param {Number} ycoord The y-coordinate representing the data point for the marker.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @param {Number} calculatedSize The calculated size for the marker. For a `BarSeries` is it the width. For a `ColumnSeries` it is the height.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @param {Number} offset Distance of position offset dictated by other marker series in the same graph.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @return Object
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp _getMarkerDimensions: function(xcoord, ycoord, calculatedSize, offset)
e5d0d81b6efc013c3d7f95e9d1e02110684e35a9Tripp config.calculatedSize = this._bottomOrigin - config.top;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * Resizes and positions markers based on a mouse interaction.
f69d245bb21be88752420e834a6b6be37e9b525fTripp * @method updateMarkerState
f69d245bb21be88752420e834a6b6be37e9b525fTripp * @param {String} type state of the marker
f69d245bb21be88752420e834a6b6be37e9b525fTripp * @param {Number} i index of the marker
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @protected
82d0cf8c731b23f6a2fbb31e3e696e629444363eTripp seriesCollection = graph.seriesTypes[this.get("type")],
e67957db0543602abfe8be8cfc6ed03526db938cTripp markerStyles = state == "off" || !styles[state] ? Y.clone(styles) : Y.clone(styles[state]);
82d0cf8c731b23f6a2fbb31e3e696e629444363eTripp markerStyles.fill.color = this._getItemColor(markerStyles.fill.color, i);
82d0cf8c731b23f6a2fbb31e3e696e629444363eTripp markerStyles.border.color = this._getItemColor(markerStyles.border.color, i);
e5d0d81b6efc013c3d7f95e9d1e02110684e35a9Tripp config = this._getMarkerDimensions(xcoords[i], ycoords[i], styles.width, offset);
e67957db0543602abfe8be8cfc6ed03526db938cTripp markerStyles.width = Math.min(this._maxSize, markerStyles.width);
82d0cf8c731b23f6a2fbb31e3e696e629444363eTripp for(; n < seriesLen; ++n)
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp seriesStyles = seriesCollection[n].get("styles").marker;
e67957db0543602abfe8be8cfc6ed03526db938cTripp seriesSize += Math.min(this._maxSize, seriesStyles.width);
8648721e29bb657dd5c5ff20f03e86fe50628ce6Tripp * Read-only attribute indicating the type of series.
8648721e29bb657dd5c5ff20f03e86fe50628ce6Tripp * @attribute type
8648721e29bb657dd5c5ff20f03e86fe50628ce6Tripp * @type String
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @readOnly
8648721e29bb657dd5c5ff20f03e86fe50628ce6Tripp * @default column
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * Style properties used for drawing markers. This attribute is inherited from `MarkerSeries`. Below are the default values:
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>fill</dt><dd>A hash containing the following values:
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>color</dt><dd>Color of the fill. The default value is determined by the order of the series on the graph. The color
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * will be retrieved from the below array:<br/>
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * `["#66007f", "#a86f41", "#295454", "#996ab2", "#e8cdb7", "#90bdbd","#000000","#c3b8ca", "#968373", "#678585"]`
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker fill. The default value is 1.</dd>
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>border</dt><dd>A hash containing the following values:
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>color</dt><dd>Color of the border. The default value is determined by the order of the series on the graph. The color
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * will be retrieved from the below array:<br/>
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * `["#205096", "#b38206", "#000000", "#94001e", "#9d6fa0", "#e55b00", "#5e85c9", "#adab9e", "#6ac291", "#006457"]`
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker border. The default value is 1.</dd>
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>weight</dt><dd>Number indicating the width of the border. The default value is 1.</dd>
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * <dt>width</dt><dd>indicates the width of the marker. The default value is 12.</dd>
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * <dt>over</dt><dd>hash containing styles for markers when highlighted by a `mouseover` event. The default
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * values for each style is null. When an over style is not set, the non-over value will be used. For example,
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * the default value for `marker.over.fill.color` is equivalent to `marker.fill.color`.</dd>
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * @attribute styles
11174dd4aa7b6152555e21e3e0a5a511e058415bTripp * @type Object