This is a migrated thread and some comments may be shown as answers.

Get value of model in gauge

1 Answer 4 Views
This is a migrated thread and some comments may be shown as answers.
Chili
Top achievements
Rank 1
Chili asked on 26 Oct 2018, 08:48 AM

Hello,

Since I do not want a static value in my gauge, I want to use some model value. By checking the documentation of the gauge, there is none example to bind it with a model. Is there any example to perform this in asp.net core?  

Kind regards.

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 31 Oct 2018, 07:41 AM
Hello Chili,

You can set the values of the Gauge directly from the ViewModel:
@model int
 
@(Html.Kendo().RadialGauge()
    .Name("gauge")
    .Pointer(pointer => pointer.Value(Model))
    .Scale(scale => scale
        .MinorUnit(5)
        .StartAngle(-30)
        .EndAngle(210)
        .Max(180)
    )
)

If the Gauge will be used within a template that will be evaluated on client-side and should be bound to a client model you could use the MVVM binding:
Hope this helps.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
Chili
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or