previous_versions/ChartNew_V1.js
function populateLabels(axis, config, labelTemplateString, labels, numberOfSteps, graphMin, graphMax, stepValue) {
		var logarithmic;
		if (axis == 2) {
			logarithmic = config.logarithmic2;
			fmtYLabel = config.fmtYLabel2;
		} else {
			logarithmic = config.logarithmic;
			fmtYLabel = config.fmtYLabel;
		}
		if (labelTemplateString) {
			//Fix floating point errors by setting to fixed the on the same decimal as the stepValue.
			if (!logarithmic) { // no logarithmic scale
				for (var i = 0; i < numberOfSteps + 1; i++) {
					labels.push(tmpl(labelTemplateString, {
						value: fmtChartJS(config, 1 * ((graphMin + (stepValue * i)).toFixed(getDecimalPlaces(stepValue))), fmtYLabel)
					}));
				}
			} else { // logarithmic scale 10,100,1000,...
				var value = graphMin;
				for (var i = 0; i < numberOfSteps + 1; i++) {
					labels.push(tmpl(labelTemplateString, {
						value: fmtChartJS(config, 1 * value.toFixed(getDecimalPlaces(value)), fmtYLabel)
					}));
					value *= 10;
				}
			}
		}
	}
function populateLabels(axis, config, labelTemplateString, labels, numberOfSteps, graphMin, graphMax, stepValue) {
		var logarithmic;
		if (axis == 2) {
			logarithmic = config.logarithmic2;
			fmtYLabel = config.fmtYLabel2;
		} else {
			logarithmic = config.logarithmic;
			fmtYLabel = config.fmtYLabel;
		}
		if (labelTemplateString) {
			//Fix floating point errors by setting to fixed the on the same decimal as the stepValue.
			if (!logarithmic) { // no logarithmic scale
				for (var i = 0; i < numberOfSteps + 1; i++) {
					labels.push(tmpl(labelTemplateString, {
						value: fmtChartJS(config, 1 * ((graphMin + (stepValue * i)).toFixed(getDecimalPlaces(stepValue))), fmtYLabel)
					}));
				}
			} else { // logarithmic scale 10,100,1000,...
				var value = graphMin;
				for (var i = 0; i < numberOfSteps + 1; i++) {
					labels.push(tmpl(labelTemplateString, {
						value: fmtChartJS(config, 1 * value.toFixed(getDecimalPlaces(value)), fmtYLabel)
					}));
					value *= 10;
				}
			}
		}
	}
function populateLabels ( axis , config , labelTemplateString , labels , numberOfSteps , graphMin , graphMax , stepValue ) { var logarithmic ; if ( axis == 2 ) { logarithmic = config . logarithmic2 ; fmtYLabel = config . fmtYLabel2 ; } else { logarithmic = config . logarithmic ; fmtYLabel = config . fmtYLabel ; } if ( labelTemplateString ) { //Fix floating point errors by setting to fixed the on the same decimal as the stepValue. if ( ! logarithmic ) { // no logarithmic scale for ( var i = 0 ; i < numberOfSteps + 1 ; i ++ ) { labels . push ( tmpl ( labelTemplateString , { value : fmtChartJS ( config , 1 * ( ( graphMin + ( stepValue * i ) ) . toFixed ( getDecimalPlaces ( stepValue ) ) ) , fmtYLabel ) } ) ) ; } } else { // logarithmic scale 10,100,1000,... var value = graphMin ; for ( var i = 0 ; i < numberOfSteps + 1 ; i ++ ) { labels . push ( tmpl ( labelTemplateString , { value : fmtChartJS ( config , 1 * value . toFixed ( getDecimalPlaces ( value ) ) , fmtYLabel ) } ) ) ; value *= 10 ; } } } }
Populate an array of all the labels by interpolating the string.
Populate an array of all the labels by interpolating the string .