tipsy/profile-summary-for-github

Last item in the chart is of wrong year

sompylasar opened this issue · 6 comments

https://github-profile-summary.com/user/sompylasar

After 2018-Q1, expected 2018-Q2, got 2009-Q2.

screen shot 2018-01-02 at 1 03 35 pm

screen shot 2018-01-02 at 1 00 53 pm

The issue is that the data for the lineChart is not sorted.
https://github.com/tipsy/github-profile-summary/blob/a0232c561dc34d2570e64e1c86531405b4935734/src/main/resources/static/charts.js#L122-L129

Object.keys(data[objectName])
(31) ["2010-Q4", "2011-Q1", "2011-Q2", "2011-Q3", "2011-Q4", "2012-Q1", 
"2012-Q2", "2012-Q3", "2012-Q4", "2013-Q1", "2013-Q2", "2013-Q3", 
"2013-Q4", "2014-Q1", "2014-Q2", "2014-Q3", "2014-Q4", "2015-Q1", 
"2015-Q2", "2015-Q3", "2015-Q4", "2016-Q1", "2016-Q2", "2016-Q3", 
"2016-Q4", "2017-Q1", "2017-Q2", "2017-Q3", "2017-Q4", "2018-Q1", 
"2009-Q2"]

This is due to 7e465e3 where the call to create a sorted map has been replaced with toMutableMap in CommitCountUtil#getCommitsForQuarters

tipsy commented

Well, that's embarrassing.

tipsy commented

@sompylasar should be fixed now.

Verified fixed, thanks @tipsy

screen shot 2018-01-02 at 2 05 52 pm

FTR, fixing commit: d6d7d7e