How can I create a Gauge that looks like the one in the image attached ?
I am using RadHorizontalLinearGauge in Code Behind.
I want to know:
- how can I have text/label above the needle indicator ? (pointer).
- how can I create trend ? (dotted vertical line)
- how can Iinsert a label/text inside the a range ("Schlecht" in the attached image) ?
5 Answers, 1 is accepted
0

Devid
Top achievements
Rank 1
answered on 29 May 2019, 02:32 PM
No one ? I guess that I habe to do something with CustomItems
0
Hello Devid,
Yes, this is the way to go. You can add the label above the marker, the labels inside the bars, and also the dotted lines, using the CustomItems collection of the scale. Maybe you already found this, but here is an article showing how to use the collection and position the custom elements. I hope this helps.
Regards,
Martin Ivanov
Progress Telerik
Yes, this is the way to go. You can add the label above the marker, the labels inside the bars, and also the dotted lines, using the CustomItems collection of the scale. Maybe you already found this, but here is an article showing how to use the collection and position the custom elements. I hope this helps.
Regards,
Martin Ivanov
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.
0

Devid
Top achievements
Rank 1
answered on 03 Jun 2019, 08:25 AM
Can you provide a code behind example ?
horizontalScale.CustomItems.Add(???);
0

Devid
Top achievements
Rank 1
answered on 03 Jun 2019, 02:48 PM
Also how do I put labels inside the bars ?
0
Accepted
Hello Devid,
I've attached a small example showing the desired effect. Also, here is an example showing how to add elements in code-behind.
I hope it helps.
Regards,
Martin Ivanov
Progress Telerik
I've attached a small example showing the desired effect. Also, here is an example showing how to add elements in code-behind.
var label =
new
TextBlock();
label.Text =
"Gut"
;
label.FontSize = 18;
Panel.SetZIndex(label, 101);
ScaleObject.SetValue(label, 90);
ScaleObject.SetLocation(label, ScaleObjectLocation.OverCenter);
this
.horizontalScale.CustomItems.Add(label);
Regards,
Martin Ivanov
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.