I recommend using a combination of the first two images, especially the second. Essentially it is a 1D heat map.
It's pretty easy to create one using HTML, CSS, and JS:
<!-- HTML -->
<div class="bar"></div>
/* CSS */
.bar {
height:30px;
border:1px darkgray solid;
width:500px;
position:relative;
overflow:hidden;
}
.bar span {
width:10px;
height:30px;
background-image:linear-gradient(to right, transparent, red, transparent);
position:absolute;
top:0;
}
// JS
function HeatBar(bar){
this._bar = bar;
}
HeatBar.prototype.createTick = function(/* float{0,1} */ atOffset, opacity){
var bw = this._bar.offsetWidth * atOffset;
var el = document.createElement("span");
el.style.opacity = opacity;
el.style.left = bw + "px";
this._bar.appendChild(el);
};
var barElem = document.querySelector(".bar"),
bar = new HeatBar(barElem),
numTotal = 50;
for(var x = 0; x < numTotal; x++)
bar.createTick(Math.random(), 10/numTotal);
Demo. Notice that I change the opacity based on the number of total elements.
You can also add functionality to show just the lines without gradient on click if you'd like, which looks like this.
The additional code:
/* CSS */
.removeGradient span {
background-image:none;
background-color:red;
transform:scaleX(.2);
}
// JS
barElem.addEventListener('mousedown', function() {
this.classList.add("removeGradient");
}, false);
barElem.addEventListener('mouseup', function() {
this.classList.remove("removeGradient");
}, false);
You could also layer them to show different events using multiple .bar
elements stacked on top of each other (using absolute
position and the color changed) or just change the color of lines on one .bar
element using some JS logic which would end up looking similar to this: