Search results

Pyramid Chart

To render a pyramid series, use the series Type as Pyramid.

default.razor
<EjsAccumulationChart Title="Mobile Browser Statistics"> 
        <AccumulationChartSeriesCollection> 
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" 
                                     Name="Browser" Type="AccumulationType.Pyramid">
            </AccumulationChartSeries> 
        </AccumulationChartSeriesCollection> 
  
        <AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings>
</EjsAccumulationChart>

@code{
    public class Statistics
    {
        public string Browser;
        public double Users;

    }

    public List<Statistics> StatisticsDetails = new List<Statistics> 
      {
         new Statistics { Browser = "Chrome", Users = 37 },
         new Statistics { Browser = "UC Browser", Users = 17 },
         new Statistics { Browser = "iPhone", Users = 19 },
         new Statistics { Browser = "Others", Users = 4  },
         new Statistics { Browser = "Opera", Users = 11 },
         new Statistics { Browser = "Android", Users = 12 },
     };
}

Pyramid Chart

Mode

The Pyramid chart supports linear and surface modes of rendering. The default type of the PyramidMode is Linear.

mode.razor
<EjsAccumulationChart Title="Mobile Browser Statistics">
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"
                                     Name="Browser" Type="AccumulationType.Pyramid" PyramidMode="PyramidModes.Surface">
            </AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
  
        <AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings>
</EjsAccumulationChart>

@code{
    public class Statistics
    {
        public string Browser;
        public double Users;

    }

    public List<Statistics> StatisticsDetails = new List<Statistics> 
    {
        new Statistics { Browser = "Chrome", Users = 37 },
        new Statistics { Browser = "UC Browser", Users = 17 },
        new Statistics { Browser = "iPhone", Users = 19 },
        new Statistics { Browser = "Others", Users = 4  },
        new Statistics { Browser = "Opera", Users = 11 },
        new Statistics { Browser = "Android", Users = 12 },
     };
}

Mode

Size

The size of the pyramid chart can be customized by using the Width and Height properties.

size.razor
<EjsAccumulationChart Title="Mobile Browser Statistics">
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"
                                     Name="Browser" Type="AccumulationType.Pyramid" Width="60%" Height="80%">
            </AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
  
        <AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings>
</EjsAccumulationChart>

@code{
    public class Statistics
    {
        public string Browser;
        public double Users;

    }

    public List<Statistics> StatisticsDetails = new List<Statistics> 
    {
        new Statistics { Browser = "Chrome", Users = 37 },
        new Statistics { Browser = "UC Browser", Users = 17 },
        new Statistics { Browser = "iPhone", Users = 19 },
        new Statistics { Browser = "Others", Users = 4  },
        new Statistics { Browser = "Opera", Users = 11 },
        new Statistics { Browser = "Android", Users = 12 },
     };
}

Size

Gap Between the Segments

Pyramid chart provides options to customize the space between the segments by using the GapRatio property of the series. It takes values from 0 to 1.

gap.razor
<EjsAccumulationChart Title="Mobile Browser Statistics"> 
        <AccumulationChartSeriesCollection> 
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"
                                     Name="Browser" Type="AccumulationType.Pyramid" GapRatio="0.2">
            </AccumulationChartSeries> 
        </AccumulationChartSeriesCollection> 
  
        <AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings>
</EjsAccumulationChart>

@code{
    public class Statistics
    {
        public string Browser;
        public double Users;

    }

    public List<Statistics> StatisticsDetails = new List<Statistics> 
    {
        new Statistics { Browser = "Chrome", Users = 37 },
        new Statistics { Browser = "UC Browser", Users = 17 },
        new Statistics { Browser = "iPhone", Users = 19 },
        new Statistics { Browser = "Others", Users = 4  },
        new Statistics { Browser = "Opera", Users = 11 },
        new Statistics { Browser = "Android", Users = 12 },
     };
}

Gap Between the Segments

Explode

Points can be exploded on mouse click by setting the Explode property to true. You can also explode the point on load using ExplodeIndex. Explode distance can be set by using ExplodeOffset property.

explode.razor
<EjsAccumulationChart Title="Mobile Browser Statistics">
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"
                                     Name="Browser" Type="AccumulationType.Pyramid" ExplodeIndex="2" Explode="true" ExplodeOffset="10">
            </AccumulationChartSeries>
        </AccumulationChartSeriesCollection>

  
        <AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings>
</EjsAccumulationChart>

@code{
    public class Statistics
    {
        public string Browser;
        public double Users;

    }

    public List<Statistics> StatisticsDetails = new List<Statistics> 
    {
        new Statistics { Browser = "Chrome", Users = 37 },
        new Statistics { Browser = "UC Browser", Users = 17 },
        new Statistics { Browser = "iPhone", Users = 19 },
        new Statistics { Browser = "Others", Users = 4  },
        new Statistics { Browser = "Opera", Users = 11 },
        new Statistics { Browser = "Android", Users = 12 },
     };
}

Explode

See Also