Setting Labels to Text rather than numbers

Hi,

Is it possible to set the labels on ticks to text rather than numbers?
I'd like to use a circular gauge to represent a compass, so I's like my labels to be N,NE,E,SE,S,SW,W,NW to represent the compass points.

Thanks,

Jon.

1 Reply

SG Sri Gayathri Gopalakrishnan Syncfusion Team February 26, 2018 06:43 AM UTC

Hi Jon, 
 
Query: Setting Labels to Text rather than numbers 
 
We have analyzed your query and we have prepared samples based on your query. In Sample we have added Label Created Event. In the Event, we have changed existing number label to text label. Please download the sample from the below link, 
 
 
 
XAML: 
 
<syncfusion:CircularScale ShowLastLabel="False" StartAngle="270" SweepAngle="360" StartValue="0" EndValue="360" LabelCreated="CircularScale_LabelCreated" /> 
 
C#: 
private void CircularScale_LabelCreated(object sender, Syncfusion.UI.Xaml.Gauges.LabelCreatedEventArgs e) 
        { 
            switch ((string)e.LabelContent) 
            { 
 
                case "0": 
                    e.LabelContent = "N"; 
                    break; 
                case "45": 
                    e.LabelContent = "NE"; 
                    break; 
                case "90": 
                    e.LabelContent = "E"; 
                    break; 
                case "135": 
                    e.LabelContent = "SE"; 
                    break; 
                case "180": 
                    e.LabelContent = "S"; 
                    break; 
                case "225": 
                    e.LabelContent = "SW"; 
                    break; 
                case "270": 
                    e.LabelContent = "W"; 
                    break; 
                case "315": 
                    e.LabelContent = "NW"; 
                    break; 
            } 
        } 
 
 
Screenshot
  
Regards, 
Sri Gayathri. G 


Loader.
Up arrow icon