✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Use of different marker symbol with extendTraces does not work

I wanted that the newly added data points will be marked by cross. How can I do it. I tried this but nor working.

  function rand() {
  return Math.random();

Plotly.plot('graph', [{
  y: [1,2,3,4].map(rand),
  mode: 'lines+markers',
  marker: {symbol:'circle',color: 'pink', size: 8},
  line: {width: 4}

var cnt = 0;
var interval = setInterval(function() {
  Plotly.extendTraces('graph', {
    y: [[rand()]],
    marker: {symbol:'cross',color: 'pink', size: 8},
  }, [0])

  cnt = cnt+1;
  if(cnt === 100) clearInterval(interval);
}, 5);