ChartBulletSeriesBuilder
Properties
Series - IChartBulletSeries
The data used for binding.
Series - IChartBulletSeries
The data used for binding.
Methods
Gap(System.Double)
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
Parameters
gap - System.Double
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Gap(1))
)
Spacing(System.Double)
Sets a value indicating the distance between the bullets within a category.
Parameters
spacing - System.Double
Value of 1 means that the distance between bullets is equal to their width. The default value is 0
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Spacing(1))
)
Border(System.Int32,System.String,Kendo.Mvc.UI.ChartDashType)
Sets the border of the bullets.
Parameters
width - System.Int32
The border width.
color - System.String
The border color (CSS syntax).
dashType - ChartDashType
The border dash type.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Border(1, "#000", ChartDashType.Dot))
)
Overlay(Kendo.Mvc.UI.ChartBarSeriesOverlay)
Sets the bullet effects overlay.
Parameters
overlay - ChartBarSeriesOverlay
The enum value that configures the overlay.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Overlay(ChartBarSeriesOverlay.None))
)
Name(System.String)
Sets the series title displayed in the legend.
Parameters
name - System.String
The value that configures the Name option.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Name("Sales"))
)
Opacity(System.Double)
Sets the series opacity.
Parameters
opacity - System.Double
The series opacity in the range from 0 (transparent) to 1 (opaque). The default value is 1.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Opacity(0.5))
)
Color(System.String)
Sets the bullet fill color.
Parameters
color - System.String
The value that sets the bullet color (CSS syntax).
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Color("red"))
)
Tooltip(System.Action)
Defines the configuration of the tooltip for the series.
Parameters
configurator - System.Action<ChartTooltipBuilder>
The action that configures the tooltip options.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target)
.Tooltip(tooltip =>
{
tooltip.Visible(true).Format("{0:C}");
})
)
)
Tooltip(System.Boolean)
Sets the visibility of the data point tooltip.
Parameters
visible - System.Boolean
A value indicating if the data point tooltip must be displayed. The tooltip is not visible by default.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Tooltip(true))
)
Axis(System.String)
Sets the name of the value axis for the series.
Parameters
axis - System.String
The value that sets the axis name.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target).Name("Sales").Axis("secondary"))
.ValueAxis(axis => axis.Numeric())
.ValueAxis(axis => axis.Numeric("secondary"))
.CategoryAxis(axis => axis.AxisCrossingValue(0, 10))
)
Target(System.Action)
Defines the configuration options of the series target.
Parameters
configurator - System.Action<ChartBulletTargetBuilder>
The action that configures the target options.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series.Bullet(s => s.Current, s => s.Target)
.Target(t => t.Color("green").Line(l => l.Width(10)))
)
)
CurrentField(System.String)
Sets the Model property that holds the current value.
Parameters
currentField - System.String
The name of the Model property.
Example
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series => series.Bullet(Model.Records).CurrentField("Current").TargetField("Target"))
)
TargetField(System.String)
Sets the Model property that holds the target value.
Parameters
targetField - System.String
The name of the Model property.
Example
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series => series.Bullet(Model.Records).CurrentField("Current").TargetField("Target"))
)
ColorHandler(System.Func)
Sets the function used to retrieve point color.
Parameters
colorFunction - System.Func<Object,Object>
The handler code wrapped in a text tag (Razor syntax).
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series
.Bullet(s => s.Current, s => s.Target)
.ColorHandler(@<text>
function(point) {
return point.value > 5 ? "red" : "green";
}
</text>
)
)
)
ColorHandler(System.String)
Sets the function used to retrieve point color.
Parameters
colorFunction - System.String
The JavaScript function that will retrieve the color of each point.
Example
@(Html.Kendo().Chart<ChartViewModel>()
.Name("Chart")
.Series(series => series
.Bullet(s => s.Current, s => s.Target)
.ColorHandler("pointColor")
)
)
ColorField(System.String)
Sets the Model property that holds the color for the series.
Parameters
colorField - System.String
The name of the Model property.
Example
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series => series.Bar(Model.Records).CurrentField("Current").TargetField("Target").ColorField("Color"))
)
NoteTextField(System.String)
Sets the Model property that holds the note text for the series.
Parameters
noteTextField - System.String
The name of the Model property.
Example
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series => series.Bar(Model.Records).CurrentField("Current").TargetField("Target").NoteTextField("NoteText"))
)
Labels(System.Action)
Defines the configuration of the series labels.
Parameters
configurator - System.Action<ChartBulletLabelsBuilder>
The action that configures the label settings.
Example
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series => series
.Bar(s => s.Sales)
.Labels(labels => labels
.Position(ChartBarLabelsPosition.InsideEnd)
.Visible(true)
)
)
)
Pattern(System.Action)
The chart series pattern configuration options.
Parameters
configurator - System.Action<ChartSeriesPatternSettingsBuilder>
The configurator for the Pattern setting.
DrilldownField(System.String)
The data field which contains the value to use to drill down into detailed data for the point.
Parameters
value - System.String
The value for DrilldownField
Example
@(Html.Kendo().Chart()
.Name("Chart")
.Series(s => s.Donut(d => d.YourField).DrilldownField("YourField"))
)
DrilldownSeriesFactory(System.String)
A function that creates the drilldown series for a given point.The function should accept a single parameter, the point drilldownField value. The function should return a series configuration object or a Promise that resolves to one.
Parameters
handler - System.String
The name of the JavaScript function that will be evaluated.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.Series(s => s.Donut(d => d.YourField).DrilldownSeriesFactory("handerName"))
)
DrilldownSeriesFactory(System.Func)
A function that creates the drilldown series for a given point.The function should accept a single parameter, the point drilldownField value. The function should return a series configuration object or a Promise that resolves to one.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.Series(s => s.Donut(d => d.YourField).DrilldownSeriesFactory(
@<text>
function(e) {
Handle the Click event inline.
}
</text>
))
)