mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
sunburst chart - tooltip formatting
This commit is contained in:
parent
14e6a1d24b
commit
6544fbeca6
@ -942,6 +942,7 @@ namespace ngcore
|
|||||||
.data(data)
|
.data(data)
|
||||||
.size('size')
|
.size('size')
|
||||||
.color(d => color(d.name))
|
.color(d => color(d.name))
|
||||||
|
.tooltipTitle((d, node) => { return node.parent ? node.parent.data.name + " → " + d.name : d.name; })
|
||||||
.tooltipContent((d, node) => {
|
.tooltipContent((d, node) => {
|
||||||
return `Time: <i>${getTime(d.time)}</i> <br>`
|
return `Time: <i>${getTime(d.time)}</i> <br>`
|
||||||
+ `calls: <i>${d.calls}</i> <br>`
|
+ `calls: <i>${d.calls}</i> <br>`
|
||||||
@ -950,6 +951,12 @@ namespace ngcore
|
|||||||
+ `avg: <i>${getTime(d.avg)}</i>`
|
+ `avg: <i>${getTime(d.avg)}</i>`
|
||||||
})
|
})
|
||||||
(document.getElementById('chart'));
|
(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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
)CODE_" << std::endl;
|
)CODE_" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user