Tweak some of the graph descriptions

This commit is contained in:
Damien Elmes 2023-10-20 12:58:07 +10:00
parent 4b6aadfe62
commit 5098ecce24
4 changed files with 23 additions and 6 deletions

View file

@ -95,11 +95,12 @@ statistics-range-search = Search
statistics-card-ease-title = Card Ease
statistics-card-difficulty-title = Card Difficulty
statistics-card-stability-title = Card Stability
statistics-card-stability-subtitle = Predicted delay that you have a 90% chance of remembering.
statistics-card-stability-subtitle = The delay at which you're 90% likely to remember.
statistics-average-stability = Average stability
statistics-card-retrievability-title = Card Retrievability
statistics-card-ease-subtitle = The lower the ease, the more frequently a card will appear.
statistics-card-difficulty-subtitle = The higher the difficulty, the harder it is to remember.
statistics-retrievability-subtitle = How likely you are to remember.
statistics-retrievability-subtitle = The probability of recalling a card today.
# eg "3 cards with 150-170% ease"
statistics-card-ease-tooltip =
{ $cards ->
@ -162,6 +163,16 @@ statistics-intervals-day-single =
[one] { $cards } card with a { $day } day interval
*[other] { $cards } cards with a { $day } day interval
}
statistics-stability-day-range =
{ $cards ->
[one] { $cards } card with a { $daysStart }~{ $daysEnd } day stability
*[other] { $cards } cards with a { $daysStart }~{ $daysEnd } day stability
}
statistics-stability-day-single =
{ $cards ->
[one] { $cards } card with a { $day } day stability
*[other] { $cards } cards with a { $day } day stability
}
# hour range, eg "From 14:00-15:00"
statistics-hours-range = From { $hourStart }:00~{ $hourEnd }:00
statistics-hours-correct = { $correct }/{ $total } correct ({ $percent }%)

View file

@ -42,6 +42,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
range,
dispatch,
$prefs.browserLinksSupported,
false,
);
}

View file

@ -42,6 +42,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
range,
dispatch,
$prefs.browserLinksSupported,
true,
);
}

View file

@ -47,16 +47,19 @@ export function intervalLabel(
daysStart: number,
daysEnd: number,
cards: number,
fsrs: boolean,
): string {
if (daysEnd - daysStart <= 1) {
// singular
return tr.statisticsIntervalsDaySingle({
const fn = fsrs ? tr.statisticsStabilityDaySingle : tr.statisticsIntervalsDaySingle;
return fn({
day: daysStart,
cards,
});
} else {
// range
return tr.statisticsIntervalsDayRange({
const fn = fsrs ? tr.statisticsStabilityDayRange : tr.statisticsIntervalsDayRange;
return fn({
daysStart,
daysEnd: daysEnd - 1,
cards,
@ -80,6 +83,7 @@ export function prepareIntervalData(
range: IntervalRange,
dispatch: SearchDispatch,
browserLinksSupported: boolean,
fsrs: boolean,
): [HistogramData | null, TableDatum[]] {
// get min/max
const allIntervals = data.intervals;
@ -144,7 +148,7 @@ export function prepareIntervalData(
percent: number,
): string {
// const day = dayLabel(bin.x0!, bin.x1!);
const interval = intervalLabel(bin.x0!, bin.x1!, bin.length);
const interval = intervalLabel(bin.x0!, bin.x1!, bin.length, fsrs);
const total = tr.statisticsRunningTotal();
return `${interval}<br>${total}: \u200e${localizedNumber(percent, 1)}%`;
}
@ -160,7 +164,7 @@ export function prepareIntervalData(
const meanIntervalString = timeSpan(meanInterval * 86400, false);
const tableData = [
{
label: tr.statisticsAverageInterval(),
label: fsrs ? tr.statisticsAverageStability() : tr.statisticsAverageInterval(),
value: meanIntervalString,
},
];