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 39d91f2 commit a32abf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/lis-histogram-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ export class LisHistogramElement extends LitElement {
// Add the x-axis label
svgContainer
.append('text')
.attr('fill', 'black')
.attr('transform', 'translate(' + 500 / 2 + ' ,' + (500 + 40) + ')')
.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)
Expand Down

0 comments on commit a32abf0

Please sign in to comment.