Operator guideENdashboardggrchartcalculated

Dashboard / GGR Chart

Revenue trend chart with frontend summary cards derived from the loaded time series.

Reader view

Clean portal guidance

This page keeps the operator explanation, field and action descriptions, and screenshots visible without exposing repo paths, raw sidecars, or editorial-only implementation details.

Narrative content

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 14D preset on first render.
  • Streamer data is a visible FE toggle and refetches the chart with isStreamerData=true.
  • Refresh and Download data are widget-level helper actions; they do not change the selected range.
  • Average Daily GGR divides by the number of returned chart points, not by the nominal preset day count.

Time range behavior

The range buttons are:

  • 7D
  • 14D
  • 30D
  • 90D

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/London day 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/London day 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, and GGR Trend are 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-side ggr series and ignores those bonus columns.
Calculation notes

Frontend calculations

calculation

total_ggr

Formula
sum(data[].ggr)
calculation

average_daily_ggr

Formula
sum(data[].ggr) / data.length
calculation

max_ggr

Formula
max(data[].ggr)
calculation

min_ggr

Formula
min(data[].ggr)
calculation

trend

The FE compares halves of the returned point array after backend London-day remapping and optional short-series padding.

Formula
((sum(second_half) - sum(first_half)) / sum(first_half)) * 100, where the halves are split from the loaded `casinoChart` point array
Zero Rule
returns 0 when first-half sum is 0
Note
The FE compares halves of the returned point array after backend London-day remapping and optional short-series padding.
calculation

selected_range_default

Formula
FE defaults to the `14D` button on initial render
calculation

streamer_toggle_refetch

Formula
changing `isStreamerData` triggers `casinoChartMutate()` and re-runs the same chart query with or without the `isStreamerData=true` param
Filter dictionary

Filters

field

Time range

Options
7D, 14D, 30D, 90D
field

Streamer data

Type
boolean
Summary cards

Summary cards

field

Total GGR

field

Average Daily GGR

field

Highest GGR

field

GGR Trend

Metric dictionary

Metrics

metric

Total GGR

Frontend-derived total GGR for the currently loaded chart series.

Aliases
ggr chart total ggr, chart total ggr
Verification Sources
GET /api/admin/charts/casino
Verification Status
verified_fe_only
Last Verified At
2026-04-22
metric

Average Daily GGR

Frontend-derived average daily GGR for the currently loaded chart series.

Aliases
average daily ggr, avg ggr
Verification Sources
GET /api/admin/charts/casino
Verification Status
verified_fe_only
Last Verified At
2026-04-22
metric

Highest GGR

Frontend-derived highest point in the currently loaded chart range.

Aliases
highest ggr, max ggr
Verification Sources
GET /api/admin/charts/casino
Verification Status
verified_fe_only
Last Verified At
2026-04-22
metric

GGR Trend

Frontend-derived percentage comparison between the earlier and later halves of the loaded chart series.

Aliases
ggr trend, chart trend
Verification Sources
GET /api/admin/charts/casino
Verification Status
verified_fe_only
Last Verified At
2026-04-22
Operational notes

Notes

item

FE summary cards reduce only the returned `casinoChart` point array.

item

The backend SQL returns both cash-side `ggr` and bonus-side `bonus_*` measures, but the current widget renders only the cash-side `ggr` series.

Related references

Related pages

pageDashboard / Bonus Payouts

Shared comparison widget rendered for tournament, challenge, and no-deposit bonus payout groups.

pageDashboard / Game Reports

Deep comparison widget for Games and Providers with separate backend paths, multiple grouping options, search, and a mix of backend and frontend summary logic.

pageDashboard / KPI Reports

Sortable KPI table for games or providers, used to compare betting and GGR-style metrics by entity rather than by time bucket.

pageDashboard / KPI Summary

Comparison table for high-level KPI rows across today, yesterday, month-to-date, and the selected period, with frontend trend chips and data-source badges.

pageDashboard / Live Player Report

Card-based snapshot of today's GGR, total players, conversion rates, active players, and merchant balance.

pageDashboard / Performance Overview

Container widget for Casino, Banking, and Registrations charts with shared date-range and streamer-data controls.