Created
August 28, 2012 19:04
-
-
Save lenagroeger/3502514 to your computer and use it in GitHub Desktop.
generating start dates for bars on a horizontal timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data.each do |row| | |
el=<<-HTML | |
<div class="drones-bar" style="width:#{(row["duration"].to_f/5)}px; margin-left: #{(row["days_from_start"].to_f/5)}px;" data-id="#{row["number"]}"><p class="deaths"><a href="#{row["link"]}">"#{row["deaths"]}"</a></p></div> | |
HTML | |
html << el | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment