mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 16:28:50 +01:00
Fix off-by-one error in pie chart data
A pie chart with exactly 10 contexts would show up with 9 contexts + (other).
This commit is contained in:
parent
d0a12a7010
commit
119e536a97
1 changed files with 1 additions and 1 deletions
|
|
@ -355,7 +355,7 @@ class StatsController < ApplicationController
|
|||
'id' => all_actions_per_context[i][:id]
|
||||
} }
|
||||
|
||||
if size==pie_cutoff
|
||||
if all_actions_per_context.size > pie_cutoff
|
||||
@actions_per_context[size-1]['name']=t('stats.other_actions_label')
|
||||
@actions_per_context[size-1]['total']=@actions_per_context[size-1]['total']
|
||||
@actions_per_context[size-1]['id']=-1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue