mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
sunburst chart - tooltip formatting
This commit is contained in:
parent
14e6a1d24b
commit
6544fbeca6
@ -942,6 +942,7 @@ namespace ngcore
|
||||
.data(data)
|
||||
.size('size')
|
||||
.color(d => color(d.name))
|
||||
.tooltipTitle((d, node) => { return node.parent ? node.parent.data.name + " → " + d.name : d.name; })
|
||||
.tooltipContent((d, node) => {
|
||||
return `Time: <i>${getTime(d.time)}</i> <br>`
|
||||
+ `calls: <i>${d.calls}</i> <br>`
|
||||
@ -950,6 +951,12 @@ namespace ngcore
|
||||
+ `avg: <i>${getTime(d.avg)}</i>`
|
||||
})
|
||||
(document.getElementById('chart'));
|
||||
|
||||
// Line breaks in tooltip
|
||||
var all = document.getElementsByClassName('sunbirst-tooltip');
|
||||
for (var i = 0; i < all.length; i++) {
|
||||
all[i].white_space = "";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
)CODE_" << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user