Skip to content

Commit

Permalink
added links and pictures to the news timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
gomugomu committed Jul 13, 2014
1 parent 471f710 commit 6a9e35a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions views/contracts.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
<script type="text/javascript" src="bower_components/d3/d3.js"></script>
<script>
var width = 1000,
height = 600;
var width = $("#graph").width(),
aspect = 500 / 950;
var color = d3.scale.category20();
var force = d3.layout.force()
.charge(-60)
.linkDistance(60)
.size([width, height]);
.size([width, width*aspect]);
var svg = d3.select("#graph").append("svg")
.attr("width", width)
.attr("height", height);
.attr("height", width*aspect);
d3.json("data/contracts-2013.json", function(error, graph) {
force.nodes(graph.nodes)
Expand Down
8 changes: 5 additions & 3 deletions views/timeline.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
for (i = 0; i< data.resultSize; i++) {
var article = data.results[i];
results[results.length] = {id: article.id, content: article.title, start: article.dateLive};
var link = "<a href='" + article.link + "'>" + article.title + "</a>";
var thumbnail = "<p><img src='" + article.thumbnailImage.link + "'></p>";
results[results.length] = {id: article.id, content: link + thumbnail, start: article.dateLive};
}
// Configuration for the Timeline
var options = {
start: '2014-04-25',
end: '2014-07-01',
start: '2014-05-01',
end: '2014-05-20',
orientation: 'top',
height: '300px'
};
Expand Down

0 comments on commit 6a9e35a

Please sign in to comment.