CartesianChart.js revision 8209f3939e32e0e5bde64192267fdaf9db6f4fbc
1525N/A this._addGridlines();
1525N/A this._addSeries();
1525N/A this._addTooltip();
1525N/A * When `interactionType` is set to `planar`, listens for mouse move events and fires `planarEvent:mouseover` or `planarEvent:mouseout` depending on the position of the mouse in relation to
1525N/A _planarEventDispatcher: function(e)
y = e.pageY,
item,
items = [],
categoryItems = [],
valueItems = [],
for(; i < len; ++i)
index = i;
* Broadcasts when `interactionType` is set to `planar` and a series' marker plane has received a mouseover event.
* <dt>categoryItem</dt><dd>An array of hashes, each containing information about the category `Axis` of each marker whose plane has been intersected.</dd>
* <dt>valueItem</dt><dd>An array of hashes, each containing information about the value `Axis` of each marker whose plane has been intersected.</dd>
* <dt>items</dt><dd>An array including all the series which contain a marker whose plane has been intersected.</dd>
* Broadcasts when `interactionType` is set to `planar` and a series' marker plane has received a mouseout event.
this.fire("planarEvent:mouseover", {categoryItem:categoryItems, valueItem:valueItems, x:posX, y:posY, items:items, index:index});
* Queue of axes instances that will be updated. This method is used internally to determine when all axes have been updated.
_axesRenderQueue: null,
if(!this._axesRenderQueue)
this._axesRenderQueue = [];
* @param {Array} val Array containing either `CartesianSeries` instances or objects containing data to construct series instances.
tempKeys = [],
key,
if(key)
if((series.type == "combo" || series.type == "stackedcombo" || series.type == "combospline" || series.type == "stackedcombospline"))
if(showAreaFill !== null)
series.showAreaFill = (series.showAreaFill !== null && series.showAreaFill !== undefined) ? series.showAreaFill : showAreaFill;
if(showMarkers !== null)
series.showMarkers = (series.showMarkers !== null && series.showMarkers !== undefined) ? series.showMarkers : showMarkers;
if(showLines !== null)
series.showLines = (series.showLines !== null && series.showLines !== undefined) ? series.showLines : showLines;
if(val)
return sc;
axis;
_getCategoryAxis: function()
var axis,
return axis;
keys,
axis;
if(axes)
for(i in axes)
return axis;
* literals. Used for determining attributes from series/axis references which can be an actual class instance
* literals. Used for setting attributes on a Base class, either directly or to be stored in an object literal
* @param {Object} val Object containing `Axis` instances or objects in which to construct `Axis` instances.
axes = {},
axesAttrs = {
ai,
pos,
axis,
dh,
for(i in hash)
config = {};
if(axis)
return axes;
_addAxes: function()
axis,
pos,
if(!this._axesCollection)
this._axesCollection = [];
for(i in axes)
_addSeries: function()
_addGridlines: function()
if(this._axesCollection)
if(hgl)
if(vgl)
* Generates and returns a key-indexed object containing `Axis` instances or objects used to create `Axis` instances.
axis,
attr,
keys,
newAxes = {},
claimedKeys = [],
ii,
ll,
dv,
valueAxes = [],
if(axes)
for(i in axes)
categoryAxisName = i;
else if(i == categoryAxisName)
this._setBaseAttribute(newAxes[i], "position", this._getDefaultAxisPosition(newAxes[i], valueAxes, seriesPosition));
for(i in dv)
this._setBaseAttribute(newAxes[valueAxisName], "position", this._getDefaultAxisPosition(newAxes[valueAxisName], valueAxes, seriesPosition));
return newAxes;
* @param {String} position Default position depending on the direction of the chart and type of axis.
return position;
categoryItem = {
valueItem = {
valueItem = {
categoryItem = {
_axisRendered: function(e)
this._axesRenderQueue = this._axesRenderQueue.splice(1 + Y.Array.indexOf(this._axesRenderQueue, e.currentTarget), 1);
this._redraw();
_sizeChanged: function(e)
if(this._axesCollection)
this._redraw();
_redraw: function()
if(this._drawing)
this._callLater = true;
this._drawing = true;
this._callLater = false;
axis,
pos,
pts = [],
if(lc)
if(rc)
if(tc)
if(bc)
this._drawing = false;
if(this._callLater)
this._redraw();
if(graph)
if(this._overlay)
ATTRS: {
axesStyles: {
getter: function()
if(axes)
for(i in axes)
if(!styles)
styles = {};
return styles;
for(i in val)
seriesStyles: {
getter: function()
dict,
if(graph)
if(dict)
styles = {};
for(i in dict)
return styles;
for(i in val)
s = this.getSeries(i);
graphStyles: {
getter: function()
if(graph)
return this._graphStyles;
* <dt>series</dt><dd>A key indexed hash containing references to the `styles` attribute for each series in the chart.
* <li><a href="AreaSeries.html#config_styles">AreaSeries</a></li>
* <li><a href="BarSeries.html#config_styles">BarSeries</a></li>
* <li><a href="ColumnSeries.html#config_styles">ColumnSeries</a></li>
* <li><a href="ComboSeries.html#config_styles">ComboSeries</a></li>
* <li><a href="LineSeries.html#config_styles">LineSeries</a></li>
* <li><a href="MarkerSeries.html#config_styles">MarkerSeries</a></li>
* <li><a href="SplineSeries.html#config_styles">SplineSeries</a></li>
* <dt>axes</dt><dd>A key indexed hash containing references to the `styles` attribute for each axes in the chart. Specific
* style attributes can be found in the <a href="Axis.html#config_styles">Axis</a> class.</dd>
* <dt>graph</dt><dd>A reference to the `styles` attribute in the chart. Specific style attributes can be found in the
* <a href="Graph.html#config_styles">Graph</a> class.</dd>
styles: {
getter: function()
var styles = {
return styles;
axes: {
* Collection of series to appear on the chart. This can be an array of Series instances or object literals
leftAxesCollection: {},
bottomAxesCollection: {},
rightAxesCollection: {},
topAxesCollection: {},
stacked: {
value: false
direction: {
getter: function()
return this._direction;
return this._direction;
showAreaFill: {},
showMarkers:{},
showLines:{},
getter: function()
if(graph)
return this._horizontalGridlines;
val = {};
if(graph)
getter: function()
if(graph)
return this._verticalGridlines;
val = {};
if(graph)
type: {
getter: function()
return this._type;
return this._type;
categoryAxis:{}