Lines.js revision a12380a54ea6e3ec3f16a090eee8ec5bf93aed83
/**
* Utility class used for drawing lines.
*
* @class Lines
* @constructor
*/
function Lines(){}
/**
* @property _lineDefaults
* @type Object
* @private
*/
_lineDefaults: null,
/**
* Creates a graphic in which to draw a series.
*
* @method _getGraphic
* @return Graphic
* @private
*/
_getGraphic: function()
{
if(!this._lineGraphic)
{
}
this._lineGraphic.clear();
return this._lineGraphic;
},
/**
* Toggles visibility
*
* @method _toggleVisible
* @param {Boolean} visible indicates visibilitye
* @private
*/
_toggleVisible: function(visible)
{
if(this._lineGraphic)
{
}
},
/**
* Draws lines for the series.
*
* @method drawLines
* @protected
*/
drawLines: function()
{
{
return;
}
noPointsRendered = true,
i,
path = this._getGraphic();
});
for(i = 0; i < len; i = ++i)
{
if(!pointValid)
{
continue;
}
if(noPointsRendered)
{
noPointsRendered = false;
}
else if(lastPointValid)
{
if(lineType != "dashed")
{
}
else
{
gapSpace);
}
}
else if(!connectDiscontinuousPoints)
{
}
else
{
if(discontinuousType != "solid")
{
}
else
{
}
}
lastValidX = nextX;
lastValidY = nextY;
lastPointValid = true;
}
},
/**
* Connects data points with a consistent curve for a series.
*
* @method drawSpline
* @protected
*/
drawSpline: function()
{
{
return;
}
cx1,
cx2,
cy1,
cy2,
x,
y,
i = 0,
path = this._getGraphic(),
});
for(; i < len; i = ++i)
{
x = curvecoords[i].endx;
y = curvecoords[i].endy;
}
},
/**
* Draws a dashed line between two points.
*
* @method drawDashedLine
* @param {Number} xStart The x position of the start of the line
* @param {Number} yStart The y position of the start of the line
* @param {Number} xEnd The x position of the end of the line
* @param {Number} yEnd The y position of the end of the line
* @param {Number} dashSize the size of dashes, in pixels
* @param {Number} gapSize the size of gaps between dashes, in pixels
* @private
*/
{
i,
path = this._getGraphic();
for(i = 0; i < segmentCount; ++i)
{
}
{
}
else if(delta > 0)
{
}
},
/**
* Default values for `styles` attribute.
*
* @method _getLineDefaults
* @return Object
* @protected
*/
_getLineDefaults: function()
{
return {
alpha: 1,
weight: 6,
lineType:"solid",
dashLength:10,
gapSpace:10,
discontinuousType:"solid",
};
}
};