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
27654be0
Commit
27654be0
authored
Mar 06, 2015
by
Mathieu Giraud
Browse files
scatterPlot.js: bar_x is now the middle of the bar, computed with .posBarLabel()
parent
c9b6ae40
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/scatterPlot.js
View file @
27654be0
...
...
@@ -941,10 +941,10 @@ ScatterPlot.prototype = {
this
.
nodes
[
i
].
bar_w
=
0
;
}
k
=
0
;
k
=
1
;
for
(
var
i
in
this
.
barTab
)
{
var
y_pos
=
0
var
x_pos
=
((
k
+
0.1
)
/
tab_length
)
;
var
x_pos
=
this
.
axisX
.
posBarLabel
(
k
,
tab_length
)
for
(
var
j
in
this
.
barTab
[
i
]){
var
cloneID
=
this
.
barTab
[
i
][
j
]
...
...
@@ -982,7 +982,7 @@ ScatterPlot.prototype = {
return
"
bar
"
+
d
.
id
;
})
.
attr
(
"
width
"
,
function
(
d
)
{
return
d
.
bar_w
*
self
.
gridSizeW
})
.
attr
(
"
x
"
,
function
(
d
)
{
return
d
.
bar_x
*
self
.
gridSizeW
+
self
.
marge_left
})
.
attr
(
"
x
"
,
function
(
d
)
{
return
(
d
.
bar_x
-
d
.
bar_w
/
2
)
*
self
.
gridSizeW
+
self
.
marge_left
})
.
attr
(
"
height
"
,
function
(
d
)
{
return
d
.
bar_h
*
self
.
gridSizeH
})
.
attr
(
"
y
"
,
function
(
d
)
{
return
(
1
-
d
.
bar_y
)
*
self
.
gridSizeH
+
self
.
marge_top
})
.
style
(
"
fill
"
,
function
(
d
)
{
return
(
self
.
m
.
clone
(
d
.
id
).
getColor
())
})
...
...
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