Commit 2e12f743 authored by Fabien  MAREUIL's avatar Fabien MAREUIL
Browse files

plotly legend order

parent bf42ceaf
Pipeline #50870 passed with stages
in 25 minutes and 11 seconds
......@@ -99,7 +99,7 @@ $.ajax({
};
var ippidb_plot = document.getElementById('myDiv');
Plotly.newPlot('myDiv', [data[2], data[0], data[1]], layout, {scrollZoom: true});
Plotly.newPlot('myDiv', [data[0], data[1], data[2]], layout, {scrollZoom: true});
$(".loader").remove();
ippidb_plot.on('plotly_click', function(datapoints){
if (datapoints.event.button == 0) {
......@@ -107,7 +107,7 @@ $.ajax({
};
});
ippidb_plot.on('plotly_hover', function(datapoints){
var curvenumber = datapoints.points[0].curveNumber - 1;
var curvenumber = datapoints.points[0].curveNumber;
var pointnumber = datapoints.points[0].pointNumber;
var colors = [repeatElement("#4e79a7", connect_ippidb[0].length),
repeatElement("#de425b", connect_ippidb[1].length)];
......@@ -125,8 +125,8 @@ $.ajax({
color: 'DarkSlateGrey'}, opacity: opacity[0], symbol: 1}};
var update_HD = {'marker':{color: colors[1], size: data[4][1], line: {width: 1,
color: 'DarkSlateGrey'}, opacity: opacity[1]}};
Plotly.restyle('myDiv', update_PL, 1);
Plotly.restyle('myDiv', update_HD, 2);
Plotly.restyle('myDiv', update_PL, 0);
Plotly.restyle('myDiv', update_HD, 1);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment