Icicle.
PROShow hierarchy depth as aligned bands.
LIVE EXAMPLE
Top to bottom
Appearance and style5
Legend and interaction11
Title and dimensions3
Read the hierarchy with each depth aligned in a band. All values are sample data.
View code
<div id="chart-container" style="width: 100%; min-width: 0;"></div>
<script type="module">
import { defineCustomElement as define0 } from '@syidax/advanced-pro/components/sy-icicle.js';
define0();
// Pro: complete registerLicense at app startup using your issued certificate.
// The website preview certificate is not for use in customer apps.
const specs = [
{
"id": "example-chart",
"tag": "sy-icicle",
"props": {
"data": [
{
"id": "all",
"label": "All",
"children": [
{
"id": "platform",
"label": "Platform",
"color": "#8263d9",
"children": [
{
"id": "web",
"label": "Web",
"value": 42
},
{
"id": "mobile",
"label": "Mobile",
"value": 28
}
]
},
{
"id": "service",
"label": "Services",
"color": "#239c91",
"children": [
{
"id": "consult",
"label": "Consulting",
"value": 18
},
{
"id": "support",
"label": "Support",
"value": 12
}
]
}
]
}
],
"direction": "top-down",
"width": 640,
"height": 360,
"brandPosition": "bottom-right",
"brandLogo": ""
}
}
];
const container = document.querySelector('#chart-container');
const elements = specs.map(({ tag, id, props }) => {
const element = document.createElement(tag);
element.id = id;
Object.assign(element, props);
element.setAttribute('aria-label', 'icicle example chart');
return element;
});
container.replaceChildren(...elements);
const chart = elements.at(-1);
const onEvent = event => {
console.log('nodeClick', event.detail);
};
chart.addEventListener('nodeClick', onEvent);
const observer = new ResizeObserver(([entry]) => {
const width = Math.max(160, Math.floor(entry.contentRect.width));
elements.forEach(element => { element.width = width; });
});
observer.observe(container);
// In an SPA, call this function when the view is disposed.
function disposeChart() {
observer.disconnect();
chart.removeEventListener('nodeClick', onEvent);
container.replaceChildren();
}
</script>Usage and data
#Compare parent-child containment relationships at the same depth.
Very deep hierarchies need substantial space. Focus on the subtree of interest.
Data contract
| Property | Input format |
|---|---|
data | A hierarchy with unique id, children, and leaf values. |
direction | The layout direction: up, down, left, or right. |
Updating data
Assign a new array or object to the property instead of mutating values inside an array. Chart events provide selection results through event.detail. When disposing of the view, clean up ResizeObserver and event listeners registered by your app.
Feature examples
#Try 25 interactive feature examples and inspect their code. Select “Edit in preview” to combine more options in the settings panel above.
Explore subtreesPRO
Double-click a band with children to explore its subtree. Return using the breadcrumb buttons above.
View code
Node labelsPRO
Read node names and values inside the hierarchy bands.
View code
Inspect values with the pointerPRO
Point to data to view the value at that location.
View code
Drag to zoom and panPRO
Drag to zoom and hold Shift to pan. Use Ctrl + wheel to zoom in or out.
View code
Replay animationPRO
Redraw the same example to inspect its initial display animation.
View code
AnimationPRO
Compare 2 examples of Animation. Buttons and options update both the live result and source code.
View code
ColorPRO
Compare 3 examples of Color. Buttons and options update both the live result and source code.
View code
Data inputPRO
Compare 3 examples of Data input. Buttons and options update both the live result and source code.
View code
DrilldownPRO
Compare 4 examples of Drilldown. Buttons and options update both the live result and source code.
View code
LabelPRO
Compare 6 examples of Label. Buttons and options update both the live result and source code.
View code
LayoutPRO
Compare 11 examples of Layout. Buttons and options update both the live result and source code.
View code
Large datasetsPRO
Compare 2 examples of Large datasets. Buttons and options update both the live result and source code.
View code
SizePRO
Compare 1 examples of Size. Buttons and options update both the live result and source code.
View code
TooltipPRO
Compare 12 examples of Tooltip. Buttons and options update both the live result and source code.
View code
Zoom and panPRO
Compare 7 examples of Zoom and pan. Buttons and options update both the live result and source code.
View code
Context menuPRO
Compare 1 examples of Context menu. Buttons and options update both the live result and source code.
View code
Drill ChangePRO
Compare 1 examples of Drill Change. Buttons and options update both the live result and source code.
View code
HoverPRO
Compare 2 examples of Hover. Buttons and options update both the live result and source code.
View code
Node ClickPRO
Compare 1 examples of Node Click. Buttons and options update both the live result and source code.
View code
Data context menuPRO
Compare 1 examples of Data context menu. Buttons and options update both the live result and source code.
View code
ExportPRO
Compare 1 examples of Export. Buttons and options update both the live result and source code.
View code
Read coordinates and dataPRO
Compare 1 examples of Read coordinates and data. Buttons and options update both the live result and source code.
View code
OptionalPRO
Compare 2 examples of Optional. Buttons and options update both the live result and source code.
View code
OverviewPRO
Compare 2 examples of Overview. Buttons and options update both the live result and source code.
View code
Streaming · Add and update live dataPRO
Compare 5 examples of Add and update live data. Buttons and options update both the live result and source code.
View code
Add to your interface
#The code tabs below the preview contain the full data, options, event bindings, and responsive sizing for the current example. Copy them into an app project, such as Vite, that can resolve the installed packages.
API reference
#The full public API for sy-icicle. Pass objects and arrays as JavaScript properties. Select a name to view usage code and type definitions.
Key properties
| Attribute / Property | Type / Default | Description |
|---|---|---|
IcicleDataDefault: undefined | A hierarchy with unique id, children, and leaf values. | |
numberDefault: 900 | Chart width in pixels. Update with ResizeObserver when the container changes. | |
numberDefault: 400 | Chart height in pixels. | |
| brandLogo | stringDefault: undefined | The default is the Syidax logo. With the Pro chart.branding entitlement, use none or a PNG, JPEG, or WebP data URL. |
| brandPosition | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'Default: 'bottom-right' | The corner where the logo is anchored. Applies equally to Community and Pro, on screen and in image exports. |
numberDefault: 1 | Separation between depth bands and siblings, in CSS pixels. | |
IcicleDirectionDefault: 'top-down' | The layout direction: up, down, left, or right. | |
booleanDefault: false | Enable branch navigation, breadcrumb controls and Alt+Enter / Backspace shortcuts. | |
| nodeLabels | IcicleLabelModeDefault: 'auto' | Allowed values: auto, show, hide. Default: 'auto'. |
| nodeLabelValue | booleanDefault: false | Set as an HTML attribute or JavaScript property. type: boolean. |
| chartTitle | stringDefault: undefined | The title inside the chart. Explain the data's unit and meaning alongside it. |
| chartSubtitle | stringDefault: undefined | The subtitle inside the chart. |
CartesianTooltipInputDefault: undefined | Tooltip settings for pointer-driven values, position, and content. | |
| tooltipEnabled | booleanDefault: true | Set as an HTML attribute or JavaScript property. type: boolean. |
| animated | booleanDefault: false | Whether to animate initial display and data changes. |
| animationDuration | numberDefault: 600 | Animation duration in milliseconds. |
| animationEasing | IcicleEasingDefault: 'ease-out' | Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'. |
| animationType | IcicleAnimationTypeDefault: undefined | Allowed values: initial, update. Default: undefined. |
CartesianZoomInputDefault: undefined | Settings for zooming and the visible range. |
Other properties 9
| Attribute / Property | Type / Default | Description |
|---|---|---|
stringDefault: 'auto' | Set as an HTML attribute or JavaScript property. type: string. | |
| activeColor | stringDefault: '#f59e0b' | Set as an HTML attribute or JavaScript property. type: string. |
| enableMouseTracking | booleanDefault: true | Set as an HTML attribute or JavaScript property. type: boolean. |
| tooltipFormat | (detail: IcicleHitDetail) => stringDefault: undefined | Pass as a JavaScript property. type: (detail: IcicleHitDetail) => string. |
| streamSource | IcicleStreamSourceDefault: undefined | A stream source for live data. Check the contract for the specific type. |
| streamMax | numberDefault: undefined | The maximum number of streaming data points to retain. |
| streamWindow | numberDefault: undefined | The streaming data range to keep visible. |
IcicleEngineModeDefault: 'auto' | Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type. | |
IcicleUnavailableBehaviourDefault: 'fallback' | Allowed values: fallback, error. Default: 'fallback'. |
Events 15
| Events | Detail type | Description |
|---|---|---|
IcicleRenderResult & { tier: IcicleEngineTier } | Emits rendering results in detail when chart drawing completes. | |
IcicleHitDetail | CustomEvent.detail type: IcicleHitDetail. Event names are case-sensitive. | |
IcicleHitDetail | null | CustomEvent.detail type: IcicleHitDetail | null. Event names are case-sensitive. | |
IcicleSelectionChangeEventDetail | CustomEvent.detail type: IcicleSelectionChangeEventDetail. Event names are case-sensitive. | |
ChartPointContextMenuEventDetail<IcicleHitDetail> | CustomEvent.detail type: ChartPointContextMenuEventDetail<IcicleHitDetail>. Event names are case-sensitive. | |
{ count: number; replaced: number } | CustomEvent.detail type: { count: number; replaced: number }. Event names are case-sensitive. | |
{ dropped: number } | CustomEvent.detail type: { dropped: number }. Event names are case-sensitive. | |
CartesianTooltipEventDetail | Whether to display the built-in tooltip. | |
void | CustomEvent.detail type: void. Event names are case-sensitive. | |
CartesianTooltipActionEventDetail | CustomEvent.detail type: CartesianTooltipActionEventDetail. Event names are case-sensitive. | |
void | CustomEvent.detail type: void. Event names are case-sensitive. | |
void | CustomEvent.detail type: void. Event names are case-sensitive. | |
void | CustomEvent.detail type: void. Event names are case-sensitive. | |
CartesianZoomChangeEventDetail | CustomEvent.detail type: CartesianZoomChangeEventDetail. Event names are case-sensitive. | |
IcicleDrillChangeEventDetail | CustomEvent.detail type: IcicleDrillChangeEventDetail. Event names are case-sensitive. |
Methods 39
Stencil methods return Promises. Use await within an async function to read the result.
| Method / Arguments | Return type | Description |
|---|---|---|
Promise<IcicleRenderResult> | An asynchronous method. Check the argument and return types below. | |
Promise<IcicleEngineTier> | An asynchronous method. Check the argument and return types below. | |
Promise<string | undefined> | An asynchronous method. Check the argument and return types below. | |
| data: IcicleData | Promise<void> | An asynchronous method. Check the argument and return types below. |
Promise<IcicleNode[]> | An asynchronous method. Check the argument and return types below. | |
| index: number | Promise<IcicleNode | null> | An asynchronous method. Check the argument and return types below. |
| id: string | Promise<IcicleNode | null> | An asynchronous method. Check the argument and return types below. |
Promise<number> | An asynchronous method. Check the argument and return types below. | |
Promise<IcicleExtent> | An asynchronous method. Check the argument and return types below. | |
Promise<IcicleLayoutResult> | The layout as shown (the frozen view while frozen); without a valid license it is refused and nothing is computed. | |
| node: IcicleNodeInput | Promise<void> | An asynchronous method. Check the argument and return types below. |
| nodes: ReadonlyArray<IcicleNodeInput> | Promise<void> | An asynchronous method. Check the argument and return types below. |
| count: number | Promise<void> | An asynchronous method. Check the argument and return types below. |
| nodes: ReadonlyArray<IcicleNodeInput> | Promise<void> | An asynchronous method. Check the argument and return types below. |
Promise<ChartEngineStatus> | Requested vs effective engine and why (CHART-ADD-08), with the chart.type.icicle license state. | |
Promise<IcicleStreamSource | undefined> | An asynchronous method. Check the argument and return types below. | |
Promise<void> | An asynchronous method. Check the argument and return types below. | |
Promise<void> | An asynchronous method. Check the argument and return types below. | |
Promise<void> | An asynchronous method. Check the argument and return types below. | |
| options: { enabled?: boolean; duration?: number; easing?: IcicleEasing; type?: IcicleAnimationType } | Promise<void> | An asynchronous method. Check the argument and return types below. |
| cssX: number, cssY: number | Promise<IcicleHitDetail | null> | An asynchronous method. Check the argument and return types below. |
| index: number | Promise<IcicleHitDetail | null> | An asynchronous method. Check the argument and return types below. |
Promise<void> | An asynchronous method. Check the argument and return types below. | |
Promise<IcicleSelection> | An asynchronous method. Check the argument and return types below. | |
| rootId: string | null | Promise<IcicleDrillChangeEventDetail | null> | Enter a positive branch by stable ID; null returns to the complete forest. Requires drilldown. |
| nodeIndex: number | Promise<IcicleDrillChangeEventDetail | null> | Enter a positive branch by its normalized data index. Requires drilldown. |
Promise<IcicleDrillChangeEventDetail | null> | Return to the current branch's parent, then the forest. | |
Promise<IcicleNode | null> | An asynchronous method. Check the argument and return types below. | |
| index: number | Promise<CartesianTooltipEventDetail | null> | An asynchronous method. Check the argument and return types below. |
| index: number | Promise<CartesianTooltipEventDetail | null> | An asynchronous method. Check the argument and return types below. |
Promise<void> | An asynchronous method. Check the argument and return types below. | |
| request: CartesianZoomRequest | Promise<CartesianZoomChangeEventDetail | null> | Zoom to explicit windows over the unit extents: `x` / `y` as `{ min, max }` or `[min, max]` (`null` clears that orientation). |
| factor: number, anchorFraction?: number | Promise<CartesianZoomChangeEventDetail | null> | Scale the current windows by `factor` (< 1 zooms in) around `anchorFraction` (0..1, default centre). |
| delta: { x?: number; y?: number } | Promise<CartesianZoomChangeEventDetail | null> | Slide the zoomed windows by unit-extent units (`{ x?, y? }`); a no-op at the full extent. |
Promise<CartesianZoomChangeEventDetail | null> | Back to the full diagram. | |
Promise<CartesianZoomState | null> | The current zoom state (`null` = the full diagram). | |
| request?: CartesianZoomExtentRequest | Promise<CartesianZoomExtentDetail | null> | The full extent (0 … 1) and key of the diagram's orientations (`null` before the first layout). |
Promise<ChartDataTable> | An asynchronous method. Check the argument and return types below. | |
Promise<IcicleLabel[]> | The labels as shown (the frozen view while frozen); without a valid license they are refused and nothing is computed. |
No matching APIs.