Chart<T>
Kendo UI Chart component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class Chart<T> : WidgetBase, IHtmlAttributesContainer where T : class
Inheritance: objectWidgetBaseChart<T>
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the Chart for ASP.NET MVC.
public Chart(ViewContext viewContext)
The context for view execution.
Properties
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.
public bool? AutoBind { get; set; }
The default options for all chart axes. Accepts the options supported by categoryAxis, valueAxis, xAxis and yAxis.
public ChartAxisDefaultsSettings<T> AxisDefaults { get; }
The category axis configuration options.
public List<ChartCategoryAxis<T>> CategoryAxis { get; set; }
The chart area configuration options. Represents the entire visible area of the chart.
public ChartChartAreaSettings<T> ChartArea { get; }
Gets or sets the data source.
public IEnumerable<T> Data { get; set; }
The data source.
The Chart data source configuration
public DataSource DataSource { get; }
Gets or sets the id of the external DataSource used by the Chart.
public string DataSourceId { get; set; }
The chart legend configuration options.
public ChartLegendSettings<T> Legend { get; }
Allows localization of the strings that are used in the widget.
public ChartMessagesSettings<T> Messages { get; }
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 ChartNoDataSettings<T> NoData { get; }
The default options for all panes.
public ChartPaneDefaultsSettings<T> PaneDefaults { get; }
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.
public List<ChartPane<T>> Panes { get; set; }
Specifies if the chart can be panned.
public ChartPannableSettings<T> Pannable { get; }
Configures the export settings for the saveAsPDF method.
public ChartPdfSettings<T> Pdf { get; }
Specifies if the series visible option should be persisted when changing the dataSource data.
public bool? PersistSeriesVisibility { get; set; }
The plot area configuration options. The plot area is the area which displays the series.
public ChartPlotAreaSettings<T> PlotArea { get; }
Specifies the preferred widget rendering mode.
public RenderingMode? RenderAs { get; set; }
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.
public List<ChartSeries<T>> Series { get; set; }
The default colors for the chart's series. When all colors are used, new colors are pulled from the start again.
public string[] SeriesColors { get; set; }
The common settings for all Chart series.
public ChartSeriesDefaultsSettings<T> SeriesDefaults { get; }
The chart subtitle configuration options or text.
public ChartSubtitleSettings<T> Subtitle { get; }
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".
public string Theme { get; set; }
The chart title configuration options or text.
public ChartTitleSettings<T> Title { get; }
The chart series tooltip configuration options.
public ChartTooltipSettings<T> Tooltip { get; }
If set to true the chart will play animations when displaying the series. By default animations are enabled.
public bool? Transitions { get; set; }
The value axis configuration options.
public List<ChartValueAxis<T>> ValueAxis { get; set; }
XAxis
List<ChartXAxis<T>>
The X-axis configuration options of the scatter chart X-axis. Supports all valueAxis options.
public List<ChartXAxis<T>> XAxis { get; set; }
YAxis
List<ChartYAxis<T>>
The y axis configuration options of the scatter chart. Supports all valueAxis options.
public List<ChartYAxis<T>> YAxis { get; set; }
Specifies if the chart can be zoomed.
public ChartZoomableSettings<T> Zoomable { get; }
Methods
Generates the Chart wrapper DIV element.
protected virtual TagBuilder GenerateTag(TextWriter writer)
The text writer instance.
Returns:Serializes the component settings to a dictionary.
public override IDictionary<string, object> Serialize()
A dictionary of settings.
Overrides:
Serializes Chart settings.
protected virtual void SerializeCustomSettings(IDictionary<string, object> settings)
A dictionary containing the settings.
Serializes the Chart DataSource settings to JSON.
protected virtual void SerializeDataSource(IDictionary<string, object> settings)
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the Chart HTML output.
protected override void WriteHtml(TextWriter writer)
The text writer instance.
Overrides:
Writes the Chart initialization script.
public override void WriteInitializationScript(TextWriter writer)
The text writer instance.
Overrides: