Algorithm-TimelinePacking
view release on metacpan or search on metacpan
examples/conference.html view on Meta::CPAN
#chart {
background: white; border-radius: 8px; padding: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1); overflow-x: auto;
}
svg { overflow: visible; }
.talk rect { cursor: pointer; transition: opacity 0.2s; }
.talk:hover rect { opacity: 0.85; }
.talk text { font-size: 11px; fill: white; pointer-events: none; }
.room-label { font-size: 13px; font-weight: bold; fill: #555; }
.time-label { font-size: 12px; fill: #666; }
.legend { display: flex; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.legend-color { width: 16px; height: 16px; border-radius: 3px; }
.tooltip {
position: absolute; background: rgba(0,0,0,0.9); color: #fff;
padding: 12px; border-radius: 6px; font-size: 13px;
pointer-events: none; z-index: 1000; max-width: 280px; line-height: 1.4;
display: none;
}
.tooltip-title { font-weight: bold; font-size: 14px; margin-bottom: 6px; }
.tooltip-time { color: #aaa; margin-bottom: 4px; }
.stats { margin-top: 15px; font-size: 13px; color: #666; }
</style>
</head>
<body>
<div class="container">
<h1>TinfoilConf 2024</h1>
<p class="subtitle">The premier conference for developers who do their own research. Wake up, sheeple! Hover over sessions for details.</p>
<div id="chart"></div>
<div class="legend" id="legend"></div>
<div class="stats" id="stats"></div>
</div>
<div class="tooltip" id="tooltip">
<div class="tooltip-title" id="tooltip-title"></div>
<div class="tooltip-time" id="tooltip-time"></div>
<div id="tooltip-speaker"></div>
<div id="tooltip-track"></div>
</div>
<script>
examples/conference.html view on Meta::CPAN
.on("mousemove", function(event) {
tooltip.style("left", (event.pageX + 10) + "px")
.style("top", (event.pageY - 10) + "px");
})
.on("mouseout", function() {
tooltip.style("display", "none");
});
});
// Legend
var legend = d3.select("#legend");
Object.keys(COLORS).forEach(function(track) {
var item = legend.append("div").attr("class", "legend-item");
item.append("div").attr("class", "legend-color").style("background", COLORS[track]);
item.append("span").text(LABELS[track]);
});
// Stats
d3.select("#stats").text(INPUT.length + ' sessions arranged in ' + lines.length + ' rooms | Conference runs ' + fmt(EARLIEST) + ' - ' + fmt(EARLIEST + LATEST));
</script>
</body>
</html>
examples/hadoop-jobs.html view on Meta::CPAN
cursor: pointer; transition: opacity 0.2s;
}
rect:hover { stroke: #333; stroke-width: 2; opacity: 0.85; }
.stats { margin-top: 15px; font-size: 13px; color: #666; }
.tooltip {
position: absolute; background: rgba(0,0,0,0.9); color: #fff;
padding: 10px; border-radius: 4px; font-size: 12px;
pointer-events: none; z-index: 1000; line-height: 1.5; display: none;
}
.tooltip-title { font-weight: bold; margin-bottom: 5px; }
.legend { display: flex; gap: 20px; margin-top: 15px; font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-color { width: 20px; height: 12px; border-radius: 2px; }
</style>
</head>
<body>
<div class="container">
<h1>Hadoop MapReduce Timeline</h1>
<p class="subtitle">75 jobs arranged into parallel execution lanes. Color intensity indicates map task count. Hover for details.</p>
<div id="chart">
<svg id="timeline" width="1200"></svg>
</div>
<div class="legend">
<div class="legend-item">
<div class="legend-color" id="legend-low"></div>
<span>Few map tasks</span>
</div>
<div class="legend-item">
<div class="legend-color" id="legend-high"></div>
<span>Many map tasks</span>
</div>
</div>
<div class="stats" id="stats"></div>
</div>
<div class="tooltip" id="tooltip">
<div class="tooltip-title" id="tooltip-title"></div>
<div id="tooltip-user"></div>
examples/hadoop-jobs.html view on Meta::CPAN
// =============================================================================
// RENDERING: Display the pre-computed layout (no algorithm, just visualization)
// =============================================================================
var LINE_HEIGHT = 22;
var BAR_HEIGHT = 18;
var SCALE = 1100 / LATEST;
var colorFn = function(d) { return d3.interpolateLab("#eee", "#f00")(d); };
document.getElementById('legend-low').style.background = colorFn(0);
document.getElementById('legend-high').style.background = colorFn(1);
var svg = d3.select("#timeline");
svg.attr("height", lines.length * LINE_HEIGHT);
var tooltip = document.getElementById('tooltip');
lines.forEach(function(line, idx) {
var lineGroup = svg.append("g")
.attr("transform", "translate(0, " + (idx * LINE_HEIGHT) + ")");
( run in 0.355 second using v1.01-cache-2.11-cpan-02777c243ea )