\Kendo\Dataviz\UI\Sankey

A PHP wrapper for Kendo UI Sankey.

Inherits from \Kendo\UI\Widget.

Usage

To use Sankey in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo Sankey

<?php
// Create a new instance of Sankey and specify its id
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');

// Configure it
$sankey->disableAutoLayout(true)

// Output it

echo $sankey->render();
?>

Methods

data

The data of the Sankey. The data object contains the Sankey nodes and links configuration.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyData|array

Example - using \Kendo\Dataviz\UI\SankeyData

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$data = new \Kendo\Dataviz\UI\SankeyData();
$links = new \Kendo\Dataviz\UI\SankeyDataLinks();
$data->links($links);
$sankey->data($data);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$links = new \Kendo\Dataviz\UI\SankeyDataLinks();
$sankey->data(array('links' => $links));
?>

disableAutoLayout

If set to true, the Sankey will not automatically reorder the nodes to reduce the number of links that cross over each other.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value boolean

Example

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->disableAutoLayout(true);
?>

labels

The default labels configuration of the Sankey. The labels configuration options will be overridden by the data.nodes.label configuration.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyLabels|array

Example - using \Kendo\Dataviz\UI\SankeyLabels

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$labels = new \Kendo\Dataviz\UI\SankeyLabels();
$align = 'value';
$labels->align($align);
$sankey->labels($labels);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$align = 'value';
$sankey->labels(array('align' => $align));
?>

legend

The legend configuration options of the Sankey.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyLegend|array

Example - using \Kendo\Dataviz\UI\SankeyLegend

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$legend = new \Kendo\Dataviz\UI\SankeyLegend();
$align = 'value';
$legend->align($align);
$sankey->legend($legend);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$align = 'value';
$sankey->legend(array('align' => $align));
?>

linkClick

Fires when the user clicks a link. For additional information check the linkClick event documentation.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkClick('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onLinkClick(e) {
        // handle the linkClick event.
    }
</script>
<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkClick('onLinkClick');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkClick(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

linkEnter

Fires when the user enters a link. Similar to the mouseenter event. For additional information check the linkEnter event documentation.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkEnter('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onLinkEnter(e) {
        // handle the linkEnter event.
    }
</script>
<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkEnter('onLinkEnter');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkEnter(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

linkLeave

Fires when the user leaves a link. Similar to the mouseleave event. For additional information check the linkLeave event documentation.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkLeave('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onLinkLeave(e) {
        // handle the linkLeave event.
    }
</script>
<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkLeave('onLinkLeave');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->linkLeave(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

The default links configuration of the Sankey. The links configuration options will be overridden by the data.links configuration.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyLinks|array

Example - using \Kendo\Dataviz\UI\SankeyLinks

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$links = new \Kendo\Dataviz\UI\SankeyLinks();
$color = 'value';
$links->color($color);
$sankey->links($links);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$color = 'value';
$sankey->links(array('color' => $color));
?>

messages

The configuration of the messages displayed in the Sankey.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyMessages|array

Example - using \Kendo\Dataviz\UI\SankeyMessages

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$messages = new \Kendo\Dataviz\UI\SankeyMessages();
$tooltipUnits = 'value';
$messages->tooltipUnits($tooltipUnits);
$sankey->messages($messages);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$tooltipUnits = 'value';
$sankey->messages(array('tooltipUnits' => $tooltipUnits));
?>

nodeClick

Fires when the user clicks a node. For additional information check the nodeClick event documentation.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeClick('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onNodeClick(e) {
        // handle the nodeClick event.
    }
</script>
<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeClick('onNodeClick');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeClick(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

nodeEnter

Fires when the user enters a node. Similar to the mouseenter event. For additional information check the nodeEnter event documentation.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeEnter('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onNodeEnter(e) {
        // handle the nodeEnter event.
    }
</script>
<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeEnter('onNodeEnter');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeEnter(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

nodeLeave

Fires when the user leaves a node. Similar to the mouseleave event. For additional information check the nodeLeave event documentation.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeLeave('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onNodeLeave(e) {
        // handle the nodeLeave event.
    }
</script>
<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeLeave('onNodeLeave');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$sankey->nodeLeave(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

nodes

The default nodes configuration of the Sankey. The nodes configuration options will be overridden by the data.nodes configuration.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyNodes|array

Example - using \Kendo\Dataviz\UI\SankeyNodes

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$nodes = new \Kendo\Dataviz\UI\SankeyNodes();
$align = 'value';
$nodes->align($align);
$sankey->nodes($nodes);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$align = 'value';
$sankey->nodes(array('align' => $align));
?>

title

The Sankey title configuration options.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyTitle|array

Example - using \Kendo\Dataviz\UI\SankeyTitle

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$title = new \Kendo\Dataviz\UI\SankeyTitle();
$align = 'value';
$title->align($align);
$sankey->title($title);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$align = 'value';
$sankey->title(array('align' => $align));
?>

tooltip

The tooltip configuration options.

Returns

\Kendo\Dataviz\UI\Sankey

Parameters

$value \Kendo\Dataviz\UI\SankeyTooltip|array

Example - using \Kendo\Dataviz\UI\SankeyTooltip

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$tooltip = new \Kendo\Dataviz\UI\SankeyTooltip();
$appendTo = 'value';
$tooltip->appendTo($appendTo);
$sankey->tooltip($tooltip);
?>

Example - using array

<?php
$sankey = new \Kendo\Dataviz\UI\Sankey('Sankey');
$appendTo = 'value';
$sankey->tooltip(array('appendTo' => $appendTo));
?>
In this article
Not finding the help you need?