Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1,426
Issues
1,426
List
Boards
Labels
Milestones
Merge Requests
49
Merge Requests
49
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
6629b457
Commit
6629b457
authored
Oct 03, 2018
by
Mathieu Giraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
js/{generic,numerical}_axis.js: define and use .ignore(clone) to adapt axes when .adapt is true
See
#3503
. fix gen
parent
94cf6275
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
browser/js/generic_axis.js
browser/js/generic_axis.js
+12
-0
browser/js/numerical_axis.js
browser/js/numerical_axis.js
+3
-0
No files found.
browser/js/generic_axis.js
View file @
6629b457
...
...
@@ -42,6 +42,7 @@ function GenericAxis (reverse, can_undefined) {
this
.
reverse
=
false
;
if
(
typeof
reverse
!==
"
undefined
"
)
this
.
reverse
=
reverse
this
.
adapt
=
false
}
GenericAxis
.
prototype
=
{
...
...
@@ -62,9 +63,14 @@ GenericAxis.prototype = {
this
.
populateLabels
(
labels
,
sort
);
this
.
populateValueMapping
();
return
this
;
},
ignore
:
function
(
clone
)
{
return
this
.
adapt
&&
clone
.
isFiltered
},
compareLabels
:
function
(
a
,
b
)
{
if
(
typeof
a
===
'
undefined
'
)
return
(
typeof
b
===
'
undefined
'
)
?
0
:
-
1
;
if
(
typeof
b
===
'
undefined
'
)
return
(
typeof
a
===
'
undefined
'
)
?
0
:
1
;
...
...
@@ -86,6 +92,8 @@ GenericAxis.prototype = {
else
{
for
(
var
i
=
0
;
i
<
values
.
length
;
i
++
)
{
var
value
=
values
[
i
];
if
(
this
.
ignore
(
value
))
continue
;
var
convert
=
this
.
applyConverter
(
value
);
var
pos
;
if
(
labels
.
indexOf
(
convert
)
!=
-
1
)
{
...
...
@@ -122,6 +130,8 @@ GenericAxis.prototype = {
// if (value.isVirtual())
// continue ; // ? pas toujours ?
if
(
this
.
ignore
(
value
))
continue
;
var
convert
=
this
.
applyConverter
(
value
);
if
(
typeof
round
!==
'
undefined
'
)
...
...
@@ -207,6 +217,8 @@ GenericAxis.prototype = {
var
has_undefined
;
for
(
var
i
=
0
;
i
<
values
.
length
;
i
++
)
{
var
value
=
values
[
i
];
if
(
this
.
ignore
(
value
))
continue
;
var
key
=
this
.
applyConverter
(
value
);
if
(
typeof
key
==
'
undefined
'
)
{
has_undefined
=
true
;
...
...
browser/js/numerical_axis.js
View file @
6629b457
...
...
@@ -81,6 +81,9 @@ NumericalAxis.prototype = Object.create(GenericAxis.prototype);
if
(
typeof
labels
==
"
undefined
"
)
{
for
(
var
i
in
this
.
values
){
if
(
this
.
ignore
(
this
.
values
[
i
]))
continue
;
if
(
!
this
.
values
[
i
].
isVirtual
())
{
var
tmp
=
this
.
applyConverter
(
this
.
values
[
i
]);
...
...
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