sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function SankeyChart

SankeyChart(props): Promise< ReactNode > | ReactNode

A React component that visualizes flow and volume between nodes using a Sankey diagram. Node width represents the total flow through that node; link width represents the flow between two connected nodes.

Parameters

ParameterTypeDescription
propsSankeyChartPropsSankey chart properties

Returns

Promise< ReactNode > | ReactNode

Sankey Chart component

Example

import { SankeyChart } from '@sisense/sdk-ui';
import * as DM from './sample-ecommerce';
import { measureFactory } from '@sisense/sdk-data';

const CodeExample = () => {
  return (
    <SankeyChart
      dataSet={DM.DataSource}
      dataOptions={{
        category: [DM.Commerce.Gender, DM.Commerce.AgeRange],
        value: measureFactory.sum(DM.Commerce.Revenue),
      }}
      styleOptions={{
        orientation: 'horizontal',
        nodeAlignment: 'top',
      }}
    />
  );
};

export default CodeExample;
Sankey chart example 1
Last Updated: