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

Defines the fluent API for configuring the Kendo UI Sparkline for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the SparklineEventBuilder class.

C#
public SparklineEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The Sparkline event handlers.

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.AxisLabelClick("handler")
)
)

Methods

Defines the handler of the AxisLabelClick client-side event. Fires when an axis label is clicked.

C#
public SparklineEventBuilder AxisLabelClick(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.AxisLabelClick(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the AxisLabelClick client-side event. Fires when an axis label is clicked.

C#
public SparklineEventBuilder AxisLabelClick(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the AxisLabelClick event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.AxisLabelClick("handler")
)
)

Defines the handler of the DataBound client-side event. Fires when the sparkline has received data from the data source and is about to render it.

C#
public SparklineEventBuilder DataBound(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.DataBound(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the DataBound client-side event. Fires when the sparkline has received data from the data source and is about to render it.

C#
public SparklineEventBuilder DataBound(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DataBound event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.DataBound("handler")
)
)

Defines the handler of the Drag client-side event. Fires as long as the user is dragging the sparkline using the mouse or swipe gestures.

C#
public SparklineEventBuilder Drag(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.Drag(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Drag client-side event. Fires as long as the user is dragging the sparkline using the mouse or swipe gestures.

C#
public SparklineEventBuilder Drag(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Drag event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.Drag("handler")
)
)

Defines the handler of the DragEnd client-side event. Fires when the user stops dragging the sparkline.

C#
public SparklineEventBuilder DragEnd(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.DragEnd(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the DragEnd client-side event. Fires when the user stops dragging the sparkline.

C#
public SparklineEventBuilder DragEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragEnd event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.DragEnd("handler")
)
)

Defines the handler of the DragStart client-side event. Fires when the user has used the mouse or a swipe gesture to drag the sparkline.The drag operation can be aborted by calling e.preventDefault().

C#
public SparklineEventBuilder DragStart(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.DragStart(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the DragStart client-side event. Fires when the user has used the mouse or a swipe gesture to drag the sparkline.The drag operation can be aborted by calling e.preventDefault().

C#
public SparklineEventBuilder DragStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragStart event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.DragStart("handler")
)
)

Defines the handler of the PaneRender client-side event. Fires when a pane is rendered because the chart is rendered, or the chart performs panning or zooming, or because the chart is exported with different options. The event can be used to render custom visuals in the panes.

C#
public SparklineEventBuilder PaneRender(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.PaneRender(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the PaneRender client-side event. Fires when a pane is rendered because the chart is rendered, or the chart performs panning or zooming, or because the chart is exported with different options. The event can be used to render custom visuals in the panes.

C#
public SparklineEventBuilder PaneRender(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PaneRender event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.PaneRender("handler")
)
)

Defines the handler of the PlotAreaClick client-side event. Fires when plot area is clicked.

C#
public SparklineEventBuilder PlotAreaClick(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.PlotAreaClick(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the PlotAreaClick client-side event. Fires when plot area is clicked.

C#
public SparklineEventBuilder PlotAreaClick(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PlotAreaClick event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.PlotAreaClick("handler")
)
)

Defines the handler of the PlotAreaHover client-side event. Fired when the user hovers the plot area.

C#
public SparklineEventBuilder PlotAreaHover(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.PlotAreaHover(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the PlotAreaHover client-side event. Fired when the user hovers the plot area.

C#
public SparklineEventBuilder PlotAreaHover(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PlotAreaHover event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.PlotAreaHover("handler")
)
)

Defines the handler of the PlotAreaLeave client-side event. Fired when the cursor leaves the plotArea.

C#
public SparklineEventBuilder PlotAreaLeave(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.PlotAreaLeave(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the PlotAreaLeave client-side event. Fired when the cursor leaves the plotArea.

C#
public SparklineEventBuilder PlotAreaLeave(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PlotAreaLeave event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.PlotAreaLeave("handler")
)
)

Defines the handler of the SeriesClick client-side event. Fires when chart series are clicked.

C#
public SparklineEventBuilder SeriesClick(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.SeriesClick(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the SeriesClick client-side event. Fires when chart series are clicked.

C#
public SparklineEventBuilder SeriesClick(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the SeriesClick event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.SeriesClick("handler")
)
)

Defines the handler of the SeriesHover client-side event. Fires when chart series are hovered. The data that is available when the event is fired is listed below.

C#
public SparklineEventBuilder SeriesHover(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.SeriesHover(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the SeriesHover client-side event. Fires when chart series are hovered. The data that is available when the event is fired is listed below.

C#
public SparklineEventBuilder SeriesHover(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the SeriesHover event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.SeriesHover("handler")
)
)

Defines the handler of the SeriesLeave client-side event. Fired when the cursor leaves a chart series.

C#
public SparklineEventBuilder SeriesLeave(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.SeriesLeave(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the SeriesLeave client-side event. Fired when the cursor leaves a chart series.

C#
public SparklineEventBuilder SeriesLeave(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the SeriesLeave event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.SeriesLeave("handler")
)
)

Defines the handler of the SeriesOver client-side event. Fired when the cursor is over the chart series.

C#
public SparklineEventBuilder SeriesOver(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.SeriesOver(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the SeriesOver client-side event. Fired when the cursor is over the chart series.

C#
public SparklineEventBuilder SeriesOver(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the SeriesOver event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.SeriesOver("handler")
)
)

Defines the handler of the Zoom client-side event. Fires as long as the user is zooming the chart using the mousewheel.

C#
public SparklineEventBuilder Zoom(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.Zoom(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Zoom client-side event. Fires as long as the user is zooming the chart using the mousewheel.

C#
public SparklineEventBuilder Zoom(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Zoom event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.Zoom("handler")
)
)

Defines the handler of the ZoomEnd client-side event. Fires when the user stops zooming the chart.

C#
public SparklineEventBuilder ZoomEnd(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.ZoomEnd(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the ZoomEnd client-side event. Fires when the user stops zooming the chart.

C#
public SparklineEventBuilder ZoomEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ZoomEnd event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.ZoomEnd("handler")
)
)

Defines the handler of the ZoomStart client-side event. Fires when the user has used the mousewheel to zoom the chart.The zoom operation can be aborted by calling e.preventDefault().

C#
public SparklineEventBuilder ZoomStart(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(e =&gt; e.ZoomStart(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the ZoomStart client-side event. Fires when the user has used the mousewheel to zoom the chart.The zoom operation can be aborted by calling e.preventDefault().

C#
public SparklineEventBuilder ZoomStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ZoomStart event.

Returns:

SparklineEventBuilder

Returns the current instance of SparklineEventBuilder .

Example:
C#
@(Html.Kendo().Sparkline()
.Name("Sparkline")
.Events(events =&gt; events
.ZoomStart("handler")
)
)