Skip to content

Commit

Permalink
fix y position
Browse files Browse the repository at this point in the history
  • Loading branch information
penqe committed Apr 4, 2024
1 parent 4ee945f commit 385ee71
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions stanzas/barchart/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export default class Barchart extends MetaStanza {

bar
.append("rect")
.attr("x", 1)
.attr("y", (d) => y(d.length))
.attr("width", x(bins[0].x1) - x(bins[0].x0) - 1)
.attr("height", (d) => height - y(d.length))
.attr("fill", "steelblue");
Expand Down Expand Up @@ -493,9 +493,7 @@ function drawGroupedBars(
.enter()
.append("g")
.classed("bar-group", true)
.attr("transform", (d) => {
return `translate(${this.xAxisGen.axisGen.scale()(d[0])},0)`;
});
.attr("transform", (d) => `translate(${this.xAxisGen.axisGen.scale()(d[0])},0)`);

barGroup
.selectAll("rect")
Expand Down

0 comments on commit 385ee71

Please sign in to comment.