setOptionsObject
Sets the options of the Sankey.
Example - Setting the Sankey options
<div id="sankey" style="width: 500px; height: 200px;"></div>
<script>
$("#sankey").kendoSankey({
data: {
nodes: [
{ id: 1, label: { text: "Node 1" } },
{ id: 2, label: { text: "Node 2" } },
{ id: 3, label: { text: "Node 3" } }
],
links: [
{ sourceId: 1, targetId: 3, value: 2 },
{ sourceId: 2, targetId: 3, value: 1 }
]
}
});
var sankey = $("#sankey").getKendoSankey();
sankey.setOptions({
links: {
color: "green",
colorType: "static"
}
});
</script>
Parameters
options Object
The configuration options to be set, same type as the Sankey initialization options. The supported configuration options are:
data
—The data of the Sankey.disableAutoLayout
—If set totrue
, the Sankey will not automatically calculate the nodes' positions.labels
—The default label options of the Sankey.legend
—The legend configuration options.links
—The default link options of the Sankey.nodes
—The default node options of the Sankey.title
—The title configuration options.tooltip
—The tooltip configuration options.
In this article