Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# By Ubuntu
# Via Ubuntu
* 'master' of https://github.com/HalfdanJ/BalloonGrapher:
  blah
  • Loading branch information
HalfdanJ committed Aug 24, 2015
2 parents ab76ec5 + 69039ee commit ec6af39
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 30 deletions.
14 changes: 9 additions & 5 deletions Visualizer/css/style.css
Expand Up @@ -17,7 +17,7 @@ text {


.simulation path {
stroke: rgba(0,0,0,0.4);
stroke: rgba(30,30,30,1.0);
stroke-width: 5;
fill: none;
}
Expand All @@ -36,7 +36,6 @@ text {
stroke: rgba(255,0,0,1);
stroke-width: 2;
fill: none;

}

.liveLabel {
Expand All @@ -53,10 +52,15 @@ text {


.tick text{
font-size: 20px;
font-size: 25px;
fill:rgb(70,70,70);
}

.tick line{
opacity: 0.4;
stroke:black;
stroke-width: 3px;
stroke:rgba(30,30,30,1.0);
}

.heightText {
fill:rgba(70,70,70,1.0);
}
2 changes: 1 addition & 1 deletion Visualizer/index.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
<meta http-equiv="refresh" content="5" >
<!-- <meta http-equiv="refresh" content="5" >-->

</head>

Expand Down
49 changes: 26 additions & 23 deletions Visualizer/js/height.js
Expand Up @@ -13,12 +13,12 @@ var DK = d3.locale( {
"shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});

var startTime = moment('15:10', 'HH:mm');
var endTime = startTime.clone().add(3,'hours');
var startTime = moment('18:45', 'HH:mm');
var endTime = startTime.clone().add(2.5,'hours');
var cheatOffset = 0;

var bottomHeight = 0.18;
var sideWidth = 0.20;
var bottomHeight = 0.195;
var sideWidth = 0.19;

var chart = {
heightData: null,
Expand Down Expand Up @@ -70,7 +70,7 @@ var chart = {

this.y = d3.scale.linear()
.domain([
0,40000,
0,45000,
])
.range([height, height*(1-bottomHeight)]);

Expand Down Expand Up @@ -130,20 +130,13 @@ var chart = {
.attr('class', 'liveArea')


this.liveHeight = svg
.append('path')
.classed('line liveheight',true)

this.liveHeightText = svg
.append('text')



this.liveBox = svg.append('g')
.classed('livenumbers',true)
.attr("transform", "translate("+width*(1-sideWidth)+"," + 0 + ")")


var y = 50;
var y = 70;
var lHeight = 30;
var bHeight = 70;

Expand Down Expand Up @@ -264,24 +257,34 @@ var chart = {
.attr("d", this.valueline);


// Add the Y Axis
svg.append("g")
.attr("class", "y axis")
.call(yAxis);

// Add the X Axis
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + height + ")")
.attr("transform", "translate(0," + (height) + ")")
.call(xAxis);

// Add the Y Axis
svg.append("g")
.attr("class", "y axis")
.call(yAxis);


svg.selectAll('.y.axis text')
.attr("dx", 10)
.attr("dx", width-130)
.style("text-anchor", "start");

svg.selectAll('.x.axis text')
.attr("dy", -15)
.attr("dy", +30 -height*bottomHeight)

this.liveHeight = svg
.append('path')
.classed('line liveheight',true)

this.liveHeightText = svg
.append('text')
.classed('heightText',true)



},
Expand Down Expand Up @@ -360,11 +363,11 @@ var chart = {
this.liveTemp
.text(DK.numberFormat(',')(Math.round(lastGraw.temp * 10) / 10) + " °C")
this.livePreassure
.text(DK.numberFormat(',')(Math.round(lastGraw.tryk* 10) / 10) + " hPa")
.text(DK.numberFormat(',')(Math.round(lastGraw.tryk* 10) / 10) + " mbar")
this.liveFugtighed
.text(DK.numberFormat(',')(Math.round(lastGraw.fugtighed * 10) / 10) + " %")
this.liveWind
.text(DK.numberFormat(',')(Math.round(lastGraw.windspeed * 10) / 10) + " knop")
.text(DK.numberFormat(',')(Math.round(lastGraw.windspeed*0.514 * 10) / 10) + " m/s")
}
}

Expand Down
2 changes: 1 addition & 1 deletion app.js
Expand Up @@ -10,7 +10,7 @@ var fs = require('fs');


//var aprsName = 'OZ2CLJ-11';
var aprsName = 'SQ5AM-11';
var aprsName = 'OZ2CLJ-11';

var grawFilePath = process.env.GRAW_PATH || '../files/';

Expand Down

0 comments on commit ec6af39

Please sign in to comment.