This issue is only for EDGE browser
So far, for our dc.js chart - we have tried 9 different approaches for showing title attribute value in new line
Now, when I try to implement them with my chart:
.renderTitle(true)
.title(function (p) {
return [
'ABC',
'DEF',
'GHI',
'JKL']
.join('\n');
})
Where \n
is replaced with
\x0A

\t

They seems to work for HTML.
I was doubtful that they're working only with HTML, so I tried SVG only fix as suggested by @joews
.renderTitle(true)
.title(function (p) {
return [
'<tspan>ABC',
'</tspan><tspan>DEF',
'</tspan><tspan>GHI',
'</tspan><tspan>JKL'</tspan>']
.join('');
})
And the style rule is also applied:
tspan:nth-child(2n) {
display: block;
}
Have also tried pure d3.js approach
.append("svg:title")
.append("tspan")
.text('ABC'+'\nDEF'+'\nGHI'+'\nJKL')
None of these are working to bring new line in tooltips.
What is the fix?