- \GraphRenderer
abstract class (none) \ GraphRenderer
- All known direct subclasses:
- GraphRenderer_AbstractCompositionGraph,GraphRenderer_AbstractTicker,GraphRenderer_AdminMetrics,GraphRenderer_AdminStatistics,GraphRenderer_AverageMarketData,GraphRenderer_BalancesOffsetsTable,GraphRenderer_BalancesTable,GraphRenderer_CompositionPie,GraphRenderer_CryptoConvertedTable,GraphRenderer_EquivalentPieBTC,GraphRenderer_ExchangePair,GraphRenderer_TickerMatrix,GraphRenderer_TotalConvertedTable
Method Summary
Name | Description |
---|---|
__construct() | |
canHaveTechnicals() |
Can this graph have technicals? If this returns true , then the resulting data will always be sorted. By default, returns true . |
convertGraphToProportional($original) | Relabel all columns to have ' %' prefix, and reformat all data to be proportional based on the sum of each row. Uses the output of #getData(). |
getChartType() |
What type of chart is this rendered as? By default, returns linechart . |
getClasses() | |
getCustomSubheading() |
Calculate the custom subheading value for this graph, or false if this graph does not have a custom subheading defined (and subheadings calculated through #hasSubheading() will use default sum/array logic). By default, returns false . |
getData($days) | |
getLabel() |
Get the label that should be associated with the #getURL(), or false if there shouldn't be any. Should be wrapped in ct(). |
getTitle() | Get the title of this graph |
getTitleArgs() | Get any localisation (i18n) string arguments for the title given in #getTitle(). By default, returns an empty array. |
getURL() |
Get the URL that the title of this graph should link to, or false if it should not link anywhere |
getUser() | |
hasSubheading() |
Does this graph have a subheading? By default, returns true . |
requiresAdmin() |
Does rendering this graph require an admin user? By default, returns false . |
requiresUser() |
Does rendering this graph require a user? By default, returns false . |
setUser($user_id) | |
usesDays() |
Does this function require a days parameter? If true , then the returned data will be stripped based on the keys returned in the data - assumes that the data uses dates as keys. By default, returns true . |
usesSummaries() |
Does this graph use summaries which may be out of date for a user? By default, returns false . |
public function __construct()
public function canHaveTechnicals()
Can this graph have technicals? If this returns
true
, then the resulting data will always be sorted. By default, returnstrue
.
public function convertGraphToProportional($original)
Relabel all columns to have ' %' prefix, and reformat all data to be proportional based on the sum of each row. Uses the output of #getData().
- See:
public function getChartType()
What type of chart is this rendered as? By default, returns
linechart
.
public function getClasses()
public function getCustomSubheading()
Calculate the custom subheading value for this graph, or
false
if this graph does not have a custom subheading defined (and subheadings calculated through #hasSubheading() will use default sum/array logic). By default, returnsfalse
.
- See:
abstract function getData($days)
- Returns:
an array of (columns => [column], data => [(date, value)], last_updated => (date or false))
public function getLabel()
Get the label that should be associated with the #getURL(), or
false
if there shouldn't be any. Should be wrapped in ct().
abstract function getTitle()
Get the title of this graph
- See:
public function getTitleArgs()
Get any localisation (i18n) string arguments for the title given in #getTitle(). By default, returns an empty array.
public function getURL()
Get the URL that the title of this graph should link to, or
false
if it should not link anywhere
public function getUser()
public function hasSubheading()
Does this graph have a subheading? By default, returns
true
.
- See:
public function requiresAdmin()
Does rendering this graph require an admin user? By default, returns
false
.
public function requiresUser()
Does rendering this graph require a user? By default, returns
false
.
public function setUser($user_id)
public function usesDays()
Does this function require a days parameter? If
true
, then the returned data will be stripped based on the keys returned in the data - assumes that the data uses dates as keys. By default, returnstrue
.
public function usesSummaries()
Does this graph use summaries which may be out of date for a user? By default, returns
false
.