mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
fix statistics calendar and review grapgh range labeling
This commit is contained in:
parent
0abac06c39
commit
e4c6e082f0
1 changed files with 3 additions and 4 deletions
|
|
@ -111,9 +111,6 @@ export function renderReviews(
|
|||
const desiredBars = Math.min(70, Math.abs(xMin!));
|
||||
|
||||
const x = scaleLinear().domain([xMin!, xMax]);
|
||||
if (range === GraphRange.AllTime) {
|
||||
x.nice(desiredBars);
|
||||
}
|
||||
|
||||
const sourceMap = showTime ? sourceData.reviewTime : sourceData.reviewCount;
|
||||
const bins = bin()
|
||||
|
|
@ -212,7 +209,9 @@ export function renderReviews(
|
|||
}
|
||||
|
||||
function tooltipText(d: BinType, cumulative: number): string {
|
||||
const day = dayLabel(d.x0!, d.x1!);
|
||||
const startDay = Math.trunc(d.x0!);
|
||||
const endDay = Math.trunc(d.x1!);
|
||||
const day = dayLabel(startDay, endDay);
|
||||
const totals = totalsForBin(d);
|
||||
const dayTotal = valueLabel(sum(totals));
|
||||
let buf = `<table><tr><td>${day}</td><td align=end>${dayTotal}</td></tr>`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue