1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

using forward chaining (like rest of the project)

This commit is contained in:
cTn 2014-04-18 01:07:10 +02:00
parent 10c8fc6bf3
commit e9b1df35a1

View file

@ -47,45 +47,45 @@ function tab_initialize_sensors() {
var helpers = {selector: selector, dynamicHeightDomain: !heightDomain};
helpers.widthScale = d3.scale.linear().
clamp(true).
domain([(sampleNumber - 299), sampleNumber]).
range([0, width]);
helpers.widthScale = d3.scale.linear()
.clamp(true)
.domain([(sampleNumber - 299), sampleNumber])
.range([0, width]);
helpers.heightScale = d3.scale.linear().
clamp(true).
domain(heightDomain || [1, -1]).
range([height, 0]);
helpers.heightScale = d3.scale.linear()
.clamp(true)
.domain(heightDomain || [1, -1])
.range([height, 0]);
helpers.xGrid = d3.svg.axis().
scale(helpers.widthScale).
orient("bottom").
ticks(5).
tickSize(-height, 0, 0).
tickFormat("");
helpers.xGrid = d3.svg.axis()
.scale(helpers.widthScale)
.orient("bottom")
.ticks(5)
.tickSize(-height, 0, 0)
.tickFormat("");
helpers.yGrid = d3.svg.axis().
scale(helpers.heightScale).
orient("left").
ticks(5).
tickSize(-width, 0, 0).
tickFormat("");
helpers.yGrid = d3.svg.axis()
.scale(helpers.heightScale)
.orient("left")
.ticks(5)
.tickSize(-width, 0, 0)
.tickFormat("");
helpers.xAxis = d3.svg.axis().
scale(helpers.widthScale).
ticks(5).
orient("bottom").
tickFormat(function(d) {return d;});
helpers.xAxis = d3.svg.axis()
.scale(helpers.widthScale)
.ticks(5)
.orient("bottom")
.tickFormat(function(d) {return d;});
helpers.yAxis = d3.svg.axis().
scale(helpers.heightScale).
ticks(5).
orient("left").
tickFormat(function(d) {return d;});
helpers.yAxis = d3.svg.axis()
.scale(helpers.heightScale)
.ticks(5)
.orient("left")
.tickFormat(function(d) {return d;});
helpers.line = d3.svg.line().
x(function(d) { return helpers.widthScale(d[0]); }).
y(function(d) { return helpers.heightScale(d[1]); });
helpers.line = d3.svg.line()
.x(function(d) { return helpers.widthScale(d[0]); })
.y(function(d) { return helpers.heightScale(d[1]); });
return helpers;
}