LimeSurvey API - Master branch

DailyActivityStatistics
in package
implements StatisticsChartInterface

Graph: Daily activity (responses per day) in the last 30 days.

Always returns all 30 days with a count, even when 0.

Table of Contents

Interfaces

StatisticsChartInterface
Interface for all statistics chart classes.

Properties

$filters  : StatisticsResponseFilters|null

Methods

run()  : StatisticsChartDTO
Run the daily activity statistics query.
setFilters()  : void
Set filters for responses
buildSeries()  : array<string|int, mixed>
Build a full daily series of the last 30 days, filling in 0 for missing days.
fetchCounts()  : array<string|int, mixed>
Query the database for counts of responses per day.
getDateCastExpression()  : string
getDateRange()  : array<string|int, DateTime>
Get the start and end dates for the last 30 days.

Properties

Methods

buildSeries()

Build a full daily series of the last 30 days, filling in 0 for missing days.

private buildSeries(array<string|int, mixed> $countsByDate, DateTime $startDate, DateTime $endDate) : array<string|int, mixed>
Parameters
$countsByDate : array<string|int, mixed>

[date => count]

$startDate : DateTime
$endDate : DateTime
Return values
array<string|int, mixed>

[$legend, $dataItems, $total]

fetchCounts()

Query the database for counts of responses per day.

private fetchCounts(int $surveyId, DateTime $startDate) : array<string|int, mixed>
Parameters
$surveyId : int
$startDate : DateTime
Return values
array<string|int, mixed>

[date => count]

getDateRange()

Get the start and end dates for the last 30 days.

private getDateRange() : array<string|int, DateTime>
Return values
array<string|int, DateTime>

[$startDate, $endDate]


        
On this page

Search results