From 1abcbdd79c042ab5a2d97d3400b3f2659b0efef7 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Fri, 8 Jan 2021 17:57:47 +0100 Subject: [PATCH] Include review and relearn cards for ease graph --- ts/graphs/ease.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/graphs/ease.ts b/ts/graphs/ease.ts index ed512d6b7..872efa77d 100644 --- a/ts/graphs/ease.ts +++ b/ts/graphs/ease.ts @@ -9,7 +9,7 @@ import type pb from "anki/backend_proto"; import { extent, histogram, sum } from "d3-array"; import { scaleLinear, scaleSequential } from "d3-scale"; -import { CardQueue } from "anki/cards"; +import { CardType } from "anki/cards"; import type { HistogramData } from "./histogram-graph"; import { interpolateRdYlGn } from "d3-scale-chromatic"; import type { I18n } from "anki/i18n"; @@ -21,7 +21,7 @@ export interface GraphData { export function gatherData(data: pb.BackendProto.GraphsOut): GraphData { const eases = (data.cards as pb.BackendProto.Card[]) - .filter((c) => c.queue == CardQueue.Review) + .filter((c) => [CardType.Review, CardType.Relearn].includes(c.ctype)) .map((c) => c.easeFactor / 10); return { eases }; }