StockChartBuilder
Properties
WriteAction - Func
Methods
CategoryAxis(System.Action)
Configures the category axis
Parameters
configurator - System.Action<ChartCategoryAxisBuilder>
The configurator
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.CategoryAxis(axis => axis
.Categories(s => s.DateString)
)
)
DataSource(System.Action)
Data Source configuration
Parameters
configurator - System.Action<ReadOnlyAjaxDataSourceBuilder>
Use the configurator to set different data binding options.
RETURNS
Returns the current StockChartBuilder instance.
Example
@(Html.Kendo().StockChart()
.Name("Chart")
.DataSource(ds =>
{
ds.Ajax().Read(r => r.Action("SalesData", "Chart"));
})
)
SeriesDefaults(System.Action)
Defines the options for all chart series of the specified type.
Parameters
configurator - System.Action<ChartSeriesDefaultsSettingsBuilder>
The configurator.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.SeriesDefaults(series => series.Bar().Stack(true))
)
ValueAxis(System.Action)
Configures the default value axis or adds a new one
Parameters
configurator - System.Action<ChartValueAxisBuilder>
The configurator for the axis
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.ValueAxis(a => a.Numeric().TickSize(4))
)
XAxis(System.Action)
Configures the default X axis or adds a new one
Parameters
configurator - System.Action<ChartXAxisBuilder>
The configurator for the axis
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.XAxis(a => a.Numeric().Max(4))
)
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 StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.AutoBind(false)
.DataSource(ds =>
{
ds.Ajax().Read(r => r.Action("SalesData", "Chart"));
})
)
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>
The configurator for the axisdefaults setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.AxisDefaults(axisDefaults => axisDefaults.MinorTickSize(5))
)
ChartArea(System.Action)
The chart area configuration options. Represents the entire visible area of the chart.
Parameters
configurator - System.Action<ChartChartAreaSettingsBuilder>
The configurator for the chartarea setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Margin(20))
)
Legend(System.Action)
The chart legend configuration options.
Parameters
configurator - System.Action<ChartLegendSettingsBuilder>
The configurator for the legend setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Legend(legend => legend.Visible(true).Position(ChartLegendPosition.Bottom))
)
Legend(System.Boolean)
Sets the legend visibility.
Parameters
visible - System.Boolean
A value indicating whether to show the legend.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Legend(false)
)
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>
The configurator for the panes setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.Panes(panes =>
{
panes.Add("volume");
})
)
Pannable(System.Action)
Specifies if the chart can be panned.
Parameters
configurator - System.Action<ChartPannableSettingsBuilder>
The configurator for the pannable setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.Pannable(pan => pan.Lock(ChartAxisLock.X))
)
Pannable()
Specifies if the chart can be panned.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.Pannable(pan => pan.Lock(ChartAxisLock.X))
)
Pannable(System.Boolean)
Specifies if the chart can be panned.
Parameters
enabled - System.Boolean
Enables or disables the pannable option.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.Pannable(false)
)
Pdf(System.Action)
Configures the export settings for the saveAsPDF method.
Parameters
configurator - System.Action<ChartPdfSettingsBuilder>
The configurator for the pdf setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.Pdf(pdf => pdf.FileName("MyChart.pdf"))
)
PlotArea(System.Action)
The plot area configuration options. The plot area is the area which displays the series.
Parameters
configurator - System.Action<ChartPlotAreaSettingsBuilder>
The configurator for the plotarea setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.PlotArea(plotArea => plotArea.Margin(20))
)
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>
The configurator for the series setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart(Model)
.Name("Chart")
.Series(series =>
{
series.Bar(s => s.SalesAmount);
})
)
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 StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.SeriesColors(new string[] { "#f00", "#0f0", "#00f" })
)
Theme(System.String)
The chart theme.The supported values are:
Parameters
value - System.String
The value for Theme
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Theme("sass")
)
Title(System.Action)
The chart title configuration options or text.
Parameters
configurator - System.Action<ChartTitleSettingsBuilder>
The configurator for the title setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Title("Yearly sales")
)
Title(System.String)
The chart title.
Parameters
title - System.String
The value of the Chart title
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Title("Yearly sales")
)
Tooltip(System.Action)
The chart series tooltip configuration options.
Parameters
configurator - System.Action<ChartTooltipSettingsBuilder>
The configurator for the tooltip setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Tooltip(tooltip =>
{
tooltip.Visible(true).Format("{0:C}");
})
)
Tooltip(System.Boolean)
Sets the data point tooltip visibility.
Parameters
visible - System.Boolean
A value indicating if the data point tooltip should be displayed. The tooltip is not visible by default.
RETURNS
Returns the current StockChartBuilder instance.
Example
@(Html.Kendo().StockChart()
.Name("Chart")
.Tooltip(true)
);
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 StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Transitions(false)
)
Zoomable(System.Action)
Specifies if the chart can be zoomed.
Parameters
configurator - System.Action<ChartZoomableSettingsBuilder>
The configurator for the zoomable setting.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Zoomable(zoom => zoom.Mousewheel(mw => mw.Lock(ChartAxisLock.X)))
)
Zoomable()
Specifies if the chart can be zoomed.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Zoomable(zoom => zoom.Mousewheel(mw => mw.Lock(ChartAxisLock.X)))
)
Zoomable(System.Boolean)
Specifies if the chart can be zoomed.
Parameters
enabled - System.Boolean
Enables or disables the zoomable option.
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.Zoomable(false)
)
RenderAs(Kendo.Mvc.UI.RenderingMode)
Specifies the preferred widget rendering mode.
Parameters
value - RenderingMode
The value for RenderAs
RETURNS
Returns the current StockChartBuilder instance.
Example
@( Html.Kendo().StockChart()
.Name("Chart")
.RenderAs(RenderingMode.SVG)
)
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<ChartEventBuilder>
The client events action.
RETURNS
Returns the current StockChartBuilder instance.
Example
@(Html.Kendo().StockChart()
.Name("Chart")
.Events(events => events
.AxisLabelClick("onAxisLabelClick")
)
)
DateField(System.String)
The field containing the point date. It is used as a default categoryField for all series.The data item field value must be either: Date instance; String parsable by new Date([field value]) or String in ASP.NET JSON format, i.e. "/Date(1320825600000-0800)/".
Parameters
value - System.String
The value for DateField
RETURNS
Returns the current StockChartBuilder instance.
Navigator(System.Action)
The data navigator configuration options.
Parameters
configurator - System.Action<StockChartNavigatorSettingsBuilder>
The configurator for the navigator setting.
RETURNS
Returns the current instance of StockChartBuilder .
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 StockChartBuilder instance.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<StockChartEventBuilder>
The client events action.
RETURNS
Returns the current StockChartBuilder instance.
Example
@(Html.Kendo().StockChart()
.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
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
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
Parameters
deferred - System.Boolean
RETURNS
Returns a 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.