Page body
What this widget shows
GGR Chart visualizes GGR over a selected time range and adds four summary cards:
- Total GGR
- Average Daily GGR
- Highest GGR
- GGR Trend
How to read it
The chart points come directly from the backend chart endpoint. The four summary cards are then calculated in the frontend from those points.
- The widget defaults to the
14Dpreset on first render. Streamer datais a visible FE toggle and refetches the chart withisStreamerData=true.RefreshandDownload dataare widget-level helper actions; they do not change the selected range.Average Daily GGRdivides by the number of returned chart points, not by the nominal preset day count.
Time range behavior
The range buttons are:
7D14D30D90D
The selected range controls the start date sent to the backend.
The FE subtracts 7, 14, 30, or 90 calendar days from the current date to build the query window. The label should therefore be read as a preset range helper, not as a guarantee about the exact number of returned backend points.
Trend logic
The frontend splits the loaded series in half:
- first half = previous period
- second half = recent period
Then it calculates:
((recent_ggr - previous_ggr) / previous_ggr) * 100
If the previous half sums to zero, the trend is shown as 0.
This split happens after the backend has already:
- normalized dates into
Europe/Londonday buckets - returned only the visible chart series
- optionally padded a short response with one synthetic zero-GGR row
Known caveats
- The backend service rewrites raw SQL dates from UTC into
Europe/Londonday buckets before returning the chart points. - The backend still contains a display hack for a very short three-row response with no row matching the selected end date; in that case it pads the chart with a synthetic zero-GGR row.
Total GGR,Average Daily GGR,Highest GGR, andGGR Trendare all FE-derived from the loaded series, not returned as a dedicated backend summary object.- The traced SQL also returns bonus-side
bonus_*measures, but the current widget renders only the cash-sideggrseries and ignores those bonus columns.