SfSlider - text labels

Hi there,

On your website you show these four sliders:



How did you implement the words under the ticks (red border)?

Cheers,
Volker

3 Replies 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team July 29, 2020 09:44 AM UTC

Hi Volker,  
 
Greetings from Syncfusion support. 
 
We have checked your requirement with Slider component. We can customize the ticks value using TicksRendering method of Slider component. We have prepared simple sample for your convenience. 
 
Refer the below code snippet. 
    <div> 
        <div>Slider VALUES</div> 
        <div style="width:700px"> 
            <SfSlider ID="dynamic_color_slider" TValue="int" Min="0" Max="5"  Type="SliderType.MinRange" > 
                <SliderEvents TValue="int" TicksRendering="@TickesRendering"></SliderEvents> 
                <SliderTicksData Placement="Placement.After" LargeStep="1"></SliderTicksData> 
            </SfSlider> 
        </div> 
    </div> 
@code{  
    string[] years = new string[] { "VerPoor", "Poor", "Average", "Good", "VeryGood", "Excellent"}; 
    public void TickesRendering(SliderTickEventArgs args) 
    { 
        args.Text = years[(int)args.Value]; 
    } 
   } 
 
Refer the below screenshot. 
 
 
Refer the sample link below. 
 
 
To know more about the Slider component, refer the below links. 
 
 
 
 
 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 


Marked as answer

VO Volker July 29, 2020 01:21 PM UTC

Hi Sowmiya,

thank you!

Let's say the range is from 0 to 10.
Is it possible to implement non-integer value-pairs like {value, name} and display a slider like:



Any idea?

Cheers,
Volker


SP Sowmiya Padmanaban Syncfusion Team July 30, 2020 04:19 PM UTC

Hi Volker,  
 
We have checked requirement with Slider component. Currently, we have not provide support for render the slider Ticks for any given values in the slider limits. We have consider this as a feature request from our end. This feature will be included in any one of our upcoming release. Generally, we will plan feature based on customer count, feature rank and wishlist plan for some feature.  
  
Track the below link to know the feature status.  
 
 
We appreciate your patience. 
 
 
Regards,  
Sowmiya.P 


Loader.
Up arrow icon