Skip to content

Commit

Permalink
add labels to axis. add fill to override none in d3 v4. #224
Browse files Browse the repository at this point in the history
  • Loading branch information
ctcncgr committed Apr 16, 2024
1 parent a32abf0 commit a28041c
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 @@ -114,19 +114,19 @@ export class LisHistogramElement extends LitElement {
// Add the x-axis label
svgContainer
.append('text')
.attr('fill', 'black')
.attr('transform', 'translate(' + 500 / 2 + ' ,' + (500 + 40) + ')')
.style('fill', 'black')
.style('text-anchor', 'middle')
.text('Name');

// Add the y-axis label
svgContainer
.append('text')
.attr('fill', 'black')
.attr('transform', 'rotate(-90)')
.attr('y', 0 - 50)
.attr('x', 0 - 500 / 2)
.attr('dy', '1em')
.style('fill', 'black')
.style('text-anchor', 'middle')
.text('Count');

Expand Down

0 comments on commit a28041c

Please sign in to comment.