Skip to content

Commit

Permalink
Chart now spans top correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
tmostak committed Sep 15, 2013
1 parent 8daa38c commit 8a498b5
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 9 deletions.
9 changes: 7 additions & 2 deletions css/chart.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ rect.pane {

.chart-settings {
float: left;
//width: 150px;
margin-top:20px;
//position:absolute;
position:relative;
width: 400px;
height:100%;
//margin-top:0px;
}

.chart-compare {
position: relative;
margin-top:10px;
font-size: 12px;
}

Expand Down Expand Up @@ -133,3 +137,4 @@ rect.pane {
}



2 changes: 1 addition & 1 deletion css/map.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ div#tweets {

div#cloud {
margin-top: 0px;
height: 22%;
height: 20%;
}

div#sortPref {
Expand Down
Binary file added img/heatmap-button-bw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/heatmap-button-desat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/heatmap-button-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/point-button-bw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/point-button-desat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/point-button-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/target.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/twitter-bird.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions js/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ var LineChart =
.attr("class", "chart-details");


var margin = {top: 25, right: 30, bottom: 25, left: 420},
var margin = {top: 25, right: 30, bottom: 25, left: 425},
//width = 400 - margin.left - margin.right,
width = 1980 - margin.left - margin.right,
height = 160 - margin.top - margin.bottom;
width = $(window).width() - margin.left - margin.right,
//height = 160 - margin.top - margin.bottom;
height = 200 - margin.top - margin.bottom;

this.x = d3.time.scale().range([0, width]);
this.y = d3.scale.linear().range([height, 0]);
Expand All @@ -79,10 +80,10 @@ var LineChart =
.attr("class", "chart")
.append("svg")
//.attr("width", width + margin.left + margin.right)
.attr("width", width )
.attr("width", width + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + 50 + "," + margin.top + ")");
.attr("transform", "translate(" + 60 + "," + margin.top + ")");
//.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
//.attr("margin-left", margin.left);
this.elems.svg = svg;
Expand Down Expand Up @@ -114,7 +115,8 @@ var LineChart =

this.elems.info = this.elems.container.select("svg").append("g")
.attr("class", "info")
.attr("transform", "translate(" + margin.left + "," + (margin.top - 5) + ")");
//.attr("transform", "translate(" + margin.left + "," + (margin.top - 5) + ")");
.attr("transform", "translate(" + 60 + "," + (margin.top - 5) + ")");

this.elems.info.append("text")
.attr("class", "date");
Expand Down

0 comments on commit 8a498b5

Please sign in to comment.