Orientation in .NET MAUI Pyramid Chart

8 Jul 20261 minute to read

The rendering direction of the pyramid chart can be changed using the Orientation property. The default value of this property is Vertical, which arranges segments from top to bottom. It can be set to Horizontal to render segments from right to left.

NOTE

Prerequisite: Ensure that the required NuGet package is installed, the necessary namespaces are imported, and the Pyramid Chart control is properly configured in your application. For detailed setup and configuration instructions, refer to the Getting Started guide.

<chart:SfPyramidChart ItemsSource="{Binding Data}" 
                      XBindingPath="XValue" 
                      YBindingPath="YValue"
                      Orientation="Horizontal">
</chart:SfPyramidChart>
SfPyramidChart chart = new SfPyramidChart();
ViewModel viewModel = new ViewModel();
chart.BindingContext = viewModel;

chart.ItemsSource = viewModel.Data;
chart.XBindingPath = "XValue";
chart.YBindingPath = "YValue";
chart.Orientation = ChartOrientation.Horizontal;

this.Content = chart;

Orientation in .NET MAUI Pyramid Chart