Sorting graph data

This commit is contained in:
Magnus Persson 2022-02-14 21:47:59 +01:00
parent 1428bec3da
commit b43874d151
2 changed files with 8 additions and 4 deletions

View File

@ -274,6 +274,10 @@
function populateChartForm(a, g) {
if( a != 0)
chartDataForm.push( { x: parseFloat(a), y: parseFloat(g) });
chartDataForm.sort(function (a, b) {
return a.x - b.x;
});
}
function populateChartCalc(a, g) {

View File

@ -2,13 +2,13 @@
"gravity-formula": "0.00000166*tilt^3+-0.00024799*tilt^2+0.01344400*tilt+0.79358248",
"angle": 45,
"a1": 25,
"a2": 35,
"a3": 45,
"a3": 35,
"a2": 45,
"a4": 55,
"a5": 65,
"g1": 1.000,
"g2": 1.010,
"g3": 1.025,
"g3": 1.010,
"g2": 1.025,
"g4": 1.040,
"g5": 1.060
}