We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Forcing Radial Slider Values --> stems from tick frequency issues

Thread ID:

Created:

Updated:

Platform:

Replies:

128378 Jan 17,2017 08:49 PM UTC Jan 19,2017 07:06 AM UTC WPF 3
loading
Tags: SfRadialSlider
Eric Baumann
Asked On January 17, 2017 08:49 PM UTC

Hi, 

I am trying to use the SfRadialSlider for device control. I would like the slider to display values between 0-250 (simple enough). I currently have it so that the radial pointer label is hidden and the value is instead displayed in an editable textbox at the center of the control. There is a two way binding between the textbox value and the slider value. 

HOWEVER, though I would like to display all values between 0-250, I want all values (NOTE: values can be selected on the slider or entered in the textbox) below 0.5 to coerce to 0.5 since the device can only handle values between 0.5-250. I would just set the MinValue property of the control to 0.5, but that makes the tick numbering very ugly. Is this possible to do?

Thanks!

Durga Rajan [Syncfusion]
Replied On January 18, 2017 12:08 PM UTC

Hi Eric Baumann,

Thank you for contacting Syncfusion support.

We have checked your query and prepared a sample that tries to meet your requirement. In this sample, we have increased the height and width of the control to display the values between 0.5 to 250 properly. Label values will get overlap, if we tries to display all the values between 0.5 to 250. So we can display the labels with some interval as per our requirement to avoid overlapping of value by changing the TickFrequency property. Please download the sample for the same from the following location.

Sample: RadialSlider_Sample

Regards,
Durga S.

Eric Baumann
Replied On January 18, 2017 05:40 PM UTC

Hi Durga,

Thanks for the response, I think I need to clarify my request though. The slider value can be set 3 different ways by the user: they can click on the slider itself, they can enter a value in the slider's text box, or they can load a pre-made module that sets a value from a database. 

The slider will have properties as follows: MinValue="0" MaxValue="250" TickFrequency="25" (so 10 total ticks) SmallChange="2" (which means that by clicking on the slider, the user should only be able to change in increments of 2, right? They should still be able to enter decimal values in the textbox I believe).

The device this slider is controlling cannot tolerate a value below 0.5, so I would like to coerce all values below 0.5 to 0.5 so as to not break the device. The database doesn't contain any values below 0.5, so the only things I would need to defend against would be the user setting a value in the textbox and the slider itself. For example, if the user turns the slider to 0, the slider should instead alter its value to 0.5. 

Am I correct in that the slider can take decimal values too? I obviously couldn't accomplish decimals via the slider (unless I edit the SmallChange value or previously enter a decimal value to the slider), but via the textbox or database.

Thanks
-Eric


Durga Rajan [Syncfusion]
Replied On January 19, 2017 07:06 AM UTC

Hi Eric Baumann,

Thanks for your update.

Query 1: For example, if the user turns the slider to 0, the slider should instead alter its value to 0.5.

We can change the Slider value as 0.5 when the value of slider is less than 0.5 in ValueChanged event of SfRadialSlider. We have modified the sample and you can download the sample from the below location.

Sample: RadialSlider_Modified_Sample

Query 2: I obviously couldn't accomplish decimals via the slider (unless I edit the SmallChange value or previously enter a decimal value to the slider), but via the textbox or database.

We can select the decimal values from the slider only if the SmallChange value is decimal. So we cannot select decimal values from the slider when the Small change is 2 (Two).

Regards,
Durga S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;