LeftAxisLayout.js revision f99edfa53c6ad6f0caab146a750c4404fd898dc3
/**
* Algorithmic strategy for rendering a left axis.
*
* @module charts
* @class LeftAxisLayout
* @constructor
*/
LeftAxisLayout = function() {};
/**
* Default margins for text fields.
*
* @private
* @method _getDefaultMargins
* @return Object
*/
_getDefaultMargins: function()
{
return {
top: 0,
left: 0,
right: 4,
bottom: 0
};
},
/**
* Sets the length of the tick on either side of the axis line.
*
* @method setTickOffset
* @protected
*/
setTickOffsets: function()
{
var host = this,
switch(display)
{
case "inside" :
break;
case "outside" :
break;
case "cross":
break;
default:
break;
}
},
/**
* Draws a tick
*
* @method drawTick
* @param {Path} path reference to the path `Path` element in which to draw the tick.
* @param {Object} pt Point on the axis in which the tick will intersect.
* @param {Object} tickStyle Hash of properties to apply to the tick.
* @protected
*/
{
var host = this,
},
/**
* Calculates the coordinates for the first point on an axis.
*
* @method getLineStart
* @return {Object}
* @protected
*/
getLineStart: function()
{
if(display === "outside")
{
pt.x += tickLength;
}
else if(display === "cross")
{
}
return pt;
},
/**
* Calculates the point for a label.
*
* @method getLabelPoint
* @param {Object} point Point on the axis in which the tick will intersect.
* @return {Object}
* @protected
*/
getLabelPoint: function(point)
{
},
/**
* Updates the value for the `maxLabelSize` for use in calculating total size.
*
* @method updateMaxLabelSize
* @param {HTMLElement} label to measure
* @protected
*/
updateMaxLabelSize: function(label)
{
var host = this,
props = this._labelRotationProps,
max;
if(!DOCUMENT.createElementNS)
{
label.style.filter = 'progid:DXImageTransform.Microsoft.Matrix(M11=' + m11 + ' M12=' + m12 + ' M21=' + m21 + ' M22=' + m22 + ' sizingMethod="auto expand")';
}
else
{
if(rot === 0)
{
}
else if(absRot === 90)
{
}
else
{
}
}
},
/**
* Rotate and position title.
*
* @method positionTitle
* @param {HTMLElement} label to rotate position
* @protected
*/
positionTitle: function(label)
{
var host = this,
max,
x = 0,
leftOffset = 0,
topOffset = 0,
{
if(rot === 0)
{
max = labelWidth;
}
else if(absRot === 90)
{
max = labelHeight;
if(rot === 90)
{
}
else
{
}
}
else
{
if(rot > 0)
{
}
else
{
}
}
y += topOffset;
x += leftOffset;
}
else
{
if(rot === 0)
{
max = labelWidth;
}
else if(rot === 90)
{
max = labelHeight;
}
else if(rot === -90)
{
max = labelHeight;
}
else
{
}
y += topOffset;
x += leftOffset;
}
this._titleSize = max;
},
/**
* Rotate and position labels.
*
* @method positionLabel
* @param {HTMLElement} label to rotate position
* @param {Object} pt hash containing the x and y coordinates in which the label will be positioned
* against.
* @protected
*/
{
var host = this,
margin = 0,
props = this._labelRotationProps,
{
}
if(!DOCUMENT.createElementNS)
{
if(rot === 0)
{
}
else if(absRot === 90)
{
}
else if(rot > 0)
{
}
else
{
}
leftOffset += tickOffset;
return;
}
if(rot === 0)
{
leftOffset -= labelWidth;
}
else if(rot === 90)
{
}
else if(rot === -90)
{
}
else
{
if(rot < 0)
{
}
else
{
}
}
leftOffset -= margin;
},
/**
* Calculates the size and positions the content elements.
*
* @method setSizeAndPosition
* @protected
*/
setSizeAndPosition: function()
{
var host = this,
{
}
sz += this._titleSize;
},
/**
* Adjust the position of the Axis widget's content box for internal axes.
*
* @method offsetNodeForTick
* @param {Node} cb Content box of the Axis.
* @protected
*/
offsetNodeForTick: function(cb)
{
},
/**
* Sets the width of the axis based on its contents.
*
* @method setCalculatedSize
* @protected
*/
setCalculatedSize: function()
{
var host = this,
}
};