1
0
Fork 0

Added line between points and datetime X axis labels to telemetry graph

merge-requests/111/head
keikreutler 2016-11-20 19:02:37 +02:00 committed by Nikos Roussos
parent 0c144e55b5
commit 7aec53ab4c
No known key found for this signature in database
GPG Key ID: BADFF1767BA7C8E1
1 changed files with 4 additions and 2 deletions

View File

@ -73,7 +73,7 @@ d3.custom.barChart = function module(telemetry_key) {
var x1 = d3.scale.ordinal()
.domain(_data.map(function(d, i){
return i ;
return parseDate(d.telemetry.observation_datetime);
}))
.rangeRoundBands([0, chartW], 0.1);
@ -115,8 +115,10 @@ d3.custom.barChart = function module(telemetry_key) {
.transition()
.call(yAxis);
// Axis labels
svg.append("text")
.attr("transform", "translate(" + (chartW / 2) + " ," + (chartH + config.margin.bottom + config.margin.top) + ")")
.attr("transform", "translate(" + (chartW + config.margin.right + 18) + " ," + (chartH + 10) + ")")
.style("text-anchor", "middle")
.text("Observation Datetime");