little refactoring
Gitea Actions Demo / build_and_push (push) Successful in 1m18s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m18s
Details
This commit is contained in:
parent
72790a5753
commit
18c8174d2d
|
|
@ -203,7 +203,7 @@ const chartOptions = {
|
||||||
if (context.parsed.x !== null) {
|
if (context.parsed.x !== null) {
|
||||||
label += new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(context.parsed.y);
|
label += new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(context.parsed.y);
|
||||||
}
|
}
|
||||||
return ["Скорость: " + data.value.datasets[0].data[context.dataIndex],
|
return ["Скорость: " + Math.floor(data.value.datasets[0].data[context.dataIndex]),
|
||||||
"Пульс: " + data.value.datasets[1].data[context.dataIndex],
|
"Пульс: " + data.value.datasets[1].data[context.dataIndex],
|
||||||
"Мощность: " + data.value.datasets[2].data[context.dataIndex],
|
"Мощность: " + data.value.datasets[2].data[context.dataIndex],
|
||||||
];
|
];
|
||||||
|
|
@ -241,6 +241,7 @@ const initWorkout = (id: string) => {
|
||||||
let speed = [];
|
let speed = [];
|
||||||
let heart_rate = [];
|
let heart_rate = [];
|
||||||
let power = [];
|
let power = [];
|
||||||
|
let coords = [];
|
||||||
for (let i in response.data.results) {
|
for (let i in response.data.results) {
|
||||||
response.data.results[i].lang;
|
response.data.results[i].lang;
|
||||||
response.data.results[i].lang;
|
response.data.results[i].lang;
|
||||||
|
|
@ -248,11 +249,10 @@ const initWorkout = (id: string) => {
|
||||||
speed.push(msToKmh(response.data.results[i].speed));
|
speed.push(msToKmh(response.data.results[i].speed));
|
||||||
power.push(response.data.results[i].power);
|
power.push(response.data.results[i].power);
|
||||||
heart_rate.push(response.data.results[i].heart_rate);
|
heart_rate.push(response.data.results[i].heart_rate);
|
||||||
latitude.push(response.data.results[i].latitude);
|
coords.push([response.data.results[i].longitude, response.data.results[i].latitude]);
|
||||||
longitude.push(response.data.results[i].longitude);
|
|
||||||
lineCoordinates.value.push([response.data.results[i].longitude, response.data.results[i].latitude]);
|
|
||||||
}
|
}
|
||||||
mapCenter.value = [longitude[0], latitude[0]];
|
lineCoordinates.value = coords
|
||||||
|
mapCenter.value = [coords[0][0], coords[0][1]];
|
||||||
data.value = {
|
data.value = {
|
||||||
labels: times,
|
labels: times,
|
||||||
datasets: [
|
datasets: [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue