Spaces:
Running
Running
Update modular_graph_and_candidates.py
Browse files
modular_graph_and_candidates.py
CHANGED
|
@@ -948,13 +948,17 @@ document.getElementById('toggleRed').addEventListener('change', updateVisibility
|
|
| 948 |
const timeline = __TIMELINE_DATA__;
|
| 949 |
const W = innerWidth, H = innerHeight;
|
| 950 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 951 |
// Enhanced timeline configuration for maximum horizontal spread
|
| 952 |
const MARGIN = { top: 60, right: 200, bottom: 120, left: 200 };
|
| 953 |
const CONTENT_HEIGHT = H - MARGIN.top - MARGIN.bottom;
|
| 954 |
const VERTICAL_LANES = 4; // Number of horizontal lanes for better organization
|
| 955 |
|
| 956 |
-
|
| 957 |
-
|
| 958 |
const zoomBehavior = d3.zoom()
|
| 959 |
.scaleExtent([0.1, 8])
|
| 960 |
.on('zoom', handleZoom);
|
|
@@ -969,7 +973,6 @@ svg.on("click", function(event) {
|
|
| 969 |
});
|
| 970 |
|
| 971 |
|
| 972 |
-
const g = svg.append('g');
|
| 973 |
|
| 974 |
// Time scale for chronological positioning with much wider spread
|
| 975 |
const timeExtent = d3.extent(timeline.nodes.filter(d => d.timestamp > 0), d => d.timestamp);
|
|
|
|
| 948 |
const timeline = __TIMELINE_DATA__;
|
| 949 |
const W = innerWidth, H = innerHeight;
|
| 950 |
|
| 951 |
+
// Create SVG with zoom behavior
|
| 952 |
+
const svg = d3.select('#timeline-svg');
|
| 953 |
+
const g = svg.append('g');
|
| 954 |
+
|
| 955 |
// Enhanced timeline configuration for maximum horizontal spread
|
| 956 |
const MARGIN = { top: 60, right: 200, bottom: 120, left: 200 };
|
| 957 |
const CONTENT_HEIGHT = H - MARGIN.top - MARGIN.bottom;
|
| 958 |
const VERTICAL_LANES = 4; // Number of horizontal lanes for better organization
|
| 959 |
|
| 960 |
+
|
| 961 |
+
|
| 962 |
const zoomBehavior = d3.zoom()
|
| 963 |
.scaleExtent([0.1, 8])
|
| 964 |
.on('zoom', handleZoom);
|
|
|
|
| 973 |
});
|
| 974 |
|
| 975 |
|
|
|
|
| 976 |
|
| 977 |
// Time scale for chronological positioning with much wider spread
|
| 978 |
const timeExtent = d3.extent(timeline.nodes.filter(d => d.timestamp > 0), d => d.timestamp);
|