js/visualisation.js
/**
	 * Adds a d3 y axis with standard look.
	 * This has no vertical bar, approximately 5 ticks and horizontal grid lines.
	 **/
Adds a d3 y axis with standard look.
This has no vertical bar, approximately 5 ticks and horizontal grid lines.
Adds a d3 y axis with standard look . This has no vertical bar approximately 5 ticks and horizontal grid lines .
createYAxis(chartArea,yScale) {
		let width = this.width;
		let yLines = chartArea.append('g')
			.call(d3.axisLeft(yScale)
				.ticks(5).tickFormat("")
				.tickSize(-width)
				.tickSizeOuter(0)
			);
		yLines.selectAll('.tick line').attr('stroke-opacity',0.25);
		yLines.selectAll('path').remove();
		let yAxis = chartArea.append('g')
			.call(d3.axisLeft(yScale)
				.ticks(5).tickFormat(d3.format(".4")) );
		yAxis.selectAll('path').remove();
		yAxis.selectAll('.tick line').remove();
		return yAxis;
	}
createYAxis ( chartArea , yScale ) { let width = this . width ; let yLines = chartArea . append ( 'g' ) . call ( d3 . axisLeft ( yScale ) . ticks ( 5 ) . tickFormat ( "" ) . tickSize ( - width ) . tickSizeOuter ( 0 ) ) ; yLines . selectAll ( '.tick line' ) . attr ( 'stroke-opacity' , 0.25 ) ; yLines . selectAll ( 'path' ) . remove ( ) ; let yAxis = chartArea . append ( 'g' ) . call ( d3 . axisLeft ( yScale ) . ticks ( 5 ) . tickFormat ( d3 . format ( ".4" ) ) ) ; yAxis . selectAll ( 'path' ) . remove ( ) ; yAxis . selectAll ( '.tick line' ) . remove ( ) ; return yAxis ; }
Adds a d3 y axis with standard look.
Adds a d3 y axis with standard look .
//grid lines // main axis