syncfusion-maui-pyramid-charts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplementing .NET MAUI Pyramid Charts
实现.NET MAUI金字塔图表
Guide users to implement Syncfusion .NET MAUI Pyramid Chart (SfPyramidChart), which visualizes proportions of a total in hierarchical segments, making it ideal for displaying parts-to-whole relationships in high-quality .NET MAUI applications. As a single-series chart without axes, data is represented as percentages where the sum of parts equals the whole.
指导用户实现Syncfusion .NET MAUI金字塔图表(SfPyramidChart),该图表通过层级化分段展示整体的比例关系,非常适合在高质量.NET MAUI应用中呈现部分与整体的关系。作为无坐标轴的单系列图表,数据以百分比形式呈现,各部分之和等于整体。
When to Use This Skill
何时使用本技能
Use this skill when the user needs to:
- Create pyramid charts to visualize hierarchical or proportional data in .NET MAUI applications
- Display parts-to-whole relationships where segments represent percentages of a total
- Implement funnel-like visualizations for sales stages, process flows, or demographic breakdowns
- Add interactive features like tooltips, legends, and data labels to pyramid charts
- Customize appearance with palettes, gradients, segment spacing, and orientation
- Enable modern UI effects like liquid glass styling for iOS/macOS applications
- Export chart visualizations as images (JPEG/PNG) or streams for reports and documents
- Configure data binding from view models to pyramid chart segments
当用户需要以下功能时,可使用本技能:
- 创建金字塔图表,在.NET MAUI应用中可视化层级化或比例化数据
- 展示部分与整体的关系,其中各分段代表整体的百分比
- 实现类漏斗可视化,用于销售阶段、流程流转或人口统计细分场景
- 为金字塔图表添加交互功能,如工具提示、图例和数据标签
- 自定义外观,包括调色板、渐变效果、分段间距和方向
- 启用现代UI效果,如iOS/macOS应用中的液态玻璃样式
- 导出图表可视化内容为图片(JPEG/PNG)或流,用于报告和文档
- 配置数据绑定,将视图模型的数据绑定到金字塔图表分段
Component Overview
组件概述
The SfPyramidChart control provides:
- Single-series hierarchical data visualization
- Interactive tooltips and legends with customization
- Rich data label placement options (Auto, Inner, Center, Outer)
- Custom palette brushes and gradient support
- Two pyramid modes: Linear (height-based) and Surface (area-based)
- Segment spacing control with GapRatio
- Vertical and horizontal orientation options
- Modern liquid glass visual effects (iOS/macOS .NET 10+)
- Export to image formats or streams
- Toggle series visibility through legend interaction
- Scrollable legends for overflow handling
SfPyramidChart控件提供以下功能:
- 单系列层级数据可视化
- 可自定义的交互式工具提示和图例
- 丰富的数据标签位置选项(Auto、Inner、Center、Outer)
- 自定义调色板画刷和渐变支持
- 两种金字塔模式:Linear(基于高度)和Surface(基于面积)
- 通过GapRatio控制分段间距
- 垂直和水平方向选项
- 现代液态玻璃视觉效果(iOS/macOS .NET 10+)
- 导出为图片格式或流
- 通过图例交互切换系列可见性
- 处理溢出的可滚动图例
Documentation and Navigation Guide
文档与导航指南
Getting Started
入门指南
📄 Read: references/getting-started.md
When the user needs to:
- Install the Syncfusion.Maui.Charts NuGet package
- Initialize SfPyramidChart in XAML or C#
- Create view models and bind data to the chart
- Configure ItemsSource, XBindingPath, and YBindingPath
- Understand basic pyramid chart setup and namespace imports
- See complete working examples with data binding
📄 阅读: references/getting-started.md
当用户需要以下操作时:
- 安装Syncfusion.Maui.Charts NuGet包
- 在XAML或C#中初始化SfPyramidChart
- 创建视图模型并将数据绑定到图表
- 配置ItemsSource、XBindingPath和YBindingPath
- 了解金字塔图表的基本设置和命名空间导入
- 查看包含数据绑定的完整工作示例
Data Labels
数据标签
📄 Read: references/data-labels.md
When the user needs to:
- Enable and display data labels on pyramid segments
- Configure PyramidDataLabelSettings for label customization
- Control label placement (Auto, Inner, Center, Outer)
- Set label context to show X values or Y values
- Style labels with fonts, colors, backgrounds, borders, and corner radius
- Use series palette colors for label backgrounds
- Apply margins and customize label appearance
📄 阅读: references/data-labels.md
当用户需要以下操作时:
- 在金字塔分段上启用并显示数据标签
- 配置PyramidDataLabelSettings以自定义标签
- 控制标签位置(Auto、Inner、Center、Outer)
- 设置标签上下文以显示X值或Y值
- 使用字体、颜色、背景、边框和圆角半径设置标签样式
- 为标签背景使用系列调色板颜色
- 设置边距并自定义标签外观
Legend
图例
📄 Read: references/legend.md
When the user needs to:
- Add and configure ChartLegend to display segment information
- Customize legend label styles (font, color, size, attributes)
- Set legend icon types and customize icon appearance
- Position legends (Top, Bottom, Left, Right)
- Create floating legends with offset positioning
- Enable toggle series visibility through legend taps
- Customize legend layout with ItemsLayout
- Use custom legend item templates
- Handle LegendItemCreated events
- Override maximum size requests for legend view
📄 阅读: references/legend.md
当用户需要以下操作时:
- 添加并配置ChartLegend以显示分段信息
- 自定义图例标签样式(字体、颜色、大小、属性)
- 设置图例图标类型并自定义图标外观
- 定位图例(Top、Bottom、Left、Right)
- 创建带偏移定位的浮动图例
- 通过点击图例启用系列可见性切换
- 使用ItemsLayout自定义图例布局
- 使用自定义图例项模板
- 处理LegendItemCreated事件
- 覆盖图例视图的最大尺寸请求
Tooltip
工具提示
📄 Read: references/tooltip.md
When the user needs to:
- Enable tooltips for displaying segment information on hover
- Configure ChartTooltipBehavior for tooltip customization
- Style tooltip appearance (background, fonts, colors, margins)
- Control tooltip display duration
- Create custom tooltip templates for advanced UI
- Bind tooltip content to item data properties
📄 阅读: references/tooltip.md
当用户需要以下操作时:
- 启用工具提示,在悬停时显示分段信息
- 配置ChartTooltipBehavior以自定义工具提示
- 设置工具提示外观(背景、字体、颜色、边距)
- 控制工具提示显示时长
- 创建自定义工具提示模板以实现高级UI
- 将工具提示内容绑定到项数据属性
Appearance and Customization
外观与自定义
📄 Read: references/appearance-customization.md
When the user needs to:
- Apply custom palette brushes to pyramid segments
- Use gradient fills (LinearGradientBrush, RadialGradientBrush)
- Switch between Linear and Surface pyramid modes
- Understand mode differences (height-based vs area-based)
- Control segment spacing with GapRatio property
- Implement visual styling best practices
- Create sophisticated gradient effects for segments
📄 阅读: references/appearance-customization.md
当用户需要以下操作时:
- 为金字塔分段应用自定义调色板画刷
- 使用渐变填充(LinearGradientBrush、RadialGradientBrush)
- 在Linear和Surface金字塔模式之间切换
- 了解模式差异(基于高度vs基于面积)
- 使用GapRatio属性控制分段间距
- 实现视觉样式最佳实践
- 为分段创建复杂的渐变效果
Orientation and Visual Effects
方向与视觉效果
📄 Read: references/orientation-and-effects.md
When the user needs to:
- Change chart orientation from Vertical to Horizontal
- Implement liquid glass visual effects (iOS/macOS .NET 10+)
- Integrate SfGlassEffectView for modern UI styling
- Enable glass effects for tooltips
- Configure EffectType (Regular vs Clear glass appearance)
- Apply best practices for glass effects over backgrounds
- Use transparent backgrounds in custom tooltip templates
📄 阅读: references/orientation-and-effects.md
当用户需要以下操作时:
- 将图表方向从Vertical改为Horizontal
- 实现液态玻璃视觉效果(iOS/macOS .NET 10+)
- 集成SfGlassEffectView以实现现代UI样式
- 为工具提示启用玻璃效果
- 配置EffectType(常规vs透明玻璃外观)
- 应用玻璃效果在背景上的最佳实践
- 在自定义工具提示模板中使用透明背景
Exporting
导出功能
📄 Read: references/exporting.md
When the user needs to:
- Export pyramid charts as images (JPEG or PNG)
- Use SaveAsImage method for file export
- Understand platform-specific save locations
- Configure file writing permissions for Android and Windows Phone
- Set iOS photo album access permissions
- Export charts as streams using GetStreamAsync
- Integrate chart streams with PDF, Excel, or Word components
- Handle ImageFileFormat options
📄 阅读: references/exporting.md
当用户需要以下操作时:
- 将金字塔图表导出为图片(JPEG或PNG)
- 使用SaveAsImage方法进行文件导出
- 了解特定平台的保存位置
- 配置Android和Windows Phone的文件写入权限
- 设置iOS相册访问权限
- 使用GetStreamAsync将图表导出为流
- 将图表流与PDF、Excel或Word组件集成
- 处理ImageFileFormat选项