Skip to content

Commit

Permalink
trim text if its length longer than 20
Browse files Browse the repository at this point in the history
  • Loading branch information
lovedeep92 committed Oct 7, 2021
1 parent 4c3a846 commit 5bc8028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/line-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ export class LineGraph extends HTMLElement {
})
.text((d) => {
if (d.group) {
return d.group;
return d.group.substring(0, 20)+ '...';
} else {
return this.dataset.field
return this.dataset.field.substring(0, 20)+ '...';
}
})
// Legend text Click
Expand Down

0 comments on commit 5bc8028

Please sign in to comment.