\Kendo\Dataviz\UI\SankeyLegend
A PHP class representing the legend setting of Sankey.
Methods
align
The alignment of the legend label.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value string
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->align('value');
?>
background
The background color of the legend.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value string
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->background('value');
?>
border
The border of the legend.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value \Kendo\Dataviz\UI\SankeyLegendBorder|array
Example - using \Kendo\Dataviz\UI\SankeyLegendBorder
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$border = new \Kendo\Dataviz\UI\SankeyLegendBorder();
$color = 'value';
$border->color($color);
$legend->border($border);
?>
Example - using array
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$color = 'value';
$legend->border(array('color' => $color));
?>
height
The height of the legend.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value float
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->height(1);
?>
item
The configuration of the legend items.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value \Kendo\Dataviz\UI\SankeyLegendItem|array
Example - using \Kendo\Dataviz\UI\SankeyLegendItem
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$item = new \Kendo\Dataviz\UI\SankeyLegendItem();
$areaBackground = 'value';
$item->areaBackground($areaBackground);
$legend->item($item);
?>
Example - using array
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$areaBackground = 'value';
$legend->item(array('areaBackground' => $areaBackground));
?>
labels
The Sankey legend label configuration.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value \Kendo\Dataviz\UI\SankeyLegendLabels|array
Example - using \Kendo\Dataviz\UI\SankeyLegendLabels
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$labels = new \Kendo\Dataviz\UI\SankeyLegendLabels();
$color = 'value';
$labels->color($color);
$legend->labels($labels);
?>
Example - using array
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$color = 'value';
$legend->labels(array('color' => $color));
?>
margin
The margin of the Sankey legend. A numeric value will set all paddings.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value float|\Kendo\Dataviz\UI\SankeyLegendMargin|array
Example - using float
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->margin(1);
?>
Example - using \Kendo\Dataviz\UI\SankeyLegendMargin
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$margin = new \Kendo\Dataviz\UI\SankeyLegendMargin();
$bottom = 1;
$margin->bottom($bottom);
$legend->margin($margin);
?>
Example - using array
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$bottom = 1;
$legend->margin(array('bottom' => $bottom));
?>
offsetX
The X offset of the Sankey legend. The offset is relative to the default position of the legend. For instance, a value of 20 will move the legend 20 pixels to the right of its initial position. A negative value will move the legend to the left of its current position.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value float
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->offsetX(1);
?>
offsetY
The Y offset of the Sankey legend. The offset is relative to the current position of the legend. For instance, a value of 20 will move the legend 20 pixels down from its initial position. A negative value will move the legend upwards from its current position.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value float
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->offsetY(1);
?>
orientation
The position of the label.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value string
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->orientation('value');
?>
padding
The padding of the Sankey legend. A numeric value will set all paddings.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value float|\Kendo\Dataviz\UI\SankeyLegendPadding|array
Example - using float
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->padding(1);
?>
Example - using \Kendo\Dataviz\UI\SankeyLegendPadding
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$padding = new \Kendo\Dataviz\UI\SankeyLegendPadding();
$bottom = 1;
$padding->bottom($bottom);
$legend->padding($padding);
?>
Example - using array
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$bottom = 1;
$legend->padding(array('bottom' => $bottom));
?>
position
The position of the label.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value string
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->position('value');
?>
reverse
If set to true the legend items will be reversed.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value boolean
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->reverse(true);
?>
spacing
The spacing between the labels in pixels when the legend.orientation is "horizontal".
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value float
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->spacing(1);
?>
title
The legend title configuration options.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value \Kendo\Dataviz\UI\SankeyLegendTitle|array
Example - using \Kendo\Dataviz\UI\SankeyLegendTitle
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$title = new \Kendo\Dataviz\UI\SankeyLegendTitle();
$align = 'value';
$title->align($align);
$legend->title($title);
?>
Example - using array
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$align = 'value';
$legend->title(array('align' => $align));
?>
visible
If set to false the Sankey will not display the legend.
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value boolean
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->visible(true);
?>
width
The legend width when the legend.orientation is set to "horizontal".
Returns
\Kendo\Dataviz\UI\SankeyLegend
Parameters
$value float
Example
<?php
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$legend->width(1);
?>