Add emojis for graphs in hourly breakdown tooltip (#2464)

This commit is contained in:
RumovZ 2023-04-17 08:16:10 +02:00 committed by GitHub
parent 8abcb77d95
commit e361bb9514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -149,6 +149,10 @@ statistics-intervals-day-single =
# hour range, eg "From 14:00-15:00"
statistics-hours-range = From { $hourStart }:00~{ $hourEnd }:00
statistics-hours-correct = { $correct }/{ $total } correct ({ $percent }%)
# the emoji depicts the graph displaying this number
statistics-hours-reviews = 📊 { $reviews } reviews
# the emoji depicts the graph displaying this number
statistics-hours-correct-reviews = 📈 { $percent }% correct ({ $reviews })
statistics-hours-title = Hourly Breakdown
statistics-hours-subtitle = Review success rate for each hour of the day.
# shown when graph is empty

View File

@ -170,12 +170,12 @@ export function renderHours(
hourStart: d.hour,
hourEnd: d.hour + 1,
});
const correct = tr.statisticsHoursCorrect({
correct: d.correctCount,
total: d.totalCount,
const reviews = tr.statisticsHoursReviews({ reviews: d.totalCount });
const correct = tr.statisticsHoursCorrectReviews({
percent: d.totalCount ? (d.correctCount / d.totalCount) * 100 : 0,
reviews: d.correctCount,
});
return `${hour}<br>${correct}`;
return `${hour}<br>${reviews}<br>${correct}`;
}
// hover/tooltip