Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Plotly graphs repainting problems

Recently we moved to use plotly graphs but have noticed that some Firefox browsers are not able to display data in the graph.
A browser that works has cache set to 0, while one of those that do not work has cache set to 30Mb… I am bringing the cache into consideration although I think it is not related to this as I force reload the page and javascript file (plotly.js) and still does not work.
Validated the link called from ajax is properly returning data.
I am including part of the code as reference.
Do you have an idea what could be causing this problem? Were to investigate?

Appreciate your help!

In our code we do the following:

Define the DIV structure:

Define graph:

var traceRegErrors = {
x: [0,0,0,0,0,0,0,0,0,0],
y: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
type: ‘bar’,
orientation: ‘h’,
marker: {
color: [‘rgb(175, 216, 248)’, ‘rgb(246, 192, 29)’, ‘rgb(160, 198, 50)’, ‘rgb(254, 143, 73)’, ‘rgb(10, 145, 145)’, ‘rgb(217, 88, 88)’, ‘rgb(145, 76, 145)’, ‘rgb(88, 133, 38)’, ‘rgb(183, 174, 15)’, ‘rgb(20, 149, 216)’]
}
};

var dataRegErrors = [traceRegErrors];

var layoutRegErrors = {
yaxis: {
type:“linear”,
autorange:true,
dtick: 1,
gridwidth:1,
showgrid:true,
showexponent: ‘all’,
gridcolor:“black”,
zeroline:false
},
xaxis: {
gridwidth:1,
type:“linear”,
showgrid:false,
autorange:true,
rangemode: ‘nonnegative’,
gridcolor:“black”,
zeroline:false
},
margin: {
l: 25,
r: 10,
b: 35,
t: 25,
pad: 4
},
width:250,
height:250
};
Plotly.newPlot(‘chartACSBar’, dataRegErrors, layoutRegErrors, {displayModeBar: false});

further down in the page we make an ajax call:
$.ajax({url:“MOMDashBoard?action=getRegErrorData&numOfPoints=20”, complete: function(xhr,status){
var xmlDoc = getXMLDoc(xhr.responseText);
if(xmlDoc != null){
var arr = xmlDoc.getElementsByTagName(“dataset”);
for(var i = 0; i < arr.length; i++){
traceRegErrors.x[i] = parseFloat(arr[i].childNodes[0].attributes[0].nodeValue);
}
Plotly.redraw(chartACSBar);
}
}});