Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
e1783e4c
Commit
e1783e4c
authored
12 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
SP-173: Further improvements of demo script
SVN: 25941
parent
c88f0e4e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rtd_phosphonetx/source/html/demoapp/proteomics-demo.js
+25
-7
25 additions, 7 deletions
rtd_phosphonetx/source/html/demoapp/proteomics-demo.js
rtd_phosphonetx/source/html/demoapp/tree.css
+5
-0
5 additions, 0 deletions
rtd_phosphonetx/source/html/demoapp/tree.css
with
30 additions
and
7 deletions
rtd_phosphonetx/source/html/demoapp/proteomics-demo.js
+
25
−
7
View file @
e1783e4c
...
...
@@ -49,10 +49,13 @@ function displayResultsAsGraph(data)
return
;
}
var
xOffset
=
3
0
,
yOffset
=
1
0
,
var
xOffset
=
7
0
,
yOffset
=
4
0
,
xStep
=
200
,
yStep
=
30
;
yStep
=
30
,
xLabel
=
-
30
,
yLabel
=
18
,
columnNames
=
[
'
Biological Experiment
'
,
'
Biological Sample
'
,
'
MS Injection Sample
'
,
'
Search Experiment
'
,
'
Protein
'
];
var
graph
=
vis
.
selectAll
(
"
svg
"
).
data
([
data
]).
enter
().
append
(
"
svg:svg
"
)
.
attr
(
"
width
"
,
$
(
window
).
width
()
-
50
)
...
...
@@ -62,6 +65,14 @@ function displayResultsAsGraph(data)
.
enter
().
append
(
"
svg:g
"
)
.
attr
(
"
transform
"
,
function
(
d
,
i
)
{
return
"
translate(
"
+
(
xOffset
+
i
*
xStep
)
+
"
,
"
+
yOffset
+
"
)
"
;
});
g
.
append
(
"
svg:text
"
)
.
text
(
function
(
d
,
i
)
{
return
columnNames
[
i
];
})
.
attr
(
"
class
"
,
"
columnHeader
"
)
.
attr
(
"
text-anchor
"
,
"
middle
"
)
.
attr
(
"
x
"
,
0
)
.
attr
(
"
y
"
,
-
10
);
g
.
selectAll
(
"
path
"
).
data
(
function
(
d
)
{
return
d
[
1
];
})
.
enter
().
append
(
"
svg:path
"
)
.
attr
(
"
class
"
,
"
line
"
)
...
...
@@ -86,8 +97,8 @@ function displayResultsAsGraph(data)
.
text
(
function
(
d
)
{
return
d
.
label
;
})
.
attr
(
"
class
"
,
function
(
d
)
{
return
d
.
level
==
indexOfLinkedColumn
?
"
linked
"
:
"
notLinked
"
;})
.
attr
(
"
text-anchor
"
,
"
left
"
)
.
attr
(
"
x
"
,
-
10
)
.
attr
(
"
y
"
,
18
)
.
attr
(
"
x
"
,
xLabel
)
.
attr
(
"
y
"
,
yLabel
)
.
on
(
"
click
"
,
function
(
d
)
{
if
(
d
.
level
==
indexOfLinkedColumn
)
{
window
.
open
(
openbisUrl
+
"
/?#entity=EXPERIMENT&permId=
"
+
d
.
permId
,
'
_blank
'
);
}
...
...
@@ -108,10 +119,17 @@ function createDataModel(tableModel)
var
maps
=
[];
var
permIds
=
{};
for
(
n
=
0
;
n
<
rows
.
length
;
n
++
)
{
for
(
n
=
0
;
n
<
rows
.
length
;
n
++
)
{
row
=
rows
[
n
];
permIds
[
row
[
indexOfLinkedColumn
].
value
]
=
row
[
4
].
value
;
row
[
5
].
value
=
row
[
5
].
value
+
"
:
"
+
row
[
6
].
value
;
// concatenate accession number with description
var
accessionNumber
=
row
[
5
].
value
;
var
splitted
=
accessionNumber
.
split
(
"
|
"
);
if
(
splitted
.
length
>
1
)
{
accessionNumber
=
splitted
[
1
];
}
row
[
5
].
value
=
accessionNumber
+
"
:
"
+
row
[
6
].
value
;
// concatenate accession number with description
row
.
splice
(
6
,
1
);
// remove description
row
.
splice
(
4
,
1
);
// remove search experiment perm id
for
(
i
=
0
;
i
<
row
.
length
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
rtd_phosphonetx/source/html/demoapp/tree.css
+
5
−
0
View file @
e1783e4c
...
...
@@ -4,6 +4,11 @@
stroke-width
:
1.5px
;
}
.columnHeader
{
font
:
16px
;
font-weight
:
bold
;
}
.link
{
fill
:
none
;
stroke
:
#ccc
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment