✊🏿 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!

To_json loaded to Plotly.newPlot javascript doesn't bold titles with <b>...</b>

hello one and all,

simple thing i’m trying and i’m learning plotly, its like its own development platform. i first created a graph_object, make_subplots all of that and got my plot looking perfect. sent that full html to the webpage with fig.to_html(). great, it works. embedded in most of the titles of the plot, i put <b> and <span style="color:…;> to accent the titles and colorize the font to match the legend.

ok, to slim the code being sent, i then went to fig.to_json() sent just the data to the web-client and under the jQuery(document).ready(… function for the client-side javascript i put:

var figure = JSON.parse(jQuery('div#temperatures_json').html());
console.log("div#temperatures_json parsed well:: : "+figure);
Plotly.newPlot("temperatures_plot", figure);

which again worked great and showed the plot perfect except for the embedded html style tags, which show like “<b><span style=“color:#003f5c;”>In</span> <span style=“color:#bc5090;”>Incubator</span> (°C)</b>” instead of turning the tags into styled fonts. i know what is going on with the timing of it all. so, how to i get the tags to style post page loading?

thank you in advance, lucas