mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
using forward chaining (like rest of the project)
This commit is contained in:
parent
10c8fc6bf3
commit
e9b1df35a1
1 changed files with 33 additions and 33 deletions
|
@ -47,45 +47,45 @@ function tab_initialize_sensors() {
|
||||||
|
|
||||||
var helpers = {selector: selector, dynamicHeightDomain: !heightDomain};
|
var helpers = {selector: selector, dynamicHeightDomain: !heightDomain};
|
||||||
|
|
||||||
helpers.widthScale = d3.scale.linear().
|
helpers.widthScale = d3.scale.linear()
|
||||||
clamp(true).
|
.clamp(true)
|
||||||
domain([(sampleNumber - 299), sampleNumber]).
|
.domain([(sampleNumber - 299), sampleNumber])
|
||||||
range([0, width]);
|
.range([0, width]);
|
||||||
|
|
||||||
helpers.heightScale = d3.scale.linear().
|
helpers.heightScale = d3.scale.linear()
|
||||||
clamp(true).
|
.clamp(true)
|
||||||
domain(heightDomain || [1, -1]).
|
.domain(heightDomain || [1, -1])
|
||||||
range([height, 0]);
|
.range([height, 0]);
|
||||||
|
|
||||||
helpers.xGrid = d3.svg.axis().
|
helpers.xGrid = d3.svg.axis()
|
||||||
scale(helpers.widthScale).
|
.scale(helpers.widthScale)
|
||||||
orient("bottom").
|
.orient("bottom")
|
||||||
ticks(5).
|
.ticks(5)
|
||||||
tickSize(-height, 0, 0).
|
.tickSize(-height, 0, 0)
|
||||||
tickFormat("");
|
.tickFormat("");
|
||||||
|
|
||||||
helpers.yGrid = d3.svg.axis().
|
helpers.yGrid = d3.svg.axis()
|
||||||
scale(helpers.heightScale).
|
.scale(helpers.heightScale)
|
||||||
orient("left").
|
.orient("left")
|
||||||
ticks(5).
|
.ticks(5)
|
||||||
tickSize(-width, 0, 0).
|
.tickSize(-width, 0, 0)
|
||||||
tickFormat("");
|
.tickFormat("");
|
||||||
|
|
||||||
helpers.xAxis = d3.svg.axis().
|
helpers.xAxis = d3.svg.axis()
|
||||||
scale(helpers.widthScale).
|
.scale(helpers.widthScale)
|
||||||
ticks(5).
|
.ticks(5)
|
||||||
orient("bottom").
|
.orient("bottom")
|
||||||
tickFormat(function(d) {return d;});
|
.tickFormat(function(d) {return d;});
|
||||||
|
|
||||||
helpers.yAxis = d3.svg.axis().
|
helpers.yAxis = d3.svg.axis()
|
||||||
scale(helpers.heightScale).
|
.scale(helpers.heightScale)
|
||||||
ticks(5).
|
.ticks(5)
|
||||||
orient("left").
|
.orient("left")
|
||||||
tickFormat(function(d) {return d;});
|
.tickFormat(function(d) {return d;});
|
||||||
|
|
||||||
helpers.line = d3.svg.line().
|
helpers.line = d3.svg.line()
|
||||||
x(function(d) { return helpers.widthScale(d[0]); }).
|
.x(function(d) { return helpers.widthScale(d[0]); })
|
||||||
y(function(d) { return helpers.heightScale(d[1]); });
|
.y(function(d) { return helpers.heightScale(d[1]); });
|
||||||
|
|
||||||
return helpers;
|
return helpers;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue