ChartData
extends JsonResource
in package
Class ChartData.
Tags
Table of Contents
Properties
Methods
- getPeriod() : string
- setPeriod() : ChartData
- toArray() : array<int, mixed>
- Transform the resource collection into an array.
- normalizePointData() : array<string|int, string>
- fillData() : void
- initDefaultData() : void
Properties
$resource
public
Collection
$resource
$data
private
array<string, mixed>
$data
$period
private
string
$period
Methods
getPeriod()
public
getPeriod() : string
Return values
stringsetPeriod()
public
setPeriod(string $period) : ChartData
Parameters
- $period : string
Return values
ChartDatatoArray()
Transform the resource collection into an array.
public
toArray(Request $request) : array<int, mixed>
Parameters
- $request : Request
Return values
array<int, mixed>normalizePointData()
protected
normalizePointData(StatsContent $resource) : array<string|int, string>
Parameters
- $resource : StatsContent
Return values
array<string|int, string>fillData()
private
fillData() : void
initDefaultData()
private
initDefaultData(string $period) : void
Parameters
- $period : string