用途:在 WPF 应用中使用 Syncfusion TreeMap(SfTreeMap)控件,将层级数据以嵌套矩形呈现,矩形大小代表数量权重,颜色可表达另一数据维度,适合大数据集的空间高效可视化,如股票分析、用量统计、分类数据与热力图。
主要能力:支持多种布局算法(Squarified、SliceAndDiceAuto、SliceAndDiceHorizontal、SliceAndDiceVertical);颜色映射策略包括 UniColorMapping、RangeBrushColorMapping、DesaturationColorMapping、PaletteColorMapping、GroupColorMapping,并区分叶节点与层级颜色映射;支持 TreeMapFlatLevel 层级、GroupPath 分组、GroupGap 间距、HeaderHeight 与 HeaderTemplate 表头、ShowLabels 标签;叶节点可设置 LeafBorderBrush、LeafBorderThickness、LeafLabelPath、LeafTemplate;交互支持选择(Default、Multiple)、SelectedItems、工具提示与 TooltipTemplate、EnableDrillDown 下钻;提供图例(ShowLegend、LegendType、LegendHeight/Width、LegendTemplate)与键盘导航、WCAG 相关无障碍支持及主题。
使用方式:引用程序集 Syncfusion.SfTreeMap.WPF,命名空间 Syncfusion.UI.Xaml.TreeMap,在 XAML 中添加 xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.TreeMap;assembly=Syncfusion.SfTreeMap.WPF"。设置 ItemsSource、WeightValuePath、ColorValuePath、ItemsLayoutMode,并按需配置 LeafColorMapping、Levels、LeafItemSettings、SelectionModes、TooltipTemplate、图例等。数据模型可用 ObservableCollection 等集合,支持层级与扁平数据绑定。
限制:资料未提供具体收费、价格、平台版本要求与性能指标,暂未提供;实际可用性取决于是否安装对应 Syncfusion 程序集与授权。