Skip to content

Fix multiple users selecting the same score - #15

Open
phumpal wants to merge 2 commits into
scottsbaldwin:masterfrom
phumpal:fix-nan-error
Open

Fix multiple users selecting the same score#15
phumpal wants to merge 2 commits into
scottsbaldwin:masterfrom
phumpal:fix-nan-error

Conversation

@phumpal

@phumpal phumpal commented Aug 4, 2023

Copy link
Copy Markdown

Previously multiple users were unable to select the same score causing an

Invalid row index NaN. Should be in the range [0-0]

👋 @scottsbaldwin PTAL when you get a chance. If you need a demo site (Heroku is no longer free 😞) try fly.io 😄

image

Fly.io Setup

brew install flyctl
flyctl auth login
fly launch
fly secrets set AIRBRAKE_PROJECT_ID=
fly secrets set AIRBRAKE_PROJECT_KEY=
fly secrets set RACK_ENV=production
fly deploy

phumpal added 2 commits August 4, 2023 00:22
Google Charts seem to expect a specific data format for the histogram
chart. Duplicate enties will cause

    Invalid row index NaN. Should be in the range [0-0]

To fix group scores together and count their occurrences. scorecounts
stores the count of each sore in the scores array. Data is an array of
arrays where each inner array contains the score and count. data.addRows
populates the data table with appropriate values.
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.

1 participant