From 7db52cba1a1dabaa64bf628380cf184b189885a5 Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Wed, 9 Aug 2017 17:25:30 -0400 Subject: [PATCH] Use assigned bar width #232 --- viewer/js/xdot2cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viewer/js/xdot2cy.js b/viewer/js/xdot2cy.js index bb1abfe..93a09ba 100644 --- a/viewer/js/xdot2cy.js +++ b/viewer/js/xdot2cy.js @@ -2459,7 +2459,7 @@ function drawEdgeWeightHistogram() { ); bar.append("rect") .attr("x", 1) - .attr("width", x(bins[0].x1) - x(bins[0].x0) - 1) + .attr("width", function(d) { return x(d.x1) - x(d.x0) - 1; }) .attr("height", function(d) { return height - y(d.length); }); var xAxis = d3.axisBottom(x); @@ -2485,7 +2485,7 @@ function drawEdgeWeightHistogram() { .attr("dy", "1em") .style("text-anchor", "middle") .text("Frequency"); - // TODO: ensure that there's space between every bar; ensure that the + // TODO: ensure that bars have uniform width?; ensure that the // y-axis only has ticks for integer values }