Skip to content
Snippets Groups Projects
Commit c4d88bcb authored by Stahl, Merle's avatar Stahl, Merle
Browse files

Größe angepasst

parent 725f8ad5
No related branches found
No related tags found
1 merge request!20Main
......@@ -144,7 +144,6 @@ function success(graph){
}
function failure(graph){
localStorage.setItem("oldjson","irgendwaswasimmergespeichertwirdwennkeinejsondaist")
}
var intervalId=window.setInterval(function(){
......
......@@ -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);
......
......@@ -11,8 +11,8 @@
display: flex;
justify-content: center;
position: absolute;
left: 455px;
top: 575px;
left: 75px;
top: 580px;
transition-duration: 0.4s;
border-radius: 3px;
border: 1px solid #909090;
......@@ -40,7 +40,7 @@
width: 146px;
position: absolute;
top: 181px;
left: 1114px;
left: 624px;
border-radius: 0;
border: 1px solid #909090;
}
......@@ -50,7 +50,7 @@
position: absolute;
display: inline-block;
top: 181px;
left: 968px;
left: 478px;
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: 968px;
left: 478px;
display: inline-block;
margin: 0;
}
......@@ -70,16 +69,21 @@
div.textbox {
width: 270px;
min-height: 200px;
max-height:370px;
max-height: 375px;
padding: 10px;
border: 1px solid #999;
position: absolute;
top: 200px;
left: 968px;
left: 478px;
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="960" height="560"></svg>
<svg class="graph" width="470" 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
<<<<<<< HEAD
{
"nodes": [
{
......@@ -113,6 +112,3 @@
}
]
}
=======
{"nodes": [], "links": []}
>>>>>>> upstream/main
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment