Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iPPIDB
ippidb-web
Commits
2e12f743
Commit
2e12f743
authored
Mar 15, 2021
by
Fabien MAREUIL
Browse files
plotly legend order
parent
bf42ceaf
Pipeline
#50870
passed with stages
in 25 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ippisite/ippidb/static/js/targetcentrict_networks.js
View file @
2e12f743
...
...
@@ -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
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment