BuilderFactoryExtensions.BootstrapChart(BuilderFactory, String) Method

Creates a Chart control with a specified name.

Namespace: DevExpress.AspNetCore

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

Declaration

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

Parameters

Type Name Description
BuilderFactory builderFactory

A BuilderFactory object providing access to Chart settings.

String name

A control name.

Returns

Type Description
BootstrapChartBuilder

A builder for a Chart control.

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

@(Html.DevExpress()
    .BootstrapChart("chartJSON")
    .TitleText("Daily Sales")
    .Rotated(true)
    .ArgumentAxis(axis => axis
        .ArgumentType(typeof(DateTime))
        .MaxValue("2017-01-10"))
    .ValueAxisCollection(axis => axis
        .AddValueAxis()
            .TickInterval(1))
    .SeriesCollection(series => series
        .AddBarSeries()
            .ArgumentField("date")
            .ValueField("sales"))
    .SettingsLegend(settings => settings.Visible(false))
    .Bind("jsondata/simple.json"))

See Also