✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Error on adding "text" attribute to extendTraces

I’m trying to stream data (line charts) using extendTraces and the code looks like the following:
Plotly.extendTraces(graph, { x: [[time], [time]], y: [[data[‘ap’]], [data[‘bp’]]] }, [0, 1])

However when I try to add text to the same, I get an error. Following are the line and the error I get:
Plotly.extendTraces(graph, {x: [[time], [time]], y: [[data[‘ap’]], [data[‘bp’]]], text: [[data[‘a’]], [data[‘b’]]]}, [0, 1])

plotly.min.js:7 Uncaught Error: cannot extend missing or non-array attribute: text
at plotly.min.js:7
at I (plotly.min.js:7)
at Object.t [as extendTraces] (plotly.min.js:7)
at HTMLDivElement. (update:421)
at Function.each (jquery-3.3.1.min.js:2)
at w.fn.init.each (jquery-3.3.1.min.js:2)
at Object.success (update:388)
at u (jquery-3.3.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-3.3.1.min.js:2)
at k (jquery-3.3.1.min.js:2)

Am I doing something wrong here?

This https://codepen.io/etpinard/pen/GYPOEK appears to work.

Would you mind sharing a code snippet?