Search results

Events in ASP.NET MVC Linear Gauge control

17 Sep 2021 / 3 minutes to read

This section describes the Linear Gauge component’s event that gets triggered when corresponding operations are performed.

AnimationComplete

When the pointer animation is completed, the AnimationComplete event will be triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").AnimationComplete("animationComplete").Axes(new List<Syncfusion.EJ2.LinearGauge.LinearGaugeAxis>
{
    new Syncfusion.EJ2.LinearGauge.LinearGaugeAxis
    {
        Pointers = new List<Syncfusion.EJ2.LinearGauge.LinearGaugePointer>
        {
            new Syncfusion.EJ2.LinearGauge.LinearGaugePointer
            {
                Value = 10
            }
        }
    }
}).Render()

<script>
    function animationComplete(args) {
	}
</script>

AnnotationRender

Before the annotation is rendered in the Linear Gauge, the AnnotationRender event will be triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("gauge").AnnotationRender("annotationRender").Annotations(new List<Syncfusion.EJ2.LinearGauge.LinearGaugeAnnotation> {
    new Syncfusion.EJ2.LinearGauge.LinearGaugeAnnotation
    {
        Content = "<div id='first'><h1>Gauge</h1></div>",
        ZIndex = "1",
		AxisValue = 0
    },
}).Render()

<script>
    function annotationRender(args) {
    }
</script>

AxisLabelRender

Before each axis label is rendered in the Linear Gauge, the AxisLabelRender event is fired. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").AxisLabelRender("axisLabelRender").Render()

<script>
    function axisLabelRender(args) {
	}
</script>

BeforePrint

The BeforePrint event is fired before the print begins. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2;

@Html.EJS().Button("togglebtn").Content("Print").CssClass("e-flat").Render()

@Html.EJS().LinearGauge("linear").Height("450px").AllowPrint(true).BeforePrint("beforePrint").Width("650px").Render()

<script>
    document.getElementById('togglebtn').onclick = function () {
        var linearObj = document.getElementById('linear').ej2_instances[0];
        linearObj.print();
    };
	
	function beforePrint(args) {
	}
</script>

DragEnd

The DragEnd event will be fired before the pointer drag is completed. To know more about the argument of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").DragEnd("dragEnd").Axes(new List<Syncfusion.EJ2.LinearGauge.LinearGaugeAxis>
{
    new Syncfusion.EJ2.LinearGauge.LinearGaugeAxis
    {
        Pointers = new List<Syncfusion.EJ2.LinearGauge.LinearGaugePointer>
        {
            new Syncfusion.EJ2.LinearGauge.LinearGaugePointer
            {
                EnableDrag = true
            }
        }
    }
}).Render()

<script>
    function dragEnd(args) {
	}
</script>

DragMove

The DragMove event will be fired when the pointer is dragged. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").DragMove("dragMove").Axes(new List<Syncfusion.EJ2.LinearGauge.LinearGaugeAxis>
{
    new Syncfusion.EJ2.LinearGauge.LinearGaugeAxis
    {
        Pointers = new List<Syncfusion.EJ2.LinearGauge.LinearGaugePointer>
        {
            new Syncfusion.EJ2.LinearGauge.LinearGaugePointer
            {
                EnableDrag = true
            }
        }
    }
}).Render()

<script>
    function dragMove(args) {
	}
</script>

DragStart

When the pointer drag begins, the DragStart event is triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").DragStart("dragStart").Axes(new List<Syncfusion.EJ2.LinearGauge.LinearGaugeAxis>
{
    new Syncfusion.EJ2.LinearGauge.LinearGaugeAxis
    {
        Pointers = new List<Syncfusion.EJ2.LinearGauge.LinearGaugePointer>
        {
            new Syncfusion.EJ2.LinearGauge.LinearGaugePointer
            {
                EnableDrag = true
            }
        }
    }
}).Render()

<script>
    function dragStart(args) {
	}
</script>

GaugeMouseDown

When mouse is pressed down on the gauge, the GaugeMouseDown event is triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").GaugeMouseDown("gaugeMouseDown").Render()

<script>
    function gaugeMouseDown(args) {
	}
</script>

GaugeMouseLeave

When mouse pointer moves over the gauge, the GaugeMouseLeave event is triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").GaugeMouseLeave("gaugeMouseLeave").Render()

<script>
    function gaugeMouseLeave(args) {
	}
</script>

GaugeMouseMove

When mouse pointer leaves the gauge, the GaugeMouseMove event is triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").GaugeMouseMove("gaugeMouseMove").Render()

<script>
    function gaugeMouseMove(args) {
	}
</script>

GaugeMouseUp

When the mouse pointer is released over the Linear Gauge, the GaugeMouseUp event is triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").GaugeMouseUp("gaugeMouseUp").Render()

<script>
    function gaugeMouseUp(args) {
	}
</script>

Load

Before the Linear Gauge is loaded, the Load event is fired. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").Load("load").Render()

<script>
    function load(args) {
	}
</script>

Loaded

After the Linear Gauge has been loaded, the Loaded event will be triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").Loaded("loaded").Render()

<script>
    function loaded(args) {
	}
</script>

Resized

After the window resizing, the Resized event is triggered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").Resized("resized").Render()

<script>
    function resized(args) {
	}
</script>

TooltipRender

The TooltipRender event is fired before the tooltip is rendered. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("gauge").TooltipRender("tooltipRender").Tooltip(new Syncfusion.EJ2.LinearGauge.LinearGaugeTooltipSettings 
    {
        Enable = true
    }).Axes(new List<Syncfusion.EJ2.LinearGauge.LinearGaugeAxis>
        {
            new Syncfusion.EJ2.LinearGauge.LinearGaugeAxis
        {
            Pointers = new List<LinearGaugePointer>
            {
                new Syncfusion.EJ2.LinearGauge.LinearGaugePointer
                { 
                    Value = 80
                }
            }
        }
    }
).Render()

<script>
    function tooltipRender(args) {
    }
</script>

ValueChange

The ValueChange event is triggered when the pointer is dragged from one value to another. To know more about the arguments of this event, refer here.

razor
Copied to clipboard
@using Syncfusion.EJ2.LinearGauge;

@Html.EJS().LinearGauge("linear").ValueChange("valueChange").Axes(new List<Syncfusion.EJ2.LinearGauge.LinearGaugeAxis>
{
    new Syncfusion.EJ2.LinearGauge.LinearGaugeAxis
    {
        Pointers = new List<Syncfusion.EJ2.LinearGauge.LinearGaugePointer>
        {
            new Syncfusion.EJ2.LinearGauge.LinearGaugePointer
            {
                EnableDrag = true
            }
        }
    }
}).Render()

<script>
    function valueChange(args) {
	}
</script>