[Userscript] WaniKani Workload Graph

Looks correct.
image

Awesome script!

2 Likes

Finally had time to install it. Looks like my workload came to a very abrupt stop halfway :sweat_smile:

4 Likes

Soooo… how about a toggle between reviews and lessons? :eyes:

3 Likes

Oooh more data to play with

so I didn’t get the chart button showing up in the heatmap originally, so I had to click on the Graph button in the header instead - but then the chart button did show up after I reloaded the page…

Anyway, my chart is:

I like how it shows how I virtually quit WK right after I hit L60 around Christmas 2018, but then came back to a mountain of reviews later on :stuck_out_tongue_winking_eye:

3 Likes

Here is mine. The decrease after all lessons have been done is impressive.
image

2 Likes

I love it! Thanks for making this :smile_cat:

Edit : Also shows my lack of dedication :sweat_smile:

6 Likes

Yes, I have the same issue.
When I load a page for the first time, it implements the “Graph” button.
When I refresh the page, it is again attached to the heatmap.
My guess is that since I have done so many reviews, it is not given enough time to determine whether the heatmap script is there. Just as an indication, I am currently sitting at 144k+ reviews.
EDIT: It takes 8 seconds for heatmap to show up. (Actually when I tested it this time it was correctly placed on the heatmap, even when using Shift+F5 :man_shrugging:)

4 Likes

Yeah, the Heatmap is pretty slow to load. I think it’s rather because it’s a lot of elements to render than it being a lot of reviews, but I’m not sure. I’ve been wanting to look into how to make it quicker.

Anyway, the workload graph only gives the heatmap around 6.4 seconds to load

4 Likes

Yes, I had a similar thought :arrow_heading_up:. It usually takes around 10s for the heatmap to show up when I haven’t loaded WK in a while, and then the graph button in the header appears before the heatmap.
(and when I tried my ancient macbook just now, it took 90s for the heatmap to arrive :sweat_smile:)

3 Likes

Well there ya go, extending that time should probably solve the issue.

3 Likes

Or if @rwesterhof wants to cooperate I could send out a custom event when it loads

5 Likes

Yeah, I’ve already given it more time locally - so it’ll be part of the next update. The time mostly goes into the loading of the reviews and review_statistics via the wkof - the API calls tend to take a little longer than I originally accounted for.

I’d be very interested!

You think a graph of lessons would be interesting? Maybe I didn’t consider this because mine would be so boring. I did think about providing an input field + button so people could change the nr of days used in the running average calculation - it’s something to play with :slight_smile:

6 Likes

Not nearly as interesting as reviews, but once you see one you start feeling like you have to see the other

3 Likes

Need to do lessons and go for a run now, but I’ll take a look at it this afternoon. Lessons are retrieved quite differently I think - haven’t looked at that at all yet.

1 Like

Here’s mine!

image

3 Likes

Since that data is available in the WKOF ItemData it’s pretty easy to fetch

I have added a custom event heatmap-loaded that fires on the heatmap element (and bubbles) once it’s inserted into the page. Let me know if you want me to set a flag or something just to let your script know that the heatmap script is running at all

edit: Just remembered that WKOF has a flag system that we could use. I guess it doesn’t make much of a difference. If you prefer that just let me know and I’ll change it

3 Likes

Well you are still here, so I’d call that big dedication :+1: :+1:

3 Likes

Thank you kindly :bowing_man:

3 Likes

I’m catching the heatmap-loaded event now. My graph script initially pushes the Graph button into the header and then moves it to the heatmap if the event is caught (meaning that dashboards without a heatmap will keep it in the header).

I had planned to do this yesterday, but I ended up Marie-Kondo’ing my linen closet. Took more time than I thought :tired_face:

4 Likes

It looks like this script has a conflict with the level duration 2 script where it causes the level duration to display in the wrong place.

1 Like