[Userscript] Wanikani Heatmap

nope, i installed almost every version in the last few days and had a quick look at them but this issue i only noticed today :thinking:

1 Like

Did you clear the cache?

do you mean the “reload review data” thing? that i did but no in-browser cache deleting or anything.

1 Like

No, I meant browser cache. I store the date for the last fetch in localStorage, so if you had cleared the cache it would have deleted that and all reviews would be fetched again. I’m not sure what else could cause it, the code for this is pretty simple. For now just reload the reviews if you didn’t and keep an eye on it to see if it happens again.

1 Like

well, that worked :smile:

2 Likes

Bug report: This is happening on auto-range…

image

1 Like

Ah. I was wondering if that would happen. I think I need to change out the inverse cumulative distribution function for the inverse cumulative half-normal distribution function.

Not sure what those are… but just FYI this is on the forecast. It’s working fine in reviews & lessons.

It also doesn’t do anything different for something super-high (e.g. on reviews, 184 is the largest interval given, but what about the odd days with 400 or 500 or even just 250?)

1 Like

If these days are few in number then it doesn’t need to treat them any differently. The colors are there to give you an overview, you don’t need to tell the 95th and 99th percentile apart

Honestly that spread looks fine to me, I think your colors are just close to each other.

I won’t mix gradients and non-gradients, so I’m not going to add this as a feature. However, you could emulate it by turning off auto range then add another interval with the bound just 1 review higher and set that color to gold

1 Like

I added a few more intervals like you said and that seemed to help, thanks!
I guess I didn’t really need auto-range to figure out what I wanted it to be… :man_facepalming:

1 Like

I’ve also encountered a slight bug today with the auto-range and gradients enabled:

image

The black squares are days with just a single upcoming review, auto range calculated these intervals:

image

So the problem is probably related to the two intervals starting with the same value, which I assume is causing the problem in the gradient’s calculation. When the gradient is disabled it just uses the colors as specified.

1 Like

Yep, that should be it. It’s trying to find a color 0/0 % between the two intervals. I’ll add a fallback for when this happens and look into improving the auto-ranging function

1 Like

I cleared the browser cache now and both heatmaps display the same numbers now. Thanks again!

1 Like

Where do the minimap colors come from?

It seems like it’s sort of coming from the custom colors, but I’d like to be able to see how.

For example, on May 26, 2020, I did one review. The minimap color for that sole review seems to be a weighted average between the 0 and 1 color, but I would much rather it give at the very least, the custom color for one, if not further down in the gradient.

In addition, I would like to be able to use the custom color for zero reviews on that minimap.
The same goes for lessons where the exact same thing is happening (see May 23, 2020 - I can upload the picture if needed)

image

Well spotted. To get the color for the minimap I divide the number of items by 6 (arbitrary number) and get the corresponding color. For 1 review that happens to end up at just off the zero-color. I should definitely be rounding this up.

Ah, yes, this is a bug, will fix

1 Like

Shouldn’t it be the other way? Shouldn’t we be multiplying by a value and getting that color? It doesn’t make any sense to be getting the color for 10 reviews for the minimap if you did 60 in an hour…

In addition, I believe this value could be a setting to allow more flexibility on the minimap color!

Let’s say our value was two. Now, I did 150 reviews in an hour. (I have done that recently) Instead of getting the color for 150 / 6 = 25, we’re getting the color for 150 * 2 = 300. Much better!

I have also tried multiplication, but that suffered from the same issue of the minimap often not providing useful information by its colors. I am trying different values to see what works.

I think this is too small to warrant a setting

I respectfully disagree. You allow plenty of customization on basically every other color in the Heatmap, but there’s no customizing options for the minimap.

P.S. Could it be you were multiplying by something ridiculous like 6? I think something much closer to 1 would be more beneficial…

For those who have a more minor problem… i.e. colors not sticking, what would you recommend?

1 Like