Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
8bb8361d
Commit
8bb8361d
authored
Aug 13, 2018
by
Mathieu Giraud
Browse files
js/scatterPlot.js, js/generic_axis.js: remove .barTab
It is .axisX.value_mapping.
parent
1fc9cabd
Pipeline
#36673
failed with stages
in 3 minutes and 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
browser/js/generic_axis.js
View file @
8bb8361d
...
...
@@ -233,14 +233,6 @@ GenericAxis.prototype = {
return
value
;
},
computeBarTab
:
function
(
ref
)
{
ref
.
barTab
=
{};
for
(
var
key
in
this
.
value_mapping
)
{
var
vkey
=
(
typeof
key
==
'
undefined
'
)
?
'
?
'
:
key
ref
.
barTab
[
vkey
]
=
this
.
value_mapping
[
key
];
}
},
posBarLabel
:
function
(
i
)
{
var
length
=
Object
.
keys
(
this
.
value_mapping
).
length
;
return
(
i
-
0.5
)
/
length
;
...
...
browser/js/scatterPlot.js
View file @
8bb8361d
...
...
@@ -564,8 +564,6 @@ ScatterPlot.prototype = {
//split clones into bar (axisX)
this
.
axisX
.
init
(
this
.
m
.
clones
,
this
.
available_axis
[
this
.
splitX
].
fct
);
this
.
axisX
.
computeBarTab
(
this
)
//sort each bar (axisY)
...
...
@@ -615,8 +613,8 @@ ScatterPlot.prototype = {
if
(
va
.
constructor
===
Number
)
return
(
vb
.
constructor
===
Number
)
?
(
va
-
vb
)
:
-
1
;
}
for
(
var
i
in
this
.
barTab
)
{
this
.
barTab
[
i
].
sort
(
compare
);
for
(
var
i
in
this
.
axisX
.
value_mapping
)
{
this
.
axisX
.
value_mapping
[
i
].
sort
(
compare
);
}
return
this
;
...
...
@@ -635,10 +633,10 @@ ScatterPlot.prototype = {
* */
computeBarMax
:
function
()
{
var
bar_max
=
0
;
for
(
var
i
in
this
.
barTab
)
{
for
(
var
i
in
this
.
axisX
.
value_mapping
)
{
var
tmp
=
0
;
for
(
var
j
in
this
.
barTab
[
i
])
{
var
clone
=
this
.
barTab
[
i
][
j
]
for
(
var
j
in
this
.
axisX
.
value_mapping
[
i
])
{
var
clone
=
this
.
axisX
.
value_mapping
[
i
][
j
]
if
(
this
.
includeBar
(
clone
)){
tmp
+=
clone
.
getSize
();
}
...
...
@@ -654,7 +652,7 @@ ScatterPlot.prototype = {
* */
computeBarTab
:
function
()
{
var
bar_max
=
nice_ceil
(
this
.
computeBarMax
());
var
tab_length
=
Object
.
keys
(
this
.
barTab
).
length
;
var
tab_length
=
Object
.
keys
(
this
.
axisX
.
value_mapping
).
length
;
var
width
=
Math
.
min
(
0.08
,
0.8
/
tab_length
);
...
...
@@ -667,12 +665,12 @@ ScatterPlot.prototype = {
}
k
=
1
;
for
(
var
i
in
this
.
barTab
)
{
for
(
var
i
in
this
.
axisX
.
value_mapping
)
{
var
y_pos
=
0
var
x_pos
=
this
.
axisX
.
pos_from_value
(
i
).
pos
for
(
var
j
in
this
.
barTab
[
i
]){
var
clone
=
this
.
barTab
[
i
][
j
]
for
(
var
j
in
this
.
axisX
.
value_mapping
[
i
]){
var
clone
=
this
.
axisX
.
value_mapping
[
i
][
j
]
var
cloneID
=
clone
.
index
;
if
(
this
.
includeBar
(
clone
)){
height
=
clone
.
getSize
()
/
bar_max
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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