add elevation
Gitea Actions Demo / build_and_push (push) Successful in 1m24s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m24s
Details
This commit is contained in:
parent
18c8174d2d
commit
40a2510b71
|
|
@ -171,9 +171,9 @@ const chartOptions = {
|
|||
yAxes: {
|
||||
type: 'logarithmic',
|
||||
position: 'right',
|
||||
stacked: true,
|
||||
stacked: false,
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
beginAtZero: false
|
||||
},
|
||||
gridLines: {
|
||||
display: true
|
||||
|
|
@ -206,6 +206,7 @@ const chartOptions = {
|
|||
return ["Скорость: " + Math.floor(data.value.datasets[0].data[context.dataIndex]),
|
||||
"Пульс: " + data.value.datasets[1].data[context.dataIndex],
|
||||
"Мощность: " + data.value.datasets[2].data[context.dataIndex],
|
||||
"Подъем: " + data.value.datasets[3].data[context.dataIndex],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -242,9 +243,10 @@ const initWorkout = (id: string) => {
|
|||
let heart_rate = [];
|
||||
let power = [];
|
||||
let coords = [];
|
||||
let elevation = [];
|
||||
for (let i in response.data.results) {
|
||||
response.data.results[i].lang;
|
||||
response.data.results[i].lang;
|
||||
console.log(response.data.results[i].elevation, response.data.results[i].power);
|
||||
elevation.push(response.data.results[i].elevation);
|
||||
times.push(response.data.results[i].time);
|
||||
speed.push(msToKmh(response.data.results[i].speed));
|
||||
power.push(response.data.results[i].power);
|
||||
|
|
@ -259,6 +261,7 @@ const initWorkout = (id: string) => {
|
|||
{ radius: 0, label: 'Скорость', borderColor: '#00aa00', backgroundColor: '#00aa00', data: speed },
|
||||
{ radius: 0, label: 'Пульс', borderColor: '#990000', backgroundColor: '#990000', data: heart_rate, },
|
||||
{ radius: 0, label: 'Мощность', borderColor: '#cccccc', backgroundColor: '#cccccc', data: power, },
|
||||
{ radius: 0, label: 'Подъем', borderColor: '#000', backgroundColor: '#000', data: elevation, },
|
||||
]
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue