Skip to content

Conversation

@allanjoseph98
Copy link
Member

@allanjoseph98 allanjoseph98 commented Jan 2, 2024

Follow up of #13897. Closes #3509. Closes #11653. Removes all traces of highcharts except in the legal stuff (I leave that to someone more knowledgeable). Replaces the lag chart and the rating history chart—also some fixes for other charts.

Chartjs does not have a native time series range selector or a gauge chart so I've crudely glued together some components.

The good (mainly concerning rating-history):

  1. Hover performance is vastly improved on slower devices. Especially when viewing older, more active profiles.
  2. The chart is actually usable on mobile. On highcharts, if you start panning on mobile it gets stuck in that state and it's impossible to view data points again.
  3. More types. Delete lag.js and re-write in typescript.

The bad:
2. Time series slider is laggier on slower devices. This is not noticeable for most people with an ok system. To be fair, highcharts is also laggy with 6x slowdown but not as bad as this is. That being said, I think the improved hover performance far outweighs this. Here is a video demonstration (Edit-seems to be viewable on chrome only) with and without CPU throttling:
Sliding:

Slide.mp4

Hovering:

Hover.mp4

@allanjoseph98
Copy link
Member Author

I have also worked on a function to color the movetime graph on analysis hover similar to the currently present christmasTree function. Should I include that as well? Example:
image

* master:
  Update  ES and TR Dictionary
best would be to format it using the translated date function
https://github.com/lichess-org/lila/blob/master/ui/site/src/component/timeago.ts#L42

but I couldn't figure it out
@ornicar
Copy link
Collaborator

ornicar commented Jan 5, 2024

Excellent work, thank you! So glad to finally be rid of Highcharts - and the UI just became better.

@ornicar ornicar merged commit dee9a85 into lichess-org:master Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upgrade highcharts replace Highcharts, which is a non-free library

2 participants