mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add emojis for graphs in hourly breakdown tooltip (#2464)
This commit is contained in:
parent
8abcb77d95
commit
e361bb9514
2 changed files with 8 additions and 4 deletions
|
@ -149,6 +149,10 @@ statistics-intervals-day-single =
|
||||||
# hour range, eg "From 14:00-15:00"
|
# hour range, eg "From 14:00-15:00"
|
||||||
statistics-hours-range = From { $hourStart }:00~{ $hourEnd }:00
|
statistics-hours-range = From { $hourStart }:00~{ $hourEnd }:00
|
||||||
statistics-hours-correct = { $correct }/{ $total } correct ({ $percent }%)
|
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-title = Hourly Breakdown
|
||||||
statistics-hours-subtitle = Review success rate for each hour of the day.
|
statistics-hours-subtitle = Review success rate for each hour of the day.
|
||||||
# shown when graph is empty
|
# shown when graph is empty
|
||||||
|
|
|
@ -170,12 +170,12 @@ export function renderHours(
|
||||||
hourStart: d.hour,
|
hourStart: d.hour,
|
||||||
hourEnd: d.hour + 1,
|
hourEnd: d.hour + 1,
|
||||||
});
|
});
|
||||||
const correct = tr.statisticsHoursCorrect({
|
const reviews = tr.statisticsHoursReviews({ reviews: d.totalCount });
|
||||||
correct: d.correctCount,
|
const correct = tr.statisticsHoursCorrectReviews({
|
||||||
total: d.totalCount,
|
|
||||||
percent: d.totalCount ? (d.correctCount / d.totalCount) * 100 : 0,
|
percent: d.totalCount ? (d.correctCount / d.totalCount) * 100 : 0,
|
||||||
|
reviews: d.correctCount,
|
||||||
});
|
});
|
||||||
return `${hour}<br>${correct}`;
|
return `${hour}<br>${reviews}<br>${correct}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// hover/tooltip
|
// hover/tooltip
|
||||||
|
|
Loading…
Reference in a new issue