Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CiS Projekt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ockenden, Samuel
CiS Projekt
Commits
c4d88bcb
Commit
c4d88bcb
authored
3 years ago
by
Stahl, Merle
Browse files
Options
Downloads
Patches
Plain Diff
Größe angepasst
parent
725f8ad5
No related branches found
No related tags found
1 merge request
!20
Main
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
assets/cn.js
+1
-2
1 addition, 2 deletions
assets/cn.js
assets/cn2.js
+2
-5
2 additions, 5 deletions
assets/cn2.js
assets/index.html
+72
-71
72 additions, 71 deletions
assets/index.html
assets/json_text.json
+0
-4
0 additions, 4 deletions
assets/json_text.json
with
75 additions
and
82 deletions
assets/cn.js
+
1
−
2
View file @
c4d88bcb
...
...
@@ -144,7 +144,6 @@ function success(graph){
}
function
failure
(
graph
){
localStorage
.
setItem
(
"
oldjson
"
,
"
irgendwaswasimmergespeichertwirdwennkeinejsondaist
"
)
}
var
intervalId
=
window
.
setInterval
(
function
(){
...
...
This diff is collapsed.
Click to expand it.
assets/cn2.js
+
2
−
5
View file @
c4d88bcb
...
...
@@ -49,7 +49,6 @@ var rect = svg.append("rect")
/**
* creates svg object (legend) and associated attributes
* transform
* mehr kommentare
*/
var
svg_legend
=
d3
.
select
(
"
svg.legendsvg
"
),
legend_position
=
[
65
,
95
,
125
],
...
...
@@ -159,11 +158,9 @@ var gX = svg.append("g")
d3
.
json
(
"
json_text.json
"
).
then
(
success
,
failure
)
function
success
(
graph
){
update
(
graph
.
links
,
graph
.
nodes
);
}
function
failure
(
graph
){
localStorage
.
setItem
(
"
oldjson
"
,
"
irgendwaswasimmergespeichertwirdwennkeinejsondaist
"
)
}
var
intervalId
=
window
.
setInterval
(
function
(){
...
...
@@ -211,7 +208,7 @@ function updateXAxis(nodes) {
xscale
=
d3
.
scaleLinear
()
.
domain
([
d3
.
min
(
years
)
-
1
,
d3
.
max
(
years
)
+
1
])
.
range
([
50
,
width
-
50
])
.
range
([
1
,
width
-
1
])
xAxis
.
scale
(
xscale
);
gX
.
call
(
xAxis
);
...
...
This diff is collapsed.
Click to expand it.
assets/index.html
+
72
−
71
View file @
c4d88bcb
...
...
@@ -11,8 +11,8 @@
display
:
flex
;
justify-content
:
center
;
position
:
absolute
;
left
:
45
5px
;
top
:
5
75
px
;
left
:
7
5px
;
top
:
5
80
px
;
transition-duration
:
0.4s
;
border-radius
:
3px
;
border
:
1px
solid
#909090
;
...
...
@@ -40,7 +40,7 @@
width
:
146px
;
position
:
absolute
;
top
:
181px
;
left
:
111
4px
;
left
:
62
4px
;
border-radius
:
0
;
border
:
1px
solid
#909090
;
}
...
...
@@ -50,7 +50,7 @@
position
:
absolute
;
display
:
inline-block
;
top
:
181px
;
left
:
96
8px
;
left
:
47
8px
;
border-radius
:
0
;
border
:
1px
solid
#909090
;
}
...
...
@@ -59,10 +59,9 @@
width
:
270px
;
height
:
170px
;
padding
:
10px
;
/*border: 1px solid #999;*/
position
:
absolute
;
top
:
10px
;
left
:
96
8px
;
left
:
47
8px
;
display
:
inline-block
;
margin
:
0
;
}
...
...
@@ -70,16 +69,21 @@
div
.textbox
{
width
:
270px
;
min-height
:
200px
;
max-height
:
37
0
px
;
max-height
:
37
5
px
;
padding
:
10px
;
border
:
1px
solid
#999
;
position
:
absolute
;
top
:
200px
;
left
:
96
8px
;
left
:
47
8px
;
display
:
inline-block
;
overflow-y
:
scroll
;
margin
:
0
;
}
svg
.graph
{
position
:
absolute
;
top
:
20px
}
</style>
</head>
...
...
@@ -87,7 +91,7 @@
<button
id=
"change_graph"
class=
"display"
onclick=
"display()"
>
Display Timeline
</button>
<!-- graph 576-->
<svg
class=
"graph"
width=
"
96
0"
height=
"560"
></svg>
<svg
class=
"graph"
width=
"
47
0"
height=
"560"
></svg>
<p
id=
"oldjson"
></p>
<!-- legend -->
...
...
@@ -117,18 +121,17 @@
if
(
window
.
location
.
hash
==
'
#default
'
)
{
document
.
getElementById
(
"
change_graph
"
).
innerHTML
=
'
Display Timeline
'
;
load_default
();
}
else
if
(
window
.
location
.
hash
==
'
#time
'
)
{
document
.
getElementById
(
"
change_graph
"
).
innerHTML
=
'
Display Default
'
;
load_time
();
}
else
if
(
window
.
location
.
hash
==
''
)
{
window
.
location
.
hash
=
'
default
'
;
document
.
getElementById
(
"
change_graph
"
).
innerHTML
=
'
Display Timeline
'
;
load_default
();
}
function
display
(){
if
(
window
.
location
.
hash
==
'
#time
'
)
{
display_default
();
...
...
@@ -137,15 +140,17 @@
display_time
();
}
}
function
display_default
()
{
window
.
location
.
hash
=
'
default
'
;
window
.
location
.
reload
();
}
function
display_time
()
{
window
.
location
.
hash
=
'
time
'
;
window
.
location
.
reload
();
}
function
load_default
()
{
var
htmlHeader
=
document
.
getElementsByTagName
(
"
head
"
)[
0
];
var
myScript
=
document
.
createElement
(
'
script
'
);
...
...
@@ -154,6 +159,7 @@
myScript
.
id
=
'
abc
'
;
htmlHeader
.
appendChild
(
myScript
);
}
function
load_time
()
{
var
htmlHeader
=
document
.
getElementsByTagName
(
"
head
"
)[
0
];
var
myScript
=
document
.
createElement
(
'
script
'
);
...
...
@@ -161,12 +167,7 @@
myScript
.
src
=
'
cn2.js
'
;
myScript
.
id
=
'
abc
'
;
htmlHeader
.
appendChild
(
myScript
);
}
</script>
<!-- javascript for force-directed graph
<script type="text/javascript" id="cn" src="cn.js"></script> -->
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
assets/json_text.json
+
0
−
4
View file @
c4d88bcb
<<<<<<<
HEAD
{
"nodes"
:
[
{
...
...
@@ -113,6 +112,3 @@
}
]
}
=======
{
"nodes"
:
[],
"links"
:
[]}
>>>>>>>
upstream/main
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