Mercurial > repos > other > exif-graphr
diff exif-graphr.js @ 1:a11817a35877
Update to D3js v4.9.1 and newer D3-tooltip
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 29 May 2017 14:06:47 +0100 |
parents | 42c058ce5b7c |
children | b83d9186c2af |
line wrap: on
line diff
--- a/exif-graphr.js Sun Aug 14 20:46:16 2016 +0100 +++ b/exif-graphr.js Mon May 29 14:06:47 2017 +0100 @@ -203,16 +203,16 @@ }); svg.call(tip); -var flAxisScale = d3.scale.linear() +var flAxisScale = d3.scaleLinear() .rangeRound([axisHeight, 0]); -var flAxis = d3.svg.axis().orient("left").scale(flAxisScale); -var expAxisScale = d3.scale.log() +var flAxis = d3.axisLeft(flAxisScale); +var expAxisScale = d3.scaleLog() .rangeRound([0, width]); -var expAxis = d3.svg.axis().scale(expAxisScale) +var expAxis = d3.axisTop(expAxisScale) .tickFormat(function(d) { if (d < 1) { return "1∕" + (1 / d).toFixed(2).replace(/\.?0+$/, ''); } else { return d; } }); var circlesG = svg.append("svg:g"); var axises = svg.append("svg:g"); -var saturationScale = d3.scale.log().range([30,90]); +var saturationScale = d3.scaleLog().range([30,90]); axises.append("g") .attr("class", "y axis") .call(flAxis);