I am showing annotations by clicking on a plotly chart. Now I would like to align the lines to look better. The indentations should be the same for every line.
It comes clear with the picture:

myPlot.on('plotly_click',
function (data) {
var point = data.points[0],
newAnnotation = {
x: point.x,
y: point.y,
arrowhead: 7,
ax: 0,
ay: 80,
bgcolor: 'rgba(255, 255, 255, 0.85)',
arrowcolor: point.fullData.marker.color,
font: { size: 12 },
bordercolor: point.fullData.marker.color,
borderwidth: 2,
text:
' | <b>Messung: </b> ' + vitSigTitle + ' |<br>' + '---- <br>'+
'<b>Zeitpunkt </b><br>' +
(new Date(point.x)).toLocaleString('default')+ '<br>'+
'<i>Jahr: </i> ' + (new Date(point.x)).getFullYear() + '<br>' +
'<i>Monat: </i> ' + (new Date(point.x)).toLocaleString('default', { month: 'long' }) + '<br>' +
'<i>Tag: </i> ' + (new Date(point.x)).toLocaleDateString('default', { weekday: 'long' }) + '<br>' +
'<i>Uhrzeit: </i> '+ (new Date(point.x)).toLocaleTimeString() + '<br>' +
'<b>Messwert</b><br>' + (point.y) + vitSigUnit
},
newIndex = (node.children[0].layout.annotations || []).length;
// delete instead if clicked twice
if (newIndex) {
var foundCopy = false;
node.children[0].layout.annotations.forEach(function (ann, sameIndex) {
if (ann.text === newAnnotation.text) {
Plotly.relayout(node.children[0], 'annotations[' + sameIndex + ']', 'remove');
foundCopy = true;
}
});
if (foundCopy) return;
}
As you see, "Tag" is completely offset.
Here is my code: