diff --git a/proto/anki/stats.proto b/proto/anki/stats.proto index c08e4407d..3f6814954 100644 --- a/proto/anki/stats.proto +++ b/proto/anki/stats.proto @@ -154,6 +154,7 @@ message GraphsResponse { ReviewCountsAndTimes reviews = 9; uint32 rollover_hour = 10; Retrievability retrievability = 12; + bool fsrs = 13; } message GraphPreferences { diff --git a/rslib/src/stats/graphs/mod.rs b/rslib/src/stats/graphs/mod.rs index ec8f2ae20..7c48666ec 100644 --- a/rslib/src/stats/graphs/mod.rs +++ b/rslib/src/stats/graphs/mod.rs @@ -75,6 +75,7 @@ impl Collection { card_counts: Some(ctx.card_counts()), rollover_hour: self.rollover_for_current_scheduler()? as u32, retrievability: Some(ctx.retrievability()), + fsrs: self.get_config_bool(BoolKey::Fsrs), }; Ok(resp) } diff --git a/ts/graphs/DifficultyGraph.svelte b/ts/graphs/DifficultyGraph.svelte index 6460ccf33..cf90f978a 100644 --- a/ts/graphs/DifficultyGraph.svelte +++ b/ts/graphs/DifficultyGraph.svelte @@ -35,7 +35,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html const subtitle = tr.statisticsCardDifficultySubtitle(); -{#if histogramData} +{#if sourceData?.fsrs} diff --git a/ts/graphs/EaseGraph.svelte b/ts/graphs/EaseGraph.svelte index 632fc82c8..6f9c7db37 100644 --- a/ts/graphs/EaseGraph.svelte +++ b/ts/graphs/EaseGraph.svelte @@ -35,7 +35,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html const subtitle = tr.statisticsCardEaseSubtitle(); -{#if histogramData} +{#if !(sourceData?.fsrs ?? false)} diff --git a/ts/graphs/RetrievabilityGraph.svelte b/ts/graphs/RetrievabilityGraph.svelte index 129b244c7..b3a485fea 100644 --- a/ts/graphs/RetrievabilityGraph.svelte +++ b/ts/graphs/RetrievabilityGraph.svelte @@ -35,7 +35,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html const subtitle = tr.statisticsRetrievabilitySubtitle(); -{#if histogramData} +{#if sourceData?.fsrs}