Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.

Commit e42410e

Browse files
Updated to limit text to 25 characters max and show a tooltip on mouseover.
1 parent e10bcc2 commit e42410e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

dist/collapsible_tree.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sankey.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/examples/collapsible_tree/collapsible_tree.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ const vis: CollapsibleTreeVisualization = {
204204
})
205205
.style('font-family', "'Open Sans', Helvetica, sans-serif")
206206
.style('font-size', textSize + 'px')
207-
.text((d: any) => d.data.name)
207+
.text((d: any) => d.data.name.length > 25 ? d.data.name.substring(0,25).concat("...") : d.data.name)
208+
.append("svg:title").text(function(d: any){ return d.data.name })
209+
210+
208211

209212
// UPDATE
210213
const nodeUpdate = nodeEnter.merge(node)

0 commit comments

Comments
 (0)