Skip to content

Commit

Permalink
render axis ticks and values. add padding. #224
Browse files Browse the repository at this point in the history
  • Loading branch information
ctcncgr committed Apr 17, 2024
1 parent 9361bb7 commit e13975f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/lis-histogram-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class LisHistogramElement extends LitElement {
.attr('x', (d) => x(d.name) as number)
.attr('y', (d) => y(d.count))
.attr('width', x.bandwidth())
.attr('height', (d) => 500 - y(d.count))
.attr('height', (d) => height - y(d.count))
.attr('fill', 'steelblue');

// Add the x-axis label
Expand All @@ -138,7 +138,7 @@ export class LisHistogramElement extends LitElement {
// Add the x-axis
svgContainer
.append('g')
.attr('transform', 'translate(0,' + 500 + ')')
.attr('transform', 'translate(0,' + height + ')')
.call(d3.axisBottom(x));

// Add the y-axis
Expand Down

0 comments on commit e13975f

Please sign in to comment.