I have a standalone html with CustomJS callbacks that works fine in google chrome but gives me an error in Firefox when I try to use a dropdown button.
I attached screenshots of the console for firefox and chrome after the same selection with the dropdown button.
I am not sure if I need to look into errors in my callback code (but it runs well in chrome !) or if this refers to an error on loading stuff in cdn.pydata from firefox ?
Here is the callback code :
var all = S_all.data;
var main = S_main.data;
var fill = S_fill.data;
var varlist = S_save.data[“varlist”];
var colors = S_save.data[“colors”][0];
var vartoplot = cb_obj.value;
console.log(vartoplot);
main_laby.axis_label = vartoplot;
fill_lab.axis_label = vartoplot;
for (var key in colors) {
if(vartoplot.includes(key)){
var colo = colors[key]
}
}
var y = all[vartoplot];
var min = Math.min.apply(null,y);
var max = Math.max.apply(null,y);
var ampli = max - min;
mainy.start = min - 0.1ampli;
mainy.end = max + 0.1ampli;
main[“y”] = ;
main[“colo”] = ;
fill[“colo”] = ;
if (cb_obj.label.includes(“1”)) {
fill[“y”]=;
}
if (cb_obj.label.includes(“2”)) {
fill[“x”]=;
}
for (i=0;i<y.length;i++) {
main[“y”].push(all[vartoplot][i]);
if (all[“flag”][i]==“0”) {main[“colo”].push(colo);fill[“colo”].push(colo);} else {main[“colo”].push(“grey”);fill[“colo”].push(“grey”);}
if (cb_obj.label.includes(“1”)) {fill[“y”].push(all[vartoplot][i]);}
if (cb_obj.label.includes(“2”)) {fill[“x”].push(all[vartoplot][i]);}
}
console.log(fill[“y”]);
console.log(fill[“x”]);
S_main.change.emit();
S_fill.change.emit();
``