LeftAxisLayout.js revision 8648721e29bb657dd5c5ff20f03e86fe50628ce6
/**
* Algorithmic strategy for rendering a left axis.
*
* @class LeftAxisLayout
* @extends Base
* @param {Object} config
* @constructor
*/
function LeftAxisLayout(config)
{
}
LeftAxisLayout.ATTRS = {
/**
* Reference to the <code>Axis</code> using the strategy.
*/
axisRenderer: {
value: null
},
/**
* @private
*/
maxLabelSize: {
value: 0
}
};
/**
* Sets the length of the tick on either side of the axis line.
*
* @method setTickOffset
*/
setTickOffsets: function()
{
switch(display)
{
case "inside" :
break;
case "outside" :
break;
case "cross":
break;
default:
break;
}
},
/**
* Draws a tick
*
* @method drawTick
* @param {Object} pt Point on the axis in which the tick will intersect.
* @param {Object) tickStyle Hash of properties to apply to the tick.
*/
{
},
/**
* Calculates the coordinates for the first point on an axis.
*
* @method getLineStart
* @return {Object}
*/
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}
*/
getLabelPoint: function(point)
{
},
/**
* @private
*/
updateMaxLabelSize: function(label)
{
max;
if(!document.createElementNS)
{
}
else
{
if(rot === 0)
{
}
else if(absRot === 90)
{
}
else
{
}
}
},
/**
* @protected
*
* 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.
*/
{
margin = 0,
leftOffset = pt.x,
m11 = cosRadians,
{
}
if(!document.createElementNS)
{
if(rot === 0)
{
leftOffset -= labelWidth;
}
else if(absRot === 90)
{
}
else if(rot === -90)
{
}
else if(rot > 0)
{
}
else
{
}
leftOffset -= margin;
if(filterString)
{
filterString += " ";
}
{
filterString = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + Math.round(labelAlpha * 100) + ")";
}
if(rot !== 0)
{
if(filterString)
{
filterString += " ";
}
else
{
filterString = "";
}
filterString += 'progid:DXImageTransform.Microsoft.Matrix(M11=' + m11 + ' M12=' + m12 + ' M21=' + m21 + ' M22=' + m22 + ' sizingMethod="auto expand")';
}
if(filterString)
{
}
return;
}
if(rot === 0)
{
leftOffset -= labelWidth;
}
else if(rot === 90)
{
}
else if(rot === -90)
{
}
else
{
if(rot < 0)
{
}
else
{
}
}
leftOffset -= margin;
},
/**
* @protected
*
* Calculates the size and positions the content elements.
*
* @method setSizeAndPosition
*/
setSizeAndPosition: function()
{
if(display === "inside")
{
}
else if(display === "cross")
{
}
{
}
},
/**
* Adjust the position of the Axis widget's content box for internal axes.
*
* @method offsetNodeForTick
* @param {Node} cb Content box of the Axis.
*/
offsetNodeForTick: function(cb)
{
if(line)
{
}
if(display === "inside")
{
}
else if (display === "cross")
{
}
else
{
}
},
/**
* Sets the width of the axis based on its contents.
*
* @method setCalculatedSize
*/
setCalculatedSize: function()
{
}
});