ChartBuilder<T>
Defines the fluent interface for configuring the Chart<T> component.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class ChartBuilder<T> : WidgetBuilderBase<Chart<T>, ChartBuilder<T>>, IHtmlString where T : class
Inheritance: objectWidgetBuilderBase<Chart<T>, ChartBuilder<T>>ChartBuilder<T>
Implements:
Inherited Members
Constructors
Initializes a new instance of the ChartBuilder<T> class.
Methods
Enables or disables automatic data binding during the initialization of the chart.
public ChartBuilder<T> AutoBind(bool autoBind)
The value that enables or disabled the automatic data binding. The default value is true.
Returns:ChartBuilder<T>
Defines the default options for all chart axes of the specified type.
public ChartBuilder<T> AxisDefaults(Action<ChartAxisDefaultsBuilder<T>> configurator)
The action that configures the default settings.
Returns:ChartBuilder<T>
Configures the category axis of the chart.
public ChartBuilder<T> CategoryAxis(Action<ChartCategoryAxisBuilder<T>> configurator)
The action that configures the category axis options.
Returns:ChartBuilder<T>
Defines the configuration of the chart area.
public ChartBuilder<T> ChartArea(Action<ChartAreaBuilder> configurator)
The action that configures the chart area settings.
Returns:ChartBuilder<T>
Defines the DataSource configuration of the chart.
public ChartBuilder<T> DataSource(Action<ReadOnlyAjaxDataSourceBuilder<T>> configurator)
The action that configures the DataSource settings.
Returns:ChartBuilder<T>
Specifies an external DataSource that will be used by the Chart.
public ChartBuilder<T> DataSource(string dataSourceId)
The id (Name) of the external DataSource.
Returns:ChartBuilder<T>
Configures the client-side events of the Chart.
public ChartBuilder<T> Events(Action<ChartEventBuilder> configurator)
The client events configuration action.
Returns:ChartBuilder<T>
Defines the legend configuration.
public ChartBuilder<T> Legend(Action<ChartLegendBuilder> configurator)
The configuration action.
Returns:ChartBuilder<T>
Sets the visibility of the chart legend.
public ChartBuilder<T> Legend(bool visible)
A value indicating whether to show the legend.
Returns:ChartBuilder<T>
Allows localization of the strings that are used in the widget.
public ChartBuilder<T> Messages(Action<ChartMessagesSettingsBuilder> configurator)
The configurator for the messages setting.
Returns:ChartBuilder<T>
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.
public ChartBuilder<T> NoData(Action<ChartNoDataSettingsBuilder> configurator)
The configurator for the nodata setting.
Returns:ChartBuilder<T>
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.
public ChartBuilder<T> NoData(bool enabled)
Enables or disables the nodata option.
Returns:ChartBuilder<T>
Defines the default options for all panes.
public ChartBuilder<T> PaneDefaults(Action<ChartPaneDefaultsBuilder> configurator)
The configurator for the default settings.
Returns:ChartBuilder<T>
Defines the chart panes configuration. The panes are used to split the chart in two or more parts. They 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. The series are moved to the desired pane by associating them with an axis.
public ChartBuilder<T> Panes(Action<ChartPanesFactory> configurator)
The action that configures the panes.
Returns:ChartBuilder<T>
Defines the pannable configuration of the Chart.
public ChartBuilder<T> Pannable(Action<ChartPannableBuilder> configurator)
The action that configures the pannable settings.
Returns:ChartBuilder<T>
Enables or disables the panning feature.
public ChartBuilder<T> Pannable(bool enabled = true)
ChartBuilder<T>
Configures the PDF export settings.
public ChartBuilder<T> Pdf(Action<PDFSettingsBuilder> configurator)
The action that configures the PDF export settings.
Returns:ChartBuilder<T>
Specifies if the series visible option must be persisted when changing the DataSource data.
public ChartBuilder<T> PersistSeriesVisibility(bool value)
A value indicating if the series visible option must be persisted.
Returns:ChartBuilder<T>
Defines the configuration of the plot area.
public ChartBuilder<T> PlotArea(Action<PlotAreaBuilder> configurator)
The action that configures the plot area settings.
Returns:ChartBuilder<T>
Sets the preferred rendering engine. If it is not supported by the browser, the Chart will switch to the first available mode.
public ChartBuilder<T> RenderAs(RenderingMode renderAs)
The enum value that sets the preferred rendering engine.
Returns:ChartBuilder<T>
Defines the chart series.
public ChartBuilder<T> Series(Action<ChartSeriesFactory<T>> configurator)
The action that configures the series options.
Returns:ChartBuilder<T>
Sets the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
public ChartBuilder<T> SeriesColors(IEnumerable<string> colors)
A list of the color values.
Returns:ChartBuilder<T>
Sets the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
public ChartBuilder<T> SeriesColors(params string[] colors)
An array that holds the color values.
Returns:ChartBuilder<T>
Defines the default options for all chart series of the specified type.
public ChartBuilder<T> SeriesDefaults(Action<ChartSeriesDefaultsBuilder<T>> configurator)
The action that configures the default series options.
Returns:ChartBuilder<T>
Defines the configuration of the chart subtitle.
public ChartBuilder<T> Subtitle(Action<ChartTitleBuilder> configurator)
The action that configures the subtitle settings.
Returns:ChartBuilder<T>
Sets the subtitle of the chart.
public ChartBuilder<T> Subtitle(string title)
The text of the subtitle.
Returns:ChartBuilder<T>
Sets the theme of the chart. With versions before R1 2023, the Theme options accepts the name of a LESS theme or "sass". When set to "sass", the chart will read the variables from the Sass-based themes. Note: Since the Q2 2024 release, the default value for the Theme option is "sass" instead of "default". With version Q2 2024 or later, use "sass".
public ChartBuilder<T> Theme(string theme)
The name of the Less-based theme or "sass".
Returns:ChartBuilder<T>
Defines the configuration of the chart title.
public ChartBuilder<T> Title(Action<ChartTitleBuilder> configurator)
The action that configures the title settings.
Returns:ChartBuilder<T>
Sets the title of the chart.
public ChartBuilder<T> Title(string title)
The text of the title.
Returns:ChartBuilder<T>
Defines the series tooltip configuration.
public ChartBuilder<T> Tooltip(Action<ChartTooltipBuilder> configurator)
The action that configures the tooltip options.
Returns:ChartBuilder<T>
Sets the visibility of the series tooltip.
public ChartBuilder<T> Tooltip(bool visible)
A value indicating if the data point tooltip must be displayed. The tooltip is not visible by default.
Returns:ChartBuilder<T>
Enables or disabled animated transitions on initial load and refresh. By default, the animations are enabled.
public ChartBuilder<T> Transitions(bool transitions)
A value indicating if transition animations must be played.
Returns:ChartBuilder<T>
Defines value axis options.
public ChartBuilder<T> ValueAxis(Action<ChartValueAxisFactory<T>> configurator)
The action that configures the value axis options.
Returns:ChartBuilder<T>
Defines the X-axis configuration options of the Scatter Chart X-axis. The X-axis supports all ValueAxis options.
public ChartBuilder<T> XAxis(Action<ChartValueAxisFactory<T>> configurator)
The action that configures the X-axis options.
Returns:ChartBuilder<T>
Defines the Y-axis configuration options of the Scatter Chart. The Y-axis supports all ValueAxis options.
public ChartBuilder<T> YAxis(Action<ChartValueAxisFactory<T>> configurator)
The action that configures the Y-axis options.
Returns:ChartBuilder<T>
Defines the zoomable configuration of the Chart.
public ChartBuilder<T> Zoomable(Action<ChartZoomableBuilder> configurator)
The action that configures the zoomable settings.
Returns:ChartBuilder<T>
Enables or disables the zooming feature.
public ChartBuilder<T> Zoomable(bool enabled = true)
ChartBuilder<T>