vendors/chartnew/mathFunctions.js
/**
	 * Draw a horizontal line
	 * @param i {integer} numer of dataset
	 * @param lineFct {string} name of the mathfunctions => compute height
	 */
Draw a horizontal line
@param i {integer} numer of dataset
@param lineFct {string} name of the mathfunctions => compute height
Draw a horizontal line @param i { integer } numer of dataset @param lineFct { string } name of the mathfunctions = > compute height
function drawMathLine(i,lineFct) {
		var line = 0;
		if (typeof eval(lineFct) == "function") {
			var parameter = {data:data,datasetNr: i};
			line = window[lineFct](parameter);
		 }
		if (!(typeof(line)=='undefined')) {
			ctx.strokeStyle= data.datasets[i].mathLineStrokeColor ? data.datasets[i].mathLineStrokeColor : config.defaultStrokeColor;
			ctx.lineWidth = config.datasetStrokeWidth;
			ctx.beginPath();
			ctx.moveTo(yAxisPosX,yPos(i,0,line,false));
			ctx.lineTo(yAxisPosX + msr.availableWidth,yPos(i,data.datasets[i].data.length-1,line,false));
			ctx.stroke();
			ctx.closePath();
		}
	}
function drawMathLine ( i , lineFct ) { var line = 0 ; if ( typeof eval ( lineFct ) == "function" ) { var parameter = { data : data , datasetNr : i } ; line = window [ lineFct ] ( parameter ) ; } if ( ! ( typeof ( line ) == 'undefined' ) ) { ctx . strokeStyle = data . datasets [ i ] . mathLineStrokeColor ? data . datasets [ i ] . mathLineStrokeColor : config . defaultStrokeColor ; ctx . lineWidth = config . datasetStrokeWidth ; ctx . beginPath ( ) ; ctx . moveTo ( yAxisPosX , yPos ( i , 0 , line , false ) ) ; ctx . lineTo ( yAxisPosX + msr . availableWidth , yPos ( i , data . datasets [ i ] . data . length - 1 , line , false ) ) ; ctx . stroke ( ) ; ctx . closePath ( ) ; } }
Draw a horizontal line
 @param i {integer} numer of dataset
 @param lineFct {string} name of the mathfunctions => compute height
Draw a horizontal line @param i { integer } numer of dataset @param lineFct { string } name of the mathfunctions = > compute height
// check if the math function exists