Ich habe eine SVG mit d3 erstellt, die Titelattribute für alle Quicklinks für QuickInfo-Popups hat. Der Code funktioniert gut in Firefox, aber die Tooltips erscheinen nicht in Safari - weder Mac noch Windows. Ich weiß, dass das Titelattribut richtig eingestellt ist, wie ich es im Safari Web Inspector sehen kann.Titel Attribut funktioniert nicht für ein SVG Rect auf Safari
d3 Code Schnipsel:
.append("rect")
.attr("class", "hmCell")
.attr("x", function(d,i) {
return cellWidth*i;
})
.attr("y", 0)
.attr("width", cellWidth-cellPadding)
.attr("height", cellHeight-cellPadding)
.style("fill", function(d,i){
return colorScales[i](d);
})
.attr("title", function(d,i) { return coldata[i]['PrintName']+": "+d; });
Snippet aus dem Web-Inspektoren einen Teil des generierten HTML zeigt:
<rect class="hmCell" x="0" y="0" width="34" height="11" style="fill: #9fee49; " title="V1: Derek"></rect>
<rect class="hmCell" x="35" y="0" width="34" height="11" style="fill: #ee99bb; " title="V2: Blue"></rect>
Vielen Dank für jede Hilfe
Er arbeitete für ein svg Element in einem anderen Teil des Codes, und es funktioniert für die rect in Firefox kein Problem. – BoB3K
Es funktioniert sicher nicht für mich mit einem Titel-Attribut, anstatt ein Titel Kind-Element. Ich habe den Code geschrieben, der die Titel-Tooltip-Unterstützung in Firefox FWIW implementiert. –
Nun, ich ging und versuchte zu append ('title'), anstatt es als Attribut der rect und es hat funktioniert. Funktioniert in Firefox und Safari. – BoB3K