Add some documentation [skip ci]

This commit is contained in:
James Cole 2017-06-02 12:59:27 +02:00
parent 8cdc1f0014
commit ec1507d644
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -22,10 +22,15 @@ interface GeneratorInterface
{ {
/** /**
* Will generate a (ChartJS) compatible array from the given input. Expects this format: * Will generate a Chart JS compatible array from the given input. Expects this format
*
* Will take labels for all from first set.
* *
* 0: [ * 0: [
* 'label' => 'label of set', * 'label' => 'label of set',
* 'type' => bar or line, optional
* 'yAxisID' => ID of yAxis, optional, will not be included when unused.
* 'fill' => if to fill a line? optional, will not be included when unused.
* 'entries' => * 'entries' =>
* [ * [
* 'label-of-entry' => 'value' * 'label-of-entry' => 'value'
@ -33,12 +38,16 @@ interface GeneratorInterface
* ] * ]
* 1: [ * 1: [
* 'label' => 'label of another set', * 'label' => 'label of another set',
* 'type' => bar or line, optional
* 'yAxisID' => ID of yAxis, optional, will not be included when unused.
* 'fill' => if to fill a line? optional, will not be included when unused.
* 'entries' => * 'entries' =>
* [ * [
* 'label-of-entry' => 'value' * 'label-of-entry' => 'value'
* ] * ]
* ] * ]
* *
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five.
* *
* @param array $data * @param array $data
* *