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

Defines the fluent interface for configuring bullet series.

Definition

Constructors

Initializes a new instance of the ChartBulletSeriesBuilder<T> class.

C#
public ChartBulletSeriesBuilder(IChartBulletSeries series)
Parameters:seriesIChartBulletSeries

The series.

Properties

Gets or sets the series.

C#
public IChartBulletSeries Series { get; }
Property Value:

The series.

Methods

Sets the name of the value axis for the series.

C#
public ChartBulletSeriesBuilder<T> Axis(string axis)
Parameters:axisstring

The value that sets the axis name.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Name("Sales").Axis("secondary"))
.ValueAxis(axis =&gt; axis.Numeric())
.ValueAxis(axis =&gt; axis.Numeric("secondary"))
.CategoryAxis(axis =&gt; axis.AxisCrossingValue(0, 10))
)

Sets the border of the bullets.

C#
public ChartBulletSeriesBuilder<T> Border(int width, string color, ChartDashType dashType)
Parameters:widthint

The border width.

colorstring

The border color (CSS syntax).

dashTypeChartDashType

The border dash type.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Border(1, "#000", ChartDashType.Dot))
)

Sets the bullet fill color.

C#
public ChartBulletSeriesBuilder<T> Color(string color)
Parameters:colorstring

The value that sets the bullet color (CSS syntax).

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Color("red"))
)

Sets the Model property that holds the color for the series.

C#
public ChartBulletSeriesBuilder<T> ColorField(string colorField)
Parameters:colorFieldstring

The name of the Model property.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series.Bar(Model.Records).CurrentField("Current").TargetField("Target").ColorField("Color"))
)

Sets the function used to retrieve point color.

C#
public ChartBulletSeriesBuilder<T> ColorHandler(Func<object, object> colorFunction)
Parameters:colorFunctionFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series
.Bullet(s =&gt; s.Current, s =&gt; s.Target)
.ColorHandler(@&lt;text&gt;
function(point) {
return point.value &gt; 5 ? "red" : "green";
}
&lt;/text&gt;
)
)
)

Sets the function used to retrieve point color.

C#
public ChartBulletSeriesBuilder<T> ColorHandler(string colorFunction)
Parameters:colorFunctionstring

The JavaScript function that will retrieve the color of each point.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series
.Bullet(s =&gt; s.Current, s =&gt; s.Target)
.ColorHandler("pointColor")
)
)

Sets the Model property that holds the current value.

C#
public ChartBulletSeriesBuilder<T> CurrentField(string currentField)
Parameters:currentFieldstring

The name of the Model property.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series.Bullet(Model.Records).CurrentField("Current").TargetField("Target"))
)

Sets a distance between the category clusters.

A value of 1 means that there is a total of 1 bullet width / vertical bullet height between categories. The distance is distributed evenly on each side. The default value is 1.5
C#
public ChartBulletSeriesBuilder<T> Gap(double gap)
Parameters:gapdoubleReturns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Gap(1))
)

Defines the configuration of the series labels.

C#
public ChartBulletSeriesBuilder<T> Labels(Action<ChartBulletLabelsBuilder> configurator)
Parameters:configuratorAction<ChartBulletLabelsBuilder>

The action that configures the label settings.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series
.Bar(s =&gt; s.Sales)
.Labels(labels =&gt; labels
.Position(ChartBarLabelsPosition.InsideEnd)
.Visible(true)
)
)
)

Sets the series title displayed in the legend.

C#
public ChartBulletSeriesBuilder<T> Name(string name)
Parameters:namestring

The value that configures the Name option.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Name("Sales"))
)

Sets the Model property that holds the note text for the series.

C#
public ChartBulletSeriesBuilder<T> NoteTextField(string noteTextField)
Parameters:noteTextFieldstring

The name of the Model property.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series.Bar(Model.Records).CurrentField("Current").TargetField("Target").NoteTextField("NoteText"))
)

Sets the series opacity.

C#
public ChartBulletSeriesBuilder<T> Opacity(double opacity)
Parameters:opacitydouble

The series opacity in the range from 0 (transparent) to 1 (opaque). The default value is 1.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Opacity(0.5))
)

Sets the bullet effects overlay.

C#
public ChartBulletSeriesBuilder<T> Overlay(ChartBarSeriesOverlay overlay)
Parameters:overlayChartBarSeriesOverlay

The enum value that configures the overlay.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Overlay(ChartBarSeriesOverlay.None))
)

The chart series pattern configuration options.

C#
public ChartBulletSeriesBuilder<T> Pattern(Action<ChartSeriesPatternSettingsBuilder> configurator)
Parameters:configuratorAction<ChartSeriesPatternSettingsBuilder>

The configurator for the Pattern setting.

Returns:

ChartBulletSeriesBuilder<T>

Sets a value indicating the distance between the bullets within a category.

C#
public ChartBulletSeriesBuilder<T> Spacing(double spacing)
Parameters:spacingdouble

Value of 1 means that the distance between bullets is equal to their width. The default value is 0

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Spacing(1))
)

Defines the configuration options of the series target.

C#
public ChartBulletSeriesBuilder<T> Target(Action<ChartBulletTargetBuilder> configurator)
Parameters:configuratorAction<ChartBulletTargetBuilder>

The action that configures the target options.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target)
.Target(t =&gt; t.Color("green").Line(l =&gt; l.Width(10)))
)
)

Sets the Model property that holds the target value.

C#
public ChartBulletSeriesBuilder<T> TargetField(string targetField)
Parameters:targetFieldstring

The name of the Model property.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series.Bullet(Model.Records).CurrentField("Current").TargetField("Target"))
)

Defines the configuration of the tooltip for the series.

C#
public ChartBulletSeriesBuilder<T> Tooltip(Action<ChartTooltipBuilder> configurator)
Parameters:configuratorAction<ChartTooltipBuilder>

The action that configures the tooltip options.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target)
.Tooltip(tooltip =&gt;
{
tooltip.Visible(true).Format("{0:C}");
})
)
)

Sets the visibility of the data point tooltip.

C#
public ChartBulletSeriesBuilder<T> Tooltip(bool visible)
Parameters:visiblebool

A value indicating if the data point tooltip must be displayed. The tooltip is not visible by default.

Returns:

ChartBulletSeriesBuilder<T>

Example:
C#
@(Html.Kendo().Chart&lt;ChartViewModel&gt;()
.Name("Chart")
.Series(series =&gt; series.Bullet(s =&gt; s.Current, s =&gt; s.Target).Tooltip(true))
)