Telerik Forums
UI for ASP.NET Core Forum
1 answer
201 views

 

Hello, 

I am:

- using the linear gauge

- have a method "FormatLongNumber" that formats the label value

- * need a way to access the current label value so that i can pass the data to the formatting function. the highlighted line below shows the call to the function. however i do not know how to pass the actual value

- the text that is highlighted in red is where i need to access the value of the current label

Thanks!

Bill

 

 

Html.Kendo().LinearGauge()
                       .Name("faultcount_#=FaultCount#")
                        .HtmlAttributes(new { data_bind = "value: FaultCount" })

                       .Scale(scale => scale
                         .Ranges(ranges =>
                         {
                             ranges.Add().From(27500).To(35000).Color("red");
                         }
                             ).Labels(label =>
                             label.Visible(true).Color("white").Template("#=FormatLongNumber(value)#")).Line(line => line.Visible(true))
                       .Vertical(false)
                           .Min(0) // Set the min value of the LinearGauge.
                           .Max(35000) // Set the min value of the LinearGauge.
                           .MajorTicks(ticks=> ticks.Color("white"))
                           .MinorTicks(mticks=> mticks.Color("white"))
                       )
                       
                       .Pointer(pointer => pointer


                           .Shape(GaugeLinearPointerShape.BarIndicator)
                           .Color("white")
                       )
Aleksandar
Telerik team
 updated answer on 16 Jun 2021
7 answers
243 views

Hi, 

I'm trying the Arc Gauge and its not show I'm getting kendoArcGauge is not a function, please see the attached screenshot

Claudia
Top achievements
Rank 1
 answered on 20 May 2019
4 answers
75 views

Hi, I have a problem displaying multiple needles with the radial gauge. 

I have a radialGauge defined as such:

@(Html.Kendo().RadialGauge().Name("MultiGauge")
                .Pointers(pointers =>
                {
                    pointers.Add().Color("#c20000").Length(0.5).Cap(c => c.Size(0.15));
                    pointers.Add().Color("#ff7a00").Length(0.75).Cap(c => c.Size(0.1));
                    pointers.Add().Color("#ff7a22").Length(0.75).Cap(c => c.Size(0.1));
                    pointers.Add().Color("#ff1100").Length(0.75).Cap(c => c.Size(0.1));
                })
                     .Scale(scale => scale
                            .MinorUnit(5)
                            .StartAngle(-60)
                            .EndAngle(240)
                            .Max(100)
                            .Labels(labels => labels
                                .Position(GaugeRadialScaleLabelsPosition.Inside)
                            )
                            .Ranges(ranges =>
                            {
                                ranges.Add().From(0).To(20).Color("#3bd11d");
                                ranges.Add().From(20).To(40).Color("#ffc700");
                                ranges.Add().From(40).To(60).Color("#ff7a00");
                                ranges.Add().From(60).To(100).Color("#c20000");
                            })
                        )
 
                    )
)

 

Then some js to set the values:

<script>
    $(document).ready(function() {
             
        var multiGauge = $("#MultiGauge").data("kendoRadialGauge");
 
 
        multiGauge.pointers[0].value(15);
        multiGauge.pointers[1].value(34);
        multiGauge.pointers[2].value(55);
        multiGauge.pointers[3].value(80);
        multiGauge.pointers[5].value(80); //required lol???
 
        multiGauge.redraw();
});
 
</script>

When I only set the pointer index 0,1,2, and 3, the gauge does not work.  The needles remain at zero and do not go to the specified value. 

However, if another value is added to an index that doesn't even exist... everything works.  

-Steve

Georgi
Telerik team
 answered on 27 Mar 2019
6 answers
320 views

Hello. Is there a possibility to add a Title or Legend inside the @(Html.Kendo().RadialGauge() )? By trying .title or .legend nothing appears. In the demo's there arent titles nor legends. 

 

Regards.

Rumen
Telerik team
 answered on 05 Sep 2018
1 answer
111 views

Is there any way to simulate the behavior of a wind direction gauge, using the radial gauge template for .NetCore?

Ive been trying different ways but the angles of the gauge doesnt give me the desired output.

Attached to this, theres a example of what i want to accomplish.

Thanks!

Georgi
Telerik team
 answered on 22 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?