/syncfusion-react:syncfusion-react-treemapsfrom Syncfusion React UI Components
Comprehensive guide for implementing Syncfusion React TreeMap component. Use this skill when users need help creating hierarchical data visualizations, configuring drill-down interactions, applying color mapping, working with multiple hierarchy levels, customizing leaf items, or troubleshooting TreeMap data binding and display issues. Covers installation, data binding patterns, layouts, legends, tooltips, selection, accessibility, and advanced customization for interactive hierarchical data exploration.
Ships in Syncfusion React 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 comprehensive guide for implementing and customizing the Syncfusion React TreeMap component for hierarchical data visualization. The TreeMap displays nested rectangles where area represents data values, supporting multiple hierarchy levels, interactive drill-down, and rich customization.
Use this skill when you need to:
The TreeMap component is a powerful hierarchical data visualization tool that:
Choose TreeMap when:
Don't use TreeMap for:
📄 Read: references/getting-started.md
📄 Read: references/data-binding.md
📄 Read: references/color-mapping.md
📄 Read: references/layouts.md
📄 Read: references/drilldown.md
📄 Read: references/leaf-items-and-labels.md
📄 Read: references/legends-tooltips-selection.md
📄 Read: references/customization-accessibility.md
import * as React from 'react';
import { TreeMapComponent } from '@syncfusion/ej2-react-treemap';
export function TreeMapDemo() {
const data = [
{ Title: 'USA', State: 'California', Sales: 2830 },
{ Title: 'USA', State: 'Texas', Sales: 2020 },
{ Title: 'USA', State: 'Florida', Sales: 1880 },
{ Title: 'Germany', State: 'Berlin', Sales: 1880 },
{ Title: 'Germany', State: 'Munich', Sales: 1550 },
];
return (
<TreeMapComponent
height="350px"
dataSource={data}
weightValuePath="Sales"
leafItemSettings={{
labelPath: 'State',
colorMapping: [
{ from: 1500, to: 2000, color: '#FF6B6B' },
{ from: 2000, to: 2500, color: '#4ECDC4' },
{ from: 2500, to: 3000, color: '#45B7D1' }
]
}}
/>
);
}
<TreeMapComponent
enableDrillDown={true}
dataSource={data}
weightValuePath="Sales"
>
<LevelsDirective>
<LevelDirective groupPath="Country" />
<LevelDirective groupPath="State" />
<LevelDirective groupPath="City" />
</LevelsDirective>
</TreeMapComponent>
When to use: Exploring multilevel hierarchies with progressive disclosure through drill-down interaction.
<TreeMapComponent
equalColorValuePath="Category"
leafItemSettings={{
colorMapping: [
{ value: 'Electronics', color: '#3498db' },
{ value: 'Furniture', color: '#e74c3c' },
{ value: 'Clothing', color: '#2ecc71' }
]
}}
/>
When to use: Categorizing items with distinct colors for quick visual identification.
<TreeMapComponent
rangeColorValuePath="Sales"
leafItemSettings={{
colorMapping: [
{ from: 0, to: 10000, color: '#90EE90' },
{ from: 10000, to: 50000, color: '#FFD700' },
{ from: 50000, to: 100000, color: '#FF6347' }
]
}}
/>
When to use: Showing magnitude differences through color intensity for performance metrics, sales, or other continuous values.
| Prop | Purpose | Common Values |
|---|---|---|
dataSource | Hierarchical or flat data array | Array of objects |
weightValuePath | Property path for item sizing | e.g., 'Sales', 'Count' |
equalColorValuePath | Property for categorical coloring | e.g., 'Category', 'Type' |
rangeColorValuePath | Property for range-based coloring | e.g., 'Sales', 'Value' |
enableDrillDown | Enable click-to-drill interaction | true/false |
layoutType | Spatial layout algorithm | 'Squarified', 'Horizontal', 'Vertical', 'SliceAndDice' |
height | Component height | e.g., '350px', '100%' |
palette | Array of colors for items | ['#color1', '#color2', ...] |
This section summarizes the most commonly used TreeMap props, methods, and events. For the complete API with typed models, see the official docs: https://ej2.syncfusion.com/react/documentation/api/treemap/index-default
dataSource (Array|DataManager) — The data source for TreeMap. Can be flat or hierarchical. Default: nullweightValuePath (string) — Path to numeric value used for sizing each item. Default: nullcolorValuePath (string) — Field used for continuous color mapping (range palettes).equalColorValuePath (string[]) — Field(s) for categorical/equal color mapping.rangeColorValuePath (string[]) — Field(s) used for range-based color mapping.leafItemSettings (object) — Configuration for leaf items (e.g., labelPath, colorMapping, border, gap).levels (LevelSettingsModel[]) — Array of level configuration objects to define grouping and appearance per hierarchy level.layoutType (string) — Layout algorithm: Squarified (default), SliceAndDiceHorizontal, SliceAndDiceVertical, SliceAndDiceAuto, etc.enableDrillDown (boolean) — Enable drill-down interaction. Default: falsedrillDownView (boolean) — Use drill-down view layout. Default: falseenableBreadcrumb (boolean) — Show breadcrumb when drilling. Default: falsebreadcrumbConnector (string) — Separator shown between breadcrumb items.initialDrillDown (object) — Configure initial drill-down level/state.enableHtmlSanitizer (boolean) — Sanitize HTML in templates/tooltips. Default: trueenablePersistence (boolean) — Persist component state between reloads. Default: falseenableRtl (boolean) — Enable right-to-left rendering. Default: falsepalette (string[]) — Array of palette colors used for fills.highlightSettings (object) — Highlight configuration and styling.selectionSettings (object) — Selection configuration (mode, enable, etc.).legendSettings (object) — Legend configuration (position, title, shape, etc.).titleSettings (object) — Title and subtitle configuration.tooltipSettings (object) — Tooltip templates and behavior.format (string) — Formatting string for labels or values.useGroupingSeparator (boolean) — Apply grouping separator for numeric values. Default: truedescription (string) — Accessibility description for the TreeMap.margin (object) — Margin settings for the component ({ top, right, bottom, left }).height / width (string|number) — Size of the component (e.g., 350px or 100%).theme (string) — Theme name (e.g., Material, Bootstrap).destroy() — Clean up the TreeMap instance and remove listeners.export(type, fileName, orientation, allowDownload) — Export the TreeMap as PNG|JPEG|SVG|PDF. Returns a Promise for PDF export flows.print(id) — Print TreeMap content by element id, DOM element, or array of ids.doubleClickOnTreeMap(e) — Programmatically trigger double-click behavior.selectItem(levelOrder, isSelected) — Select or deselect an item by level order array.load / loaded — Lifecycle events fired before/after component load.itemRendering — Fired while items are rendered; use to customize item appearance.click / itemClick — Fired on item click.doubleClick — Fired on item double click.drillStart / drillEnd — Fired when drill-down starts/ends.itemHighlight / itemSelected — Events for highlight/selection lifecycle.legendRendering / legendItemRendering — Events during legend rendering.tooltipRendering — Fired when tooltip content is prepared.resize — Fired on component resize.beforePrint / print — Hooks around printing/export.import { TreeMapComponent, LevelsDirective, LevelDirective, Inject, TreeMapTooltip } from '@syncfusion/ej2-react-treemap';
<TreeMapComponent dataSource={data} weightValuePath="value" enableDrillDown={true}>
<LevelsDirective>
<LevelDirective groupPath="category" />
</LevelsDirective>
<Inject services={[TreeMapTooltip]} />
</TreeMapComponent>
Ready to implement TreeMap? Start with references/getting-started.md or choose a specific feature guide from the navigation options above.
references/api.md (opens in a new tab)references/color-mapping.md (opens in a new tab)references/customization-accessibility.md (opens in a new tab)references/data-binding.md (opens in a new tab)references/drilldown.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/layouts.md (opens in a new tab)references/leaf-items-and-labels.md (opens in a new tab)references/legends-tooltips-selection.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-reactOther plugins' skills for the same job
65 skills in this plugin
/syncfusion-react-3d-chartImplement Syncfusion React 3D Chart component from the @syncfusion/ej2-react-charts package. Use this skill when users need 3D column, bar, stacked column, stacked bar, or 100% stacked chart variations. Covers Chart3DComponent, axis configuration (category, numeric, datetime, logarithmic), data binding, multiple panes, data labels, legends, tooltips, selection, print/export, theming, and accessibility./syncfusion-react-3d-circular-chartImplements the Syncfusion React 3D Circular Chart component for pie and donut chart visualization. Use this when users need 3D circular charts, data labels, legends, tooltips, or empty point handling. Guides through installation, configuration, customization, and troubleshooting of 3D Circular Charts in React applications./syncfusion-react-accordionGuide users to implement Syncfusion React Accordion component for collapsible content panels. Use this skill whenever the user needs to create expandable/collapsible sections, accordion layouts, tabbed content panels, multi-step forms, FAQs, or navigation with expandable items. Covers component setup, expand modes, animations, dynamic content loading, styling, events, lifecycle, React hooks integration, and complete API reference.