BuilderFactoryExtensions.BootstrapPieChart(BuilderFactory, String) Method

Creates a Pie Chart control with a specified name.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll

Declaration

public static BootstrapPieChartBuilder BootstrapPieChart(
    this BuilderFactory builderFactory,
    string name
)
<ExtensionAttribute>
Public Shared Function BootstrapPieChart(
    builderFactory As BuilderFactory,
    name As String
) As BootstrapPieChartBuilder

Parameters

Type Name Description
BuilderFactory builderFactory

A BuilderFactory object providing access to Pie Chart settings.

String name

A chart name.

Returns

Type Description
BootstrapPieChartBuilder

A builder for a Pie Chart control.

The code sample below demonstrates how you can use this method to create a Pie Chart control.

@(Html.DevExpress()
    .BootstrapPieChart("pieChartSeries")
    .TitleText("Countries in the world by population (2017)")
    .SeriesCollection(series => series
        .Add()
        .ArgumentField("country")
        .ValueField("population")
        .Label(label => label
            .Visible(true)
            .Format(format => format
                .Type(DevExpress.AspNetCore.Bootstrap.FormatType.Millions))))

    .Bind("jsondata/ChartTypes/pie.json"))

See Also