Algorithm-TimelinePacking

 view release on metacpan or  search on metacpan

examples/conference.html  view on Meta::CPAN

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>TinfoilConf 2024 - Timeline Demo</title>
    <script src="https://d3js.org/d3.v7.min.js"></script>
    <style>
        * { box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            margin: 0; padding: 20px; background: #f8f9fa; color: #333;
        }
        h1 { margin-top: 0; color: #2c3e50; }
        .subtitle { color: #666; margin-bottom: 20px; }
        .container { max-width: 1200px; margin: 0 auto; }
        #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>

examples/generate_demo.pl  view on Meta::CPAN

# Generate complete HTML document
print <<"HTML";
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Timeline Demo</title>
    <script src="https://d3js.org/d3.v7.min.js"></script>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            margin: 20px;
            background: #f5f5f5;
        }
        h1 {
            color: #333;
        }
        .info {
            margin-bottom: 20px;
            color: #666;
        }

examples/hadoop-jobs.html  view on Meta::CPAN

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Hadoop Jobs Timeline - Demo</title>
    <script src="https://d3js.org/d3.v7.min.js"></script>
    <style>
        * { box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            margin: 0; padding: 20px; background: #f8f9fa; color: #333;
        }
        h1 { margin-top: 0; color: #2c3e50; }
        .subtitle { color: #666; margin-bottom: 20px; }
        .container { max-width: 1400px; margin: 0 auto; }
        #chart {
            background: #fff; border-radius: 8px; padding: 20px;
            overflow-x: auto; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        svg { overflow: visible; }
        rect {
            stroke: rgba(0,0,0,0.1); stroke-width: 0.5;
            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">



( run in 1.455 second using v1.01-cache-2.11-cpan-5735350b133 )