Closed
Description
I have this code that fails to relayout the width and height when an annotation is present:
http://codepen.io/anon/pen/RGxagY?editors=102
<head>
<script src="https://cdn.plot.ly/plotly-1.0.0.min.js"></script>
</head>
<body>
<div id="graph"></div>
</body>
<script>
var x = document.createElement('div')
var layout = {annotations: [
{text:'My Annotation', arrowcolor: 'orange', font:{color:'orange'},
x:2, y: 2
}
]
}
Plotly.newPlot(x, [{x: [1,2,3],y: [1,2,3],type: 'scatter'}], layout)
document.body.appendChild(x)
layout.width = 100
layout.height = 100
Plotly.relayout(x,layout)
</script>