Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social media stats graph on party detail page is missing #63

Open
Putr opened this issue Oct 8, 2017 · 13 comments
Open

Social media stats graph on party detail page is missing #63

Putr opened this issue Oct 8, 2017 · 13 comments

Comments

@Putr
Copy link
Member

Putr commented Oct 8, 2017

@GuruVII created a nice graph that's not showing up.

@Putr Putr added the bug label Oct 8, 2017
@j-h-s
Copy link
Collaborator

j-h-s commented Oct 11, 2017

Any idea why this isn't showing up?
The API seems to be working, as far as I can see.

@GuruVII
Copy link
Collaborator

GuruVII commented Oct 11, 2017

I have some inkling, but I currently can't check, because party pages don't work on my local deployment. My plan is to meet with Putr tommorow so he can help me set it up properly, so I can work on this :)

j-h-s added a commit that referenced this issue Oct 16, 2017
[#63] fix for social media graphs on party pages
@GuruVII
Copy link
Collaborator

GuruVII commented Oct 16, 2017

The main issue was the fact that the intent was that it shows data from the last 6 months and because there was no data, it showed nothing. But there was a bug, because .getMonth() gives a reuslt from 0-11 and I thought it was 1-12, so it never gave up to date results.

@j-h-s
Copy link
Collaborator

j-h-s commented Dec 18, 2017

This seems to be working now.

@j-h-s j-h-s closed this as completed Dec 18, 2017
@collentine collentine reopened this Dec 31, 2017
@collentine
Copy link
Contributor

Graph looks nice but doesn't collect at intervals. Only one first value and the current creating a linear graph.

@j-h-s
Copy link
Collaborator

j-h-s commented Jan 2, 2018

This is (hopefully) just due to a lack of data. Give it some time and see if it fills out.

@GuruVII
Copy link
Collaborator

GuruVII commented Jan 2, 2018

Perhaps I could add that it does not show the data unless there is at least 5 pieces of data available?

@j-h-s
Copy link
Collaborator

j-h-s commented Jan 2, 2018

Maybe, I don't know. I think incomplete data is still better than nothing in this case.

@Putr
Copy link
Member Author

Putr commented Jan 3, 2018

@collentine We've had problems with the scraper - there's too much data so @j-h-s has been working on refactoring it.

@j-h-s
Copy link
Collaborator

j-h-s commented Jan 11, 2018

This is starting to fill out slowly, but it's still only showing 2 or 3 data points and only from the past 3 months. Is this working as intended? There's definitely more data than that in the db.

Also, could we maybe add an option to change the scope of the graph (e.g. to display 3 months, 6 months or 1 year of data where available)?

@GuruVII
Copy link
Collaborator

GuruVII commented Jan 12, 2018

I believe it is working as intended. The graph is suppsoed to show data for the last 6 months, but only one datapoint per 7 days.
This was done to avoid getting too many datapoints on the graph, but I guess I could make an if statement that first check, if there are too many data points to begin with.

@Putr
Copy link
Member Author

Putr commented Jan 13, 2018

This was done to avoid getting too many datapoints on the graph, but I guess I could make an if statement that first check, if there are too many data points to begin with.

👍

@j-h-s j-h-s removed the bug label Jan 18, 2018
GuruVII pushed a commit to GuruVII/PPI-rest-api that referenced this issue May 6, 2018
… so that when there is less than 150 datapoints, it dooesn't show only every 7th datapoint
GuruVII added a commit to GuruVII/PPI-rest-api that referenced this issue May 6, 2018
j-h-s added a commit that referenced this issue May 14, 2018
@j-h-s
Copy link
Collaborator

j-h-s commented May 14, 2018

This should be working now. It was only an issue for a while last year due to a bug in the scraper, but that's been fixed now, so it shouldn't be a problem in the future.

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

No branches or pull requests

4 participants