title: Dynamically change line color dcc.Graph Plotly Dash between annotations
body: <p>I'm writing a 'template creation' app using the dcc.Graph <a href="https://dash.plotly.com/annotations" rel="nofollow noreferrer">image annotation features in Plotly Dash</a>.</p>
  <p>The user adds multiple rectangles for specific features in the image (an invoice) and my callback captures the coordinates of each rectangle via the <em>relayoutData</em> variable. I want to use a different color for each rectangle, but can't figure out how to do it.</p>
  <ul>
  <li>It seems like the only way to change the newshapes <em>fillcolor</em>
  property is to replace the whole figure, but then I lose all previous shapes</li>
  </ul>
  <p>All and any help appreciated.</p>
  <p>Andrew</p>