Online-go.com: Win-loss bar graph not reliable.

Created on 5 Oct 2017  路  8Comments  路  Source: online-go/online-go.com

Summary

My test user's graph looks strange. It doesn't have many results.

Environment

dev server, head of devel client branch

Steps To Reproduce:

  1. Run the devel client from the head of the branch
  2. Go to http://dev.beta.online-go.com:8080/user/view/645
  3. See that there is no dark purple in the bar graph, but DevGaJ has one "loss vs weaker"

Additional Information:

screenshot 2017-10-05 23 15 37

bug

Most helpful comment

Thanks for your work on this!

I'm happy with this solution, it's certainly better than what we currently have.

All 8 comments

This has been confirmed on the main server, by this report in the forum:

https://forums.online-go.com/t/wins-losses-chart/15419

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.

image

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);

Screen Recording 2019-06-08 at 17 38 16

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.
image

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.
image

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.

Was this page helpful?
0 / 5 - 0 ratings