# ChartBuilder

## Properties

### WriteAction - Func

## Methods

### Title(System.String)

Sets the title of the Chart.

#### Parameters

##### title - `System.String`

The text of the title.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                        .Name("Chart")
                        .Title("Yearly sales")
            )
             
```

### Subtitle(System.String)

Sets the subtitle of the Chart.

#### Parameters

##### subtitle - `System.String`

The text of the subtitle.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                        .Name("Chart")
                        .Title("Yearly sales")
                        .Subtitle("/ thousands /")
            )
             
```

### SeriesDefaults(System.Action)

Defines the default options for all Chart series of the specified type.

#### Parameters

##### configurator - System.Action<[ChartSeriesDefaultsSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartseriesdefaultssettingsbuilder)>

The action that configures the default series options.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
              @(Html.Kendo().Chart()
               .Name("chart")
               .SeriesDefaults(seriesDefaults =>
                   seriesDefaults.Area().Line(line => line.Style(ChartSeriesLineStyle.Smooth))
               )
               .Series(series =>
               {
                       series.Area(new double[] { 3.907, 7.943, 5.848 }).Name("Result 1");
                       series.Area(new double[] { 4.223, 6.743, 8.922 }).Name("Result 2");
               })
             )
             
```

### CategoryAxis(System.Action)

Configures the category axis of the Chart.

#### Parameters

##### configurator - System.Action<[ChartCategoryAxisBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartcategoryaxisbuilder)>

The action that configures the category axis options.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                .Name("chart")
                .CategoryAxis(axis => axis
                    .Categories("2002", "2003", "2004")
                    .MajorGridLines(lines => lines.Visible(false))
                )
            )
             
```

### DataSource(System.Action)

Defines the DataSource configuration of the Chart.

#### Parameters

##### configurator - System.Action<[ReadOnlyAjaxDataSourceBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/readonlyajaxdatasourcebuilder)>

The action that configures the DataSource settings.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
             @(Html.Kendo().Chart<ChartViewModel>()
                        .Name("chart")
                        .DataSource(ds =>
                        {
                            ds.Ajax().Read(r => r.Action("SalesData", "Chart"));
                        })
            )
             
```

### DataSource(System.String)

Specifies an external DataSource that will be used by the Chart.

#### Parameters

##### dataSourceId - `System.String`

The Name() option of the external DataSource.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().DataSource<ProductViewModel>()
                    .Name("dataSource1")
                    .Ajax(dataSource => dataSource
                       .Read(read => read.Action("Products_Read", "DataSource"))
                    )
            )
            @(Html.Kendo().Chart<ProductViewModel>()
                    .Name("chart")
                    .DataSource("dataSource1")
                    .Series(series =>
                    {
                        series.Column(model => model.UnitPrice).Name("Price").CategoryField("ProductName");
                    })
            )
             
```

### Legend(System.Boolean)

Sets the visibility of the chart's legend.

#### Parameters

##### visible - `System.Boolean`

A value indicating whether to show the legend.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                        .Name("chart")
                        .Legend(false)
            )
             
```

### ValueAxis(System.Action)

Defines the value axis options.

#### Parameters

##### configurator - System.Action<[ChartValueAxisBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartvalueaxisbuilder)>

The action that configures the value axis options.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                    .Name("chart")
                    .ValueAxis(axis => axis
                        .Numeric()
                        .Max(140000)
                        .Line(line => line.Visible(false))
                    )
            )
             
```

### XAxis(System.Action)

Defines the X-axis configuration options of the Scatter Chart X-axis. The X-axis supports all ValueAxis options.

#### Parameters

##### configurator - System.Action<[ChartXAxisBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartxaxisbuilder)>

The action that configures the X-axis options.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                 .Name("chart")
                 .Series(series =>
                 {
                        series.Scatter(new double[][] {
                            new[] { 6.4, 5.4 },
                            new[] { 11.7, 2 },
                            new[] { 25.4, 3 },
                            new[] { 19.0, 2.0 }
                        });
                 })
                 .XAxis(x => x
                     .Numeric()
                     .Max(30)
                 )
            )
             
```

### YAxis(System.Action)

Defines the Y-axis configuration options of the Scatter Chart. The Y-axis supports all ValueAxis options.

#### Parameters

##### configurator - System.Action<[ChartYAxisBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartyaxisbuilder)>

The action that configures the Y-axis options.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                 .Name("chart")
                 .Series(series =>
                 {
                        series.Scatter(new double[][] {
                            new[] { 6.4, 5.4 },
                            new[] { 11.7, 2 },
                            new[] { 25.4, 3 },
                            new[] { 19.0, 2.0 }
                        });
                 })
                 .YAxis(x => x
                     .Numeric()
                     .Max(15)
                 )
            )
             
```

### AutoBind(System.Boolean)

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

#### Parameters

##### value - `System.Boolean`

The value for AutoBind

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

### AxisDefaults(System.Action)

The default options for all chart axes. Accepts the options supported by categoryAxis, valueAxis, xAxis and yAxis.

#### Parameters

##### configurator - System.Action<[ChartAxisDefaultsSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartaxisdefaultssettingsbuilder)>

The configurator for the axisdefaults setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### ChartArea(System.Action)

The chart area configuration options. Represents the entire visible area of the chart.

#### Parameters

##### configurator - System.Action<[ChartChartAreaSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartchartareasettingsbuilder)>

The configurator for the chartarea setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Legend(System.Action)

The chart legend configuration options.

#### Parameters

##### configurator - System.Action<[ChartLegendSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartlegendsettingsbuilder)>

The configurator for the legend setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Messages(System.Action)

Allows localization of the strings that are used in the widget.

#### Parameters

##### configurator - System.Action<[ChartMessagesSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartmessagessettingsbuilder)>

The configurator for the messages setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### NoData(System.Action)

When no series data is available, the Chart will display an overlay element that contains a message with the text "No data available". The overlay will be automatically cleared if the series receive data.To disable the "No Data" overlay, set this option to false.

#### Parameters

##### configurator - System.Action<[ChartNoDataSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartnodatasettingsbuilder)>

The configurator for the nodata setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### NoData(System.Boolean)

When no series data is available, the Chart will display an overlay element that contains a message with the text "No data available". The overlay will be automatically cleared if the series receive data.To disable the "No Data" overlay, set this option to false.

#### Parameters

##### enabled - `System.Boolean`

Enables or disables the nodata option.

#### RETURNS

Returns the current instance of [ChartNoDataSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartnodatasettingsbuilder) .

### PaneDefaults(System.Action)

The default options for all panes.

#### Parameters

##### configurator - System.Action<[ChartPaneDefaultsSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartpanedefaultssettingsbuilder)>

The configurator for the panedefaults setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Panes(System.Action)

The chart panes configuration.Panes are used to split the chart in two or more parts. The panes are ordered from top to bottom.Each axis can be associated with a pane by setting its pane option to the name of the desired pane. Axis that don't have specified pane are placed in the top (default) pane.Series are moved to the desired pane by associating them with an axis.

#### Parameters

##### configurator - System.Action<[ChartPaneFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartpanefactory)>

The configurator for the panes setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Pannable(System.Action)

Specifies if the chart can be panned.

#### Parameters

##### configurator - System.Action<[ChartPannableSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartpannablesettingsbuilder)>

The configurator for the pannable setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Pannable()

Specifies if the chart can be panned.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Pannable(System.Boolean)

Specifies if the chart can be panned.

#### Parameters

##### enabled - `System.Boolean`

Enables or disables the pannable option.

#### RETURNS

Returns the current instance of [ChartPannableSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartpannablesettingsbuilder) .

### Pdf(System.Action)

Configures the export settings for the saveAsPDF method.

#### Parameters

##### configurator - System.Action<[ChartPdfSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartpdfsettingsbuilder)>

The configurator for the pdf setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### PersistSeriesVisibility(System.Boolean)

Specifies if the series visible option should be persisted when changing the dataSource data.

#### Parameters

##### value - `System.Boolean`

The value for PersistSeriesVisibility

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

### PersistSeriesVisibility()

Specifies if the series visible option should be persisted when changing the dataSource data.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

### PlotArea(System.Action)

The plot area configuration options. The plot area is the area which displays the series.

#### Parameters

##### configurator - System.Action<[ChartPlotAreaSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartplotareasettingsbuilder)>

The configurator for the plotarea setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Series(System.Action)

The configuration of the chart series.The series type is determined by the value of the type field. If a type value is missing, the type is assumed to be the one specified in seriesDefaults.

#### Parameters

##### configurator - System.Action<[ChartSeriesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartseriesfactory)>

The configurator for the series setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### SeriesColors(System.String\[])

The default colors for the chart's series. When all colors are used, new colors are pulled from the start again.

#### Parameters

##### value - `System.String[]`

The value for SeriesColors

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

### Subtitle(System.Action)

The chart subtitle configuration options or text.

#### Parameters

##### configurator - System.Action<[ChartSubtitleSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartsubtitlesettingsbuilder)>

The configurator for the subtitle setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Theme(System.String)

Specifies the chart theme to be used. The recomended value is sass.Note: Since Q2 2024 release, the default value for the theme property is sass instead of default.With versions prior to R1 2023 this can be either the respective LESS theme from the list below or "sass". When set to "sass" the chart will read the variables from the Sass-based themes.The supported values prior to and including 2023.1.117 version are: "sass"; "black"; "blueopal"; "bootstrap"; "default"; "fiori"; "flat"; "highcontrast"; "material"; "materialblack"; "metro"; "metroblack"; "moonlight"; "nova"; "office365"; "silver" or "uniform".

#### Parameters

##### value - `System.String`

The value for Theme

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

### Title(System.Action)

The chart title configuration options or text.

#### Parameters

##### configurator - System.Action<[ChartTitleSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/charttitlesettingsbuilder)>

The configurator for the title setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Tooltip(System.Action)

The chart series tooltip configuration options.

#### Parameters

##### configurator - System.Action<[ChartTooltipSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/charttooltipsettingsbuilder)>

The configurator for the tooltip setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Transitions(System.Boolean)

If set to true the chart will play animations when displaying the series. By default animations are enabled.

#### Parameters

##### value - `System.Boolean`

The value for Transitions

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

### Zoomable(System.Action)

Specifies if the chart can be zoomed.

#### Parameters

##### configurator - System.Action<[ChartZoomableSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartzoomablesettingsbuilder)>

The configurator for the zoomable setting.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Zoomable()

Specifies if the chart can be zoomed.

#### RETURNS

Returns the current instance of [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) .

### Zoomable(System.Boolean)

Specifies if the chart can be zoomed.

#### Parameters

##### enabled - `System.Boolean`

Enables or disables the zoomable option.

#### RETURNS

Returns the current instance of [ChartZoomableSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartzoomablesettingsbuilder) .

### RenderAs(Kendo.Mvc.UI.RenderingMode)

Specifies the preferred widget rendering mode.

#### Parameters

##### value - [RenderingMode](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui/renderingmode)

The value for RenderAs

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

### Events(System.Action)

Configures the client-side events.

#### Parameters

##### configurator - System.Action<[ChartEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/charteventbuilder)>

The client events action.

#### RETURNS

Returns the current [ChartBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/chartbuilder) instance.

#### Example

```
 
            @(Html.Kendo().Chart()
                  .Name("Chart")
                  .Events(events => events
                      .AxisLabelClick("onAxisLabelClick")
                  )
            )
             
```

### ToComponent()

Returns the internal view component.

#### RETURNS

The  instance that represents the component.

### Expression(System.String)

Sets the name of the component.

#### Parameters

##### modelExpression - `System.String`

The name.

#### RETURNS

Returns the current  instance.

### Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

#### Parameters

##### modelExplorer - `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer`

The name.

#### RETURNS

Returns the current  instance.

### Name(System.String)

Sets the name of the component.

#### Parameters

##### componentName - `System.String`

The name.

#### RETURNS

Returns the current  instance.

### Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean,System.Boolean)

#### Parameters

##### deferred - `System.Boolean`

#### RETURNS

Returns a [DeferredWidgetBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/deferredwidgetbuilder) instance.

### HtmlAttributes(System.Object)

Sets the HTML attributes.

#### Parameters

##### attributes - `System.Object`

The HTML attributes.

#### RETURNS

Returns the current  instance.

### HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

#### Parameters

##### attributes - `System.Collections.Generic.IDictionary<String,Object>`

The HTML attributes.

#### RETURNS

Returns the current  instance.

### ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

#### Parameters

##### attributes - `System.Object`

The JavaScript attributes.

##### overrideAttributes - `System.Boolean`

Argument which determines whether attributes should be overriden.

#### RETURNS

Returns the current  instance.

### ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

#### Parameters

##### attributes - `System.Collections.Generic.IDictionary<String,Object>`

The JavaScript attributes.

##### overrideAttributes - `System.Boolean`

Argument which determines whether attributes should be overriden.

#### RETURNS

Returns the current  instance.

### Render()

Renders the component in place.

### ToHtmlString()

Returns the HTML representation of the component.

### WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

#### Parameters

##### writer - `System.IO.TextWriter`

##### encoder - `System.Text.Encodings.Web.HtmlEncoder`

### ToClientTemplate()

Returns the client template for the component.

### AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

#### Parameters

##### value - `System.Boolean`

#### RETURNS

Returns the current  instance.
