fix null in showing
Gitea Actions Demo / build_and_push (push) Successful in 1m16s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m16s
Details
This commit is contained in:
parent
a158abb69f
commit
ad568cd9bb
|
|
@ -253,14 +253,22 @@ const initWorkout = (id: string) => {
|
|||
}
|
||||
lineCoordinates.value = coords
|
||||
mapCenter.value = [coords[0][0], coords[0][1]];
|
||||
let datasets = [];
|
||||
if (speed) {
|
||||
datasets.push({ radius: 0, label: 'Скорость', borderColor: '#00aa00', backgroundColor: '#00aa00', data: speed });
|
||||
}
|
||||
if (heart_rate) {
|
||||
datasets.push({ radius: 0, label: 'Пульс', borderColor: '#990000', backgroundColor: '#990000', data: heart_rate, });
|
||||
}
|
||||
if (power) {
|
||||
datasets.push({ radius: 0, label: 'Мощность', borderColor: '#cccccc', backgroundColor: '#cccccc', data: power, });
|
||||
}
|
||||
if (elevation) {
|
||||
datasets.push( { radius: 0, label: 'Подъем', borderColor: '#000', backgroundColor: '#000', data: elevation, });
|
||||
}
|
||||
data.value = {
|
||||
labels: times,
|
||||
datasets: [
|
||||
{ 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, },
|
||||
]
|
||||
datasets: datasets
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue