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

ChartRangeBarSeriesBuilder

Properties

RangeBarSeries - IChartRangeBarSeries

Gets or sets the name of the field in the model that contains the series "from" values.

Series - IChartRangeBarSeries

Gets or sets the name of the field in the model that contains the series "from" values.

Methods

Stack(System.Boolean)

Sets a value indicating if the bars should be stacked.

Parameters

stacked - System.Boolean

A value indicating if the bars should be stacked.

Example


            @(Html.Kendo().Chart(Model)
                        .Name("Chart")
                        .Series(series => series.Bar(model => model.FromA, model => model.ToA).Stack(true))
            )

Stack(System.String)

Sets the name of the stack that this series belongs to. Each unique name creates a new stack.

Parameters

stackGroup - System.String

The name of the stack group.

Example


            @(Html.Kendo().Chart(Model)
                        .Name("Chart")
                        .Series(series => series.RangeBar(model => model.FromA, model => model.ToA).Stack("Female"))
            )

Stack(Kendo.Mvc.UI.ChartStackType,System.String)

Sets the type of stacking to use in the seris.

Parameters

stackType - ChartStackType

The stack type.

stackGroup - System.String

The name of the stack group.

Example


            @(Html.Kendo().Chart(Model)
                        .Name("Chart")
                        .Series(series => series.RangeBar(model => model.FromA, model => model.ToA).Stack(ChartStackType.Stack100))
            )

Aggregate(Kendo.Mvc.UI.ChartSeriesAggregate)

Sets the aggregate function for date series. This function is used when a category (an year, month, etc.) contains two or more points.

Parameters

aggregate - ChartSeriesAggregate

Aggregate function name.

Example


            @(Html.Kendo().Chart(Model)
                        .Name("Chart")
                        .Series(series => series.RangeBar(model => model.FromA, model => model.ToA).Aggregate(ChartSeriesAggregate.Avg))
            )

Labels(System.Action)

Configures the range bar chart labels.

Parameters

configurator - System.Action<ChartBarLabelsBuilder>

The configuration action.

Example


            @(Html.Kendo().Chart()
                        .Name("Chart")
                        .Series(series => series
                            .RangeBar(model => model.FromA, model => model.ToA)
                            .Labels(labels => labels
                                .Position(ChartBarLabelsPosition.InsideEnd)
                                .Visible(true)
                            )
                         )
            )

Labels(System.Boolean)

Sets the visibility of range bar chart labels.

Parameters

visible - System.Boolean

The labels visibility value. The default value is false.

Example


            @(Html.Kendo().Chart()
                        .Name("Chart")
                        .Series(series => series
                            .RangeBar(model => model.FromA, model => model.ToA)
                            .Labels(true)
                         )
            )

Labels(System.Action)

Configures the range bar chart labels.

Parameters

configurator - System.Action<ChartRangeBarLabelsBuilder>

The configuration action.

Example


            @(Html.Kendo().Chart()
                        .Name("Chart")
                        .Series(series => series
                            .RangeBar(model => model.FromA, model => model.ToA)
                            .Labels(labels => labels
                                .Position(ChartBarLabelsPosition.InsideEnd)
                                .Visible(true)
                            )
                         )
            )

Gap(System.Double)

Set distance between category clusters. A value of 1 means that there is a total of 1 column width / bar 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(Model)
                .Name("Chart")
                .Series(series => series.Bar(s => s.Sales).Gap(1))
            )

Spacing(System.Double)

Sets a value indicating the distance between bars / categories.

Parameters

spacing - System.Double

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

Example


            @(Html.Kendo().Chart(Model)
                .Name("Chart")
                .Series(series => series.Spacing(s => s.Sales).Spacing(1))
            )

Border(System.Int32,System.String,Kendo.Mvc.UI.ChartDashType)

Sets the bars border

Parameters

width - System.Int32

The bars border width.

color - System.String

The bars border color (CSS syntax).

dashType - ChartDashType

The bars border dash type.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Border("1", "#000", ChartDashType.Dot))
            )

Border(System.Action)

Configures the bar border

Parameters

configurator - System.Action<ChartBorderBuilder>

The border configuration action

Overlay(Kendo.Mvc.UI.ChartBarSeriesOverlay)

Sets the bar effects overlay

Parameters

overlay - ChartBarSeriesOverlay

The bar effects overlay. The default is ChartBarSeriesOverlay.Glass

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Overlay(ChartBarSeriesOverlay.None))
            )

NegativeColor(System.String)

Sets the bar color for negative values

Parameters

color - System.String

The bar color for negative values(CSS syntax).

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).NegativeColor("Red"))
            )

Field(System.String)

Sets the value field for the series

Parameters

field - System.String

The value field for the series

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(Model.Records).Field("Value"))
            )

CategoryField(System.String)

Sets the category field for the series

Parameters

categoryField - System.String

The category field for the series

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(Model.Records).Field("Value").CategoryField("Category"))
            )

ColorField(System.String)

Sets the color field for the series

Parameters

colorField - System.String

The color field for the series

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(Model.Records).Field("Value").ColorField("Color"))
            )

NoteTextField(System.String)

Sets the note text field for the series

Parameters

noteTextField - System.String

The note text field for the series

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(Model.Records).Field("Value").NoteTextField("NoteText"))
            )

Visual(System.String)

Sets the series visual handler

Parameters

handler - System.String

The handler name.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(Model.Records).Field("Value").Visual("getSeriesVisual"))
            )

Visual(System.Func)

Sets the series visual handler

Parameters

handler - System.Func<Object,Object>

The handler

Example


            @(Html.Kendo().Chart()
                    .Name("chart")
                    .Series(series =>
                    {
                        series.Column(new double[] { 52000, 34000, 23000, 48000, 67000, 83000 }).Name("Unique visitors").Visual(
                        @<text>
                            function(e) {
                                var origin = e.rect.origin;
                                var center = e.rect.center();
                                var bottomRight = e.rect.bottomRight();

                                var path = new kendo.drawing.Path({
                                          fill: {
                                    color: e.options.color
                                          }
                                })
                                .moveTo(origin.x, bottomRight.y)
                                .lineTo(bottomRight.x, bottomRight.y)
                                .lineTo(center.x, origin.y)
                                .close();

                            return path;
                        }
                        </text>
                    );
                    })
            ) 

Whiskers(System.Action)

The chart series whiskers configuration.

Parameters

configurator - System.Action<ChartSeriesWhiskersSettingsBuilder>

The configurator for the whiskers setting.

Name(System.String)

Sets the series title displayed in the legend.

Parameters

text - System.String

The title.

Example


            @(Html.Kendo().Chart(Model)
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Name("Sales"))
            )

GroupNameTemplate(System.String)

Sets the name template for auto-generated series when binding to grouped data.

Parameters

groupNameTemplate - System.String

The name template for auto-generated series when binding to grouped data.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .DataSource(dataSource => dataSource
                           .Read(read => read.Action("_StockData", "Scatter_Charts"))
                           .Group(group => group.Add(model => model.Symbol))
                       )
                       .Series(series => series.Bar(s => s.Sales)
                            .Name("Sales")
                            .GroupNameTemplate("#= series.name # for #= group.field # #= group.value #")
                       )
            )

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(Model)
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Opacity(0.5))
            )

Color(System.String)

Sets the bar fill color

Parameters

color - System.String

The bar fill color (CSS syntax).

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Color("Red"))
            )

Color(System.Func)

Sets the function used to retrieve point color.

Parameters

colorFunction - System.Func<Object,Object>

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

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series
                           .Bar(s => s.Sales)
                           .Color(
                               @<text>
                               function(point) {
                                   return point.value > 5 ? "red" : "green";
                               }
                               </text>
                           )
                        )
            )

ColorHandler(System.Func)

Sets the function used to retrieve point color.

Parameters

colorFunction - System.Func<Object,Object>

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

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series
                           .Bar(s => s.Sales)
                           .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 be executed to retrieve the color of each point.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series
                           .Bar(s => s.Sales)
                           .ColorHandler("pointColor")
                        )
            )

Tooltip(System.Action)

Configure the data point tooltip for the series.

Parameters

configurator - System.Action<ChartTooltipBuilder>

Use the configurator to set data tooltip options.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales)
                           .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.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Tooltip(true))
            )

Axis(System.String)

Sets the axis name to use for this series.

Parameters

axis - System.String

The axis name for this series.

Example


            @(Html.Kendo().Chart(Model)
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Name("Sales").Axis("secondary"))
                       .ValueAxis(axis => axis.Numeric())
                       .ValueAxis(axis => axis.Numeric("secondary"))
                       .CategoryAxis(axis => axis.AxisCrossingValue(0, 10))
            )

CategoryAxis(System.String)

Sets the axis name to use for this series.

Parameters

categoryAxis - System.String

The category axis name for this series.

Example


            @(Html.Kendo().Chart(Model)
                       .Name("Chart")
                       .Series(series => series.Bar(s => s.Sales).Name("Sales").CategoryAxis("catAxis"))
                       .CategoryAxis(axis => axis.Name("catAxis"))
            )

Highlight(System.Action)

Configures the series highlight

Parameters

configurator - System.Action<ChartSeriesHighlightBuilder>

The configuration action.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Series(series => series.Pie(s => s.Sales, s => s.DateString)
                            .Highlight(highlight => highlight.Color("yellow"))
                      )
            )

Highlight(System.Boolean)

Configures the highlight visibility

Parameters

visible - System.Boolean

The highlight visibility.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Series(series => series.Pie(s => s.Sales, s => s.DateString)
                            .Highlight(false)
                      )
            )

Visible(System.Boolean)

Sets the labels visibility

Parameters

visible - System.Boolean

The labels visibility.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Series(series => series.Bar(s => s.Sales).Visible(false))
            )

VisibleInLegend(System.Boolean)

Sets the labels visibility in the legend

Parameters

visible - System.Boolean

The series visibility in the legend.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .Series(series => series.Bar(s => s.Sales).VisibleInLegend(false))
            )

Notes(System.Action)

Configures the series notes

Parameters

configurator - System.Action<ChartNoteBuilder>

The configuration action.

Example


            @(Html.Kendo().Chart(Model)
                       .Name("Chart")
                       .Series(series => series
                            .Bar(s => s.Sales).Notes(notes => notes.Position(ChartNotePosition.Right))
                       )
            )

Aggregate(System.Func)

Sets the function used to retrieve point color.

Parameters

aggregateFunction - System.Func<Object,Object>

The JavaScript function that will be executed to retrieve the value of each aggregated point.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series
                           .Bar(s => s.Sales)
                           .Aggregate(
                               @<text>
                               function(values) {
                                   return values[0];
                               }
                               </text>
                           )
                        )
            )

Aggregate(System.String)

Sets the function used to retrieve point color.

Parameters

aggregateFunction - System.String

The JavaScript function that will be executed to retrieve the value of each aggregated point.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .Series(series => series
                           .Bar(s => s.Sales)
                           .Aggregate("myAggregate")
                        )
            )
            <script>
            function myAggregate(values) {
                return values[0];
            }
            </script>

ZIndex(System.Double)

Sets the series stacking order relative to other series.

Parameters

zIndex - System.Double

The stacking order of series, relative to other series. The series with the highest Z-index will be placed on top. Series with no Z-index will use the default stacking order based on series type. For example line series will be on top with bar and area following below.

Example


            @(Html.Kendo().Chart(Model)
                       .Name("Chart")
                       .Series(series => {
                            series.Area(s => s.Sales).ZIndex(2);
                            series.Column(s => s.Price).ZIndex(1);
                       })
            )

Median(System.Action)

The configuration of the Box Plot median value indicator (line).

Parameters

configurator - System.Action<ChartSeriesMedianBuilder>

The configurator for the median setting.

Mean(System.Action)

The configuration of the Box Plot mean value indicator (line).

Parameters

configurator - System.Action<ChartSeriesMeanBuilder>

The configurator for the mean 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

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.

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.

In this article
Not finding the help you need?