New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the error bars.

Definition

Constructors

Initializes a new instance of the CategoricalErrorBarsBuilder class.

C#
public CategoricalErrorBarsBuilder(CategoricalErrorBars errorBars)
Parameters:errorBarsCategoricalErrorBars

The error bars.

Methods

Sets the error bars low and high fields.

C#
public CategoricalErrorBarsBuilder Fields(string lowField, string highField)
Parameters:lowFieldstring

The error bars low field.

highFieldstring

The error bars high field.

Returns:

CategoricalErrorBarsBuilder

Example:
C#
@( Html.Kendo().Chart<ChartViewModel>()
.Name("chart")
.Series(series => series
.Bar(s => s.Sales)
.ErrorBars(e => e.Fields("Low", "High"))
)
)

Sets the error bars high field.

C#
public CategoricalErrorBarsBuilder HighField(string highField)
Parameters:highFieldstring

The error bars high field.

Returns:

CategoricalErrorBarsBuilder

Example:
C#
@( Html.Kendo().Chart<ChartViewModel>()
.Name("chart")
.Series(series => series
.Bar(s => s.Sales)
.ErrorBars(e => e.HighField("High"))
)
)

Sets the error bars low field.

C#
public CategoricalErrorBarsBuilder LowField(string lowField)
Parameters:lowFieldstring

The error bars low field.

Returns:

CategoricalErrorBarsBuilder

Example:
C#
@( Html.Kendo().Chart<ChartViewModel>()
.Name("chart")
.Series(series => series
.Bar(s => s.Sales)
.ErrorBars(e => e.LowField("Low"))
)
)

Sets the error bars low and high value difference from the point value. The Value option is supported for Bar, Column, Line and Area Charts.

C#
public CategoricalErrorBarsBuilder Value(double lowValue, double highValue)
Parameters:lowValuedouble

The error bar low value difference from point value.

highValuedouble

The error bar high value difference from point value.

Returns:

CategoricalErrorBarsBuilder

Example:
C#
@( Html.Kendo().Chart<ChartViewModel>()
.Name("chart")
.Series(series => series
.Bar(s => s.Sales)
.ErrorBars(e => e.Value(1, 2))
)
)

Sets the error bars difference from the point value. The Value option is supported for Bar, Column, Line and Area Charts.

C#
public CategoricalErrorBarsBuilder Value(double value)
Parameters:valuedouble

A number that will be subtracted/added to the point value.

Returns:

CategoricalErrorBarsBuilder

Example:
C#
@(Html.Kendo().Chart<ChartViewModel>()
.Name("chart")
.Series(series => series
.Bar(s => s.Sales)
.ErrorBars(e => e.Value(1))
)
)

Sets a handler function that returns the error bars point value. The Value option is supported for Bar, Column, Line and Area Charts.

C#
public CategoricalErrorBarsBuilder Value(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

The handler code that returns the error bars point value.

Returns:

CategoricalErrorBarsBuilder

Example:
C#
@( Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("chart")
.Series(series =&gt; series
.Bar(s =&gt; s.Sales)
.ErrorBars(e =&gt; e.Value(o =&gt;
@"function(data) {
var value = data.value,
lowPercentage = value * 0.05,
highPercentage = value * 0.1;
return [lowPercentage, highPercentage];
}"
))
)
)

Sets the error bars value. The Value option is supported for Bar, Column, Line and Area Charts. The supported value types are:

  • stderr: The standard error of the series values will be used to calculate the point low and high value.
  • stddev(n): The standard deviation of the series values will be used to calculate the point low and high value. A number can be specified between the parentheses, that will be multiplied by the calculated standard deviation.
  • percentage(n): A percentage of the point value.
C#
public CategoricalErrorBarsBuilder Value(string value)
Parameters:valuestring

The value that configures the error bars value.

Returns:

CategoricalErrorBarsBuilder

Example:
C#
@( Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("chart")
.Series(series =&gt; series
.Bar(s =&gt; s.Sales)
.ErrorBars(e =&gt; e.Value("stderr"))
)
)