CategoryAxis.js revision f69d245bb21be88752420e834a6b6be37e9b525f
/**
* CategoryAxis manages category data on an axis.
*
* @param {Object} config (optional) Configuration parameters for the Chart.
* @class CategoryAxis
* @constructor
*/
function CategoryAxis(config)
{
}
{
/**
* @private
*/
_indices: null,
/**
* @private
*/
GUID: "yuicategoryaxis",
/**
* @private
*/
_type: "category",
/**
* @private
*/
_updateMinAndMax: function()
{
this._dataMinimum = 0;
},
/**
* @private
*/
{
var i = 0,
obj,
keyArr = [],
labels = [],
if(!this._indices)
{
this._indices = {};
}
for(; i < len; ++i)
{
keyArr[i] = i;
}
return labels;
},
/**
* @private
*/
_setDataByKey: function(key)
{
var i,
obj,
arr = [],
labels = [],
if(!this._indices)
{
this._indices = {};
}
for(i = 0; i < len; ++i)
{
arr[i] = i;
}
this._updateTotalDataFlag = true;
},
/**
* Returns an array of values based on an identifier key.
*
* @method getDataByKey
* @param {String} value value used to identify the array
* @return Array
*/
getDataByKey: function (value)
{
if(!this._indices)
{
this.get("keys");
}
{
}
return null;
},
/**
* Returns the total number of majorUnits that will appear on an axis.
*
* @method getTotalMajorUnits
* @return Number
*/
{
},
/**
* Returns the distance between major units on an axis.
*
* @method getMajorUnitDistance
* @param {Number} len Number of ticks
* @param {Number} uiLen Size of the axis.
* @param {Object} majorUnit Hash of properties used to determine the majorUnit
* @return Number
*/
{
var dist;
{
}
{
}
return dist;
},
/**
* Gets the distance that the first and last ticks are offset from there respective
* edges.
*
* @attribute getEdgeOffset
* @type Method
* @param {Number} ct Number of ticks on the axis.
* @param {Number} l Length (in pixels) of the axis.
* @return Number
*/
getEdgeOffset: function(ct, l)
{
return l/ct;
},
/**
* Calculates and returns a value based on the number of labels and the index of
* the current label.
*
* @method getLabelByIndex
* @param {Number} i Index of the label.
* @param {Number} l Total number of labels.
* @return String
*/
getLabelByIndex: function(i, l)
{
var label,
{
}
else
{
}
return label;
}
});
Y.CategoryAxis = CategoryAxis;