Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
2be2d705
Commit
2be2d705
authored
Nov 28, 2019
by
marc
Committed by
marc duez
Jan 24, 2020
Browse files
scatterplot.js : fix legends for d3V5
parent
9ea7264d
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/scatterPlot.js
View file @
2be2d705
...
...
@@ -1393,12 +1393,12 @@ ScatterPlot.prototype = {
//LEGENDE
leg
=
this
.
axis_x_container
.
selectAll
(
"
text
"
)
.
data
(
data
);
leg
.
enter
()
.
append
(
"
text
"
);
leg
.
exit
()
.
remove
();
leg
.
on
(
"
click
"
,
function
(
d
){
.
remove
()
.
exit
()
.
data
(
data
)
.
enter
()
.
append
(
"
text
"
)
.
on
(
"
click
"
,
function
(
d
){
self
.
m
.
unselectAllUnlessKey
(
d3
.
event
)
var
listToSelect
=
[];
var
halfRangeColumn
=
0.5
;
...
...
@@ -1468,12 +1468,11 @@ ScatterPlot.prototype = {
//this.AXIS
lines
=
this
.
axis_x_container
.
selectAll
(
"
line
"
)
.
data
(
data
);
lines
.
enter
()
.
append
(
"
line
"
);
lines
.
exit
()
.
remove
();
lines
.
remove
()
.
exit
()
.
data
(
data
)
.
enter
()
.
append
(
"
line
"
)
.
attr
(
"
x1
"
,
function
(
d
)
{
return
self
.
gridSizeW
*
d
.
pos
+
self
.
margin
[
3
];
})
...
...
@@ -1514,12 +1513,12 @@ ScatterPlot.prototype = {
//LEGENDE
leg
=
this
.
axis_y_container
.
selectAll
(
"
text
"
)
.
data
(
data
);
leg
.
enter
()
.
append
(
"
text
"
);
leg
.
exit
()
.
remove
();
leg
.
on
(
"
click
"
,
function
(
d
){
.
remove
()
.
exit
()
.
data
(
data
)
.
enter
()
.
append
(
"
text
"
)
.
on
(
"
click
"
,
function
(
d
){
if
(
self
.
mode
!=
this
.
MODE_BAR
){
// Multi-selection by clicking on a legend
self
.
m
.
unselectAllUnlessKey
(
d3
.
event
)
...
...
@@ -1571,12 +1570,11 @@ ScatterPlot.prototype = {
//this.AXIS
lines
=
this
.
axis_y_container
.
selectAll
(
"
line
"
)
.
data
(
data
);
lines
.
enter
()
.
append
(
"
line
"
);
lines
.
exit
()
.
remove
();
lines
.
remove
()
.
exit
()
.
data
(
data
)
.
enter
()
.
append
(
"
line
"
)
.
attr
(
"
x1
"
,
function
(
d
)
{
return
self
.
margin
[
3
];
})
...
...
@@ -1642,12 +1640,11 @@ ScatterPlot.prototype = {
this
.
label_container
.
style
(
"
display
"
,
""
);
//LEGENDE
leg
=
this
.
label_container
.
selectAll
(
"
.sp_system_label
"
)
.
data
(
data
);
leg
.
enter
()
.
append
(
"
div
"
);
leg
.
exit
()
.
remove
();
leg
.
remove
()
.
exit
()
.
data
(
data
)
.
enter
()
.
append
(
"
div
"
)
.
style
(
"
left
"
,
function
(
d
)
{
return
""
+
(
d
.
x
*
self
.
resizeW
+
self
.
margin
[
3
])
+
"
px
"
})
...
...
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