My test user's graph looks strange. It doesn't have many results.
dev server, head of devel client branch

This has been confirmed on the main server, by this report in the forum:
I'm hitting this bug in dev too while working on the bar chart.
Anybody has any hint as to why it is buggy?
Yeah, I think there's something not right at the moment.
Right now DevGaj has a bunch of ranked games, but the Profile is claiming only 12 ranked games.
I pinged anoek on OGS as well about this.
I think I've found a problem in the first X coordinate of the bar chart - I just have to locate the problematic function.

It might not be the only problem though
I am wondering if the scale this.ratings_x: d3.scaleTime() is not set to be daily and used as monthly in the bar chart, causing troubles.
I'm a noob in javascript though so idk.
A naive change of the date_range seems to create very weird behaviour. I guess there is a problem with the range selection: it interferes with the bar chart. I think I will be able to deal with that.
However I'm not sure about the impact of the rounding of the date_range on the line chart. Opinion?
let date_range:any = d3.extent(this.game_entries.map((d:RatingEntry) => { return d.ended; }));
date_range[0] = new Date(date_range[0].getUTCFullYear(), date_range[0].getUTCMonth());
date_range[1] = new Date(date_range[1].getUTCFullYear(), date_range[1].getUTCMonth());
date_range[1].setMonth(date_range[1].getMonth() + 1);

Ok, I have a version which is not totally glitchy, but is maybe less ambitious.
I get rid of particular logic for when the selection is the same month as today. Also, as explained above, I define the date range as monthly, i.e. first of the first game month, and first day of the month following the last game. So the line plot is incomplete, but the bar chart has a fixed range spanning the full month that it reports on.

In particular, it means that selecting a fraction of a month displays a bar char that doesn't really makes sense. Note that this is the same behaviour as the chart for selection of past months.

Here is the branch if you want to check it out. I'm waiting for feedback before making a pull request.
https://github.com/tcarette/online-go.com/tree/issue_466
Thanks for your work on this!
I'm happy with this solution, it's certainly better than what we currently have.
Most helpful comment
Thanks for your work on this!
I'm happy with this solution, it's certainly better than what we currently have.