| 1 | <?php |
||
| 8 | trait AggregationTargetTrait |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * How multiple data selections are rolled up into tooltips : |
||
| 12 | * 'category': group selected data by x-value. |
||
| 13 | * 'series': group selected data by series. |
||
| 14 | * 'auto': group selected data by x-value if all selections have the same x-value, and by series otherwise. |
||
| 15 | * 'none': show only one tooltip per selection. |
||
| 16 | * |
||
| 17 | * aggregationTarget will often be used in tandem with selectionMode and tooltip.trigger, e.g.: |
||
| 18 | * var options = { |
||
| 19 | * // Allow multiple |
||
| 20 | * // simultaneous selections. |
||
| 21 | * selectionMode: 'multiple', |
||
| 22 | * // Trigger tooltips |
||
| 23 | * // on selections. |
||
| 24 | * tooltip: {trigger: 'selection'}, |
||
| 25 | * // Group selections |
||
| 26 | * // by x-value. |
||
| 27 | * aggregationTarget: 'category', |
||
| 28 | * }; |
||
| 29 | * |
||
| 30 | * Default: 'auto' |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $aggregationTarget; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $aggregationTarget |
||
| 38 | * |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | public function setAggregationTarget($aggregationTarget) |
||
| 47 | } |
||
| 48 |