/syncfusion-vue:syncfusion-vue-sankey-chartfrom Syncfusion Vue UI Components
Always guide when user needs to implement Syncfusion Vue Sankey Chart for flow/energy/process visualization, configure nodes, links, styling, interactivity, accessibility, or handle RTL support in Vue applications. Trigger immediately for any Sankey chart implementation request and data flow diagram creation.
Ships in Syncfusion Vue UI Components. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A corrected and implementation-ready guide for the Syncfusion Vue Sankey Chart component in Vue 3 using the Composition API.
Use this skill when the user needs to:
The Syncfusion Sankey Chart is a weighted-flow visualization component that uses:
It is most useful when the user wants to show flow relationships instead of static comparison.
Good use cases include:
Avoid Sankey when the requirement is primarily:
The Syncfusion Vue 3 Sankey Chart has comprehensive API documentation available at:
The api-reference.md file includes:
Every property, event, method, and model in the API reference includes a direct link to the official Syncfusion Vue documentation.
All API properties documented in api-reference.md are:
For details on how the API reference was generated, see API_GENERATION_PROMPT.md.
The recommended Vue 3 implementation approach is:
<script setup>provide from vueThe Sankey component depends on exact ID matching.
Node rules:
idLink rules:
sourceId must match an existing node IDtargetId must match an existing node IDvalue must be numeric and positiveThe main appearance categories are:
For production usage:
width="100%" and a fixed heightopacity moderate so overlapping links remain readableLabels improve readability, but long labels can visually crowd the chart.
Best practices:
Use legends when colors communicate categories or grouping.
Use titles when the chart is viewed outside of surrounding explanatory text.
Common practice:
The Sankey component can support:
In Vue 3 Composition API, event handlers should be declared as functions inside <script setup> and bound directly in the template.
For accessibility:
For RTL:
This version corrects the structural and Composition API issues while keeping the example minimal and runnable.
<template>
<div class="container">
<ejs-sankey
id="minimal-sankey"
width="100%"
:height="chartHeight"
:tooltip="tooltip"
>
<e-sankey-nodes>
<e-sankey-node id="Source A" :label="{ text: 'Source A' }" />
<e-sankey-node id="Target B" :label="{ text: 'Target B' }" />
</e-sankey-nodes>
<e-sankey-links>
<e-sankey-link source-id="Source A" target-id="Target B" :value="100" />
</e-sankey-links>
</ejs-sankey>
</div>
</template>
<script setup>
import { provide, ref } from 'vue';
import {
SankeyComponent as EjsSankey,
SankeyNodesCollectionDirective as ESankeyNodes,
SankeyNodeDirective as ESankeyNode,
SankeyLinksCollectionDirective as ESankeyLinks,
SankeyLinkDirective as ESankeyLink,
SankeyTooltip
} from '@syncfusion/ej2-vue-charts';
const chartHeight = ref('420px');
const tooltip = ref({
enable: true
});
provide('sankey', [SankeyTooltip]);
</script>
<style>
.container {
width: 100%;
}
</style>
This version keeps the original order and intent, but corrects the Vue 3 Composition API wiring and Syncfusion directive usage.
<template>
<div class="energy-diagram">
<ejs-sankey
id="energy-flow-sankey"
width="100%"
height="500px"
:title="title"
:linkStyle="linkStyle"
:tooltip="tooltip"
:legendSettings="legendSettings"
>
<e-sankey-nodes>
<e-sankey-node id="Solar" :label="{ text: 'Solar' }" />
<e-sankey-node id="Wind" :label="{ text: 'Wind' }" />
<e-sankey-node id="Coal" :label="{ text: 'Coal' }" />
<e-sankey-node id="Generation" :label="{ text: 'Generation' }" />
<e-sankey-node id="Distribution" :label="{ text: 'Distribution' }" />
<e-sankey-node id="Consumption" :label="{ text: 'Consumption' }" />
</e-sankey-nodes>
<e-sankey-links>
<e-sankey-link source-id="Solar" target-id="Generation" :value="300" />
<e-sankey-link source-id="Wind" target-id="Generation" :value="200" />
<e-sankey-link source-id="Coal" target-id="Generation" :value="500" />
<e-sankey-link source-id="Generation" target-id="Distribution" :value="900" />
<e-sankey-link source-id="Distribution" target-id="Consumption" :value="850" />
</e-sankey-links>
</ejs-sankey>
</div>
</template>
<script setup>
import { provide, ref } from 'vue';
import {
SankeyComponent as EjsSankey,
SankeyNodesCollectionDirective as ESankeyNodes,
SankeyNodeDirective as ESankeyNode,
SankeyLinksCollectionDirective as ESankeyLinks,
SankeyLinkDirective as ESankeyLink,
SankeyTooltip,
SankeyLegend
} from '@syncfusion/ej2-vue-charts';
const title = ref('Energy Flow System');
const linkStyle = ref({
opacity: 0.6,
curvature: 0.55,
colorType: 'Source'
});
const tooltip = ref({
enable: true
});
const legendSettings = ref({
visible: true,
position: 'Bottom'
});
provide('sankey', [SankeyTooltip, SankeyLegend]);
</script>
When: Visualizing a process with multiple intermediate stages
const nodes = [
{ id: 'Supplier A', label: { text: 'Supplier A' } },
{ id: 'Warehouse', label: { text: 'Warehouse' } },
{ id: 'Distribution', label: { text: 'Distribution' } },
{ id: 'Customer', label: { text: 'Customer' } }
];
const links = [
{ sourceId: 'Supplier A', targetId: 'Warehouse', value: 1000 },
{ sourceId: 'Warehouse', targetId: 'Distribution', value: 950 },
{ sourceId: 'Distribution', targetId: 'Customer', value: 900 }
];
When: One source distributes into multiple targets
const links = [
{ sourceId: 'Power Plant', targetId: 'Residential', value: 600 },
{ sourceId: 'Power Plant', targetId: 'Commercial', value: 400 },
{ sourceId: 'Power Plant', targetId: 'Industrial', value: 300 }
];
When: Multiple sources merge into a shared destination
const links = [
{ sourceId: 'Product A', targetId: 'Revenue', value: 500 },
{ sourceId: 'Product B', targetId: 'Revenue', value: 300 },
{ sourceId: 'Service C', targetId: 'Revenue', value: 200 }
];
When: Color needs to represent the flow origin or type
const linkStyle = {
colorType: 'Source',
opacity: 0.7,
curvature: 0.45
};
When: Users need interaction-driven analysis such as drill-down or details-on-hover
<template>
<ejs-sankey
id="interactive-sankey"
width="100%"
height="450px"
:tooltip="{ enable: true }"
:nodeClick="onNodeClick"
:mouseMove="onMouseMove"
>
<e-sankey-nodes>
<e-sankey-node id="Input" :label="{ text: 'Input' }" />
<e-sankey-node id="Processing" :label="{ text: 'Processing' }" />
<e-sankey-node id="Output" :label="{ text: 'Output' }" />
</e-sankey-nodes>
<e-sankey-links>
<e-sankey-link source-id="Input" target-id="Processing" :value="120" />
<e-sankey-link source-id="Processing" target-id="Output" :value="110" />
</e-sankey-links>
</ejs-sankey>
</template>
<script setup>
import { provide, ref } from 'vue';
import {
SankeyComponent as EjsSankey,
SankeyNodesCollectionDirective as ESankeyNodes,
SankeyNodeDirective as ESankeyNode,
SankeyLinksCollectionDirective as ESankeyLinks,
SankeyLinkDirective as ESankeyLink,
SankeyTooltip,
SankeyLegend
} from '@syncfusion/ej2-vue-charts';
provide('sankey', [SankeyTooltip, SankeyLegend]);
function onNodeClick(args) {
console.log('Node clicked:', args);
}
function onMouseMove(args) {
console.log('Pointer move:', args);
}
</script>
Complete API reference with all 30+ properties available in api-reference.md.
Official API Link: https://ej2.syncfusion.com/vue/documentation/api/sankey/
Essential props for basic usage:
| Prop | Type | Official Link | Purpose |
|---|---|---|---|
width | string | Property API | Chart width (default: '100%') |
height | string | Property API | Chart height (default: '420px') |
title | string | Property API | Main title text |
subTitle | string | Property API | Subtitle text |
linkStyle | object | SankeyLinkSettingsModel | Global link styling (opacity, curvature, colorType) |
nodeStyle | object | SankeyNodeSettingsModel | Global node styling (width, padding, fill, stroke) |
tooltip | object | SankeyTooltipSettingsModel | Tooltip configuration (enable, format, border, opacity) |
legendSettings | object | SankeyLegendSettingsModel | Legend visibility and placement (visible, position, background) |
labelSettings | object | SankeyLabelSettingsModel | Node label styling (visible, fontFamily, fontSize, color) |
margin | object | MarginModel | Outer spacing around the chart (left, right, top, bottom) |
orientation | string | Enum | Flow direction ('Horizontal' or 'Vertical') |
enableRtl | boolean | Property API | Right-to-left layout support |
theme | string | ChartTheme | Color theme (Material, Bootstrap, Tailwind, etc.) |
animation | object | AnimationModel | Animation settings (enable, duration) |
For detailed node API, see SankeyNode Properties and SankeyNodeModel API.
| Prop | Type | Official Link | Purpose |
|---|---|---|---|
id | string | Property API | Unique node identifier (required) |
label | object | LabelModel | Node label configuration with text, color, fontSize |
color | string | Property API | Node fill color |
offset | number | Property API | Manual vertical positioning adjustment |
For detailed link API, see SankeyLink Properties and SankeyLinkModel API.
| Prop | Type | Official Link | Purpose |
|---|---|---|---|
sourceId | string | Property API | Source node ID (required) |
targetId | string | Property API | Target node ID (required) |
value | number | Property API | Flow magnitude/weight (required, must be positive) |
color | string | Property API | Per-link color override |
nodes - Array of SankeyNodeModel objects defining chart entitieslinks - Array of SankeyLinkModel objects defining flows between nodesnodeStyle - Global node appearance via SankeyNodeSettingsModel (width, padding, fill, stroke, opacity)linkStyle - Global link appearance via SankeyLinkSettingsModel (opacity, curvature, colorType: 'Source'|'Target'|'Blend')theme - Visual theme selection (Material, Bootstrap, Tailwind, etc.)background - Chart container background colorborder - Chart container border styling via BorderModelwidth - Chart width as CSS value (e.g., '100%', '500px')height - Chart height as CSS value (default: '420px')margin - Spacing around chart via MarginModel (left, right, top, bottom)orientation - 'Horizontal' (default) or 'Vertical' flow directiontitle - Chart title texttitleStyle - Title styling via SankeyTitleStyleModel (fontFamily, size, color, fontWeight)subTitle - Subtitle textlabelSettings - Node label configuration via SankeyLabelSettingsModel (visible, fontFamily, fontSize, color, padding)tooltip - Tooltip behavior via SankeyTooltipSettingsModel (enable, format string, opacity, border)legendSettings - Legend display via SankeyLegendSettingsModel (visible, position, background, enableHighlight)animation - Animation control via AnimationModel (enable, duration in ms)See Complete API Reference for all 30+ properties, methods, events, and data models with full documentation and examples.
Official API Documentation: https://ej2.syncfusion.com/vue/documentation/api/sankey/
Use Case 1: Supply Chain Visualization
Map goods from supplier to warehouse to distribution to customer. Use links with realistic value amounts and nodeStyle.width to control node proportions.
Use Case 2: Energy Flow Diagram
Show energy generation sources and how they move through the grid. Use linkStyle.colorType: 'Source' to color links by their origin, and tooltip to show detailed values.
Use Case 3: Website Traffic Flow
Represent movement from landing pages to internal pages to conversion points. Use animation for visual engagement and legendSettings to categorize traffic sources.
Use Case 4: Budget Allocation
Display how budget travels from a department into programs and activities. Use labelSettings to show currency values and theme for professional appearance.
Use Case 5: Data Pipeline
Show how records move through ingestion, transformation, storage, and reporting. Use orientation: 'Horizontal' for left-to-right flow and nodeStyle.opacity to de-emphasize bottleneck stages.
Missing provide import in the minimal example
The original example used provide('sankey', [...]) without importing provide from Vue.
Incorrect child directive tag names
The original examples used e-sankey-nodes-collection and e-sankey-links-collection. The corrected structure uses e-sankey-nodes and e-sankey-links, which aligns with the directive registration pattern.
Inconsistent directive aliases
The original import aliases were named like collection directives but were paired with nonstandard template tags. The corrected examples keep the imported directives and align them with the proper template usage.
Composition API structure mismatch
The document said Vue 3 Composition API, but some snippets still reflected patterns that would confuse users moving from Vue 2 or Options API.
Template attribute normalization
Link attributes are safer and clearer in kebab-case inside Vue templates, such as source-id and target-id.
Minimal example lacked enough visible configuration for debugging
Enabling tooltip in the minimal sample makes validation easier during first render testing.
Layout robustness
A Sankey chart may appear broken when the container collapses. Explicit height or min-height prevents false rendering issues.
Pattern 5 was written in Options API style
The original event example used methods, which is not the correct presentation style for a Vue 3 <script setup> guide.
Documentation consistency issue
The original document mixed implementation guidance, conceptual notes, and partial code conventions. The corrected copy keeps the order intact but makes the code runnable and the guidance Vue 3 specific.
Future reference for troubleshooting
If a Sankey chart does not render correctly, verify these in order:
providereferences/accessibility-and-rtl.md (opens in a new tab)references/advanced-features.md (opens in a new tab)references/api-reference.md (opens in a new tab)references/appearance-and-styling.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/labels-and-tooltips.md (opens in a new tab)references/legends-and-titles.md (opens in a new tab)references/nodes-and-links.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
49 skills in this plugin
/syncfusion-vue-3d-chartImplementing Syncfusion Vue 3D Chart component for interactive 3D data visualization. Use this skill ALWAYS when user needs to create 3D charts, visualize data in 3D columns/bars, customize 3D chart axes, configure 3D chart types, style 3D chart appearance, implement user interactions like tooltips and selection, or export/print 3D charts. Essential for displaying multidimensional data with rotation, perspective, and enhanced visual appeal./syncfusion-vue-3d-circular-chartCreate interactive 3D pie and donut charts using Syncfusion Vue components. Use this skill whenever the user needs to visualize data as circular/pie charts with 3D perspective, create donut visualizations, add data labels to charts, customize chart legends, tooltips, empty points and animations. Trigger when user mentions 3D charts, pie charts, donut charts, circular visualizations, 3D pie, data visualization, chart rotation, chart interactivity, or circular types./syncfusion-vue-accumulation-chartMaster Syncfusion Vue Accumulation Charts for building pie, doughnut, funnel, and pyramid visualizations. Always includes data binding, legend configuration, data labels, and accessibility features. Immediately implement any chart type, customize styling, configure legends, format data labels, and add drill-down interactivity using ALWAYS comprehensive examples and patterns.npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-vue