Skip to content

Commit

Permalink
add labels to axis. #224
Browse files Browse the repository at this point in the history
  • Loading branch information
ctcncgr committed Apr 16, 2024
1 parent bdc66aa commit 39d91f2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/core/lis-histogram-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,6 @@ export class LisHistogramElement extends LitElement {
.attr('height', (d) => 500 - y(d.count))
.attr('fill', 'steelblue');

// Add the x-axis
svgContainer
.append('g')
.attr('transform', 'translate(0,' + 500 + ')')
.call(d3.axisBottom(x));

// Add the y-axis
svgContainer.append('g').call(d3.axisLeft(y));

// Add the x-axis label
svgContainer
.append('text')
Expand All @@ -136,5 +127,14 @@ export class LisHistogramElement extends LitElement {
.attr('dy', '1em')
.style('text-anchor', 'middle')
.text('Count');

// Add the x-axis
svgContainer
.append('g')
.attr('transform', 'translate(0,' + 500 + ')')
.call(d3.axisBottom(x));

// Add the y-axis
svgContainer.append('g').call(d3.axisLeft(y));
}
}

0 comments on commit 39d91f2

Please sign in to comment.