Sort Chart Axis labels

I have a bar chart that could have data like the following:

Series 1:
Label: 1/20
Value: 2

Label: 3/20
Value: 3

Series 2:
Label: 1/20
Value: 3

Label: 2/20
Value: 4

So when the chart is displayed, the X-axis labels are actually in following order: 1/20, 3/20, 2/20 instead of the desired 1/20, 2/20, 3/20 order.  Is there a property available to sort an axis label order??

3 Replies

DG Durga Gopalakrishnan Syncfusion Team April 17, 2020 01:26 PM UTC

Hi Katie, 

Greetings from Syncfusion. 

We have analysed your query. As of now, we don’t have support to sort the x labels with fraction.  

Kindly revert us, if you have any concerns. 

Regards, 
Durga G 



KP Katie Prodoehl April 17, 2020 02:25 PM UTC

Or by date?  The labels are actually mm/yy strings.


DG Durga Gopalakrishnan Syncfusion Team April 20, 2020 03:39 PM UTC

Hi Katie, 

We have analysed your query. We suggest you to use datetime axis with labelformat as MM/yy to achieve your requirement. We have prepared sample for your reference. Please check with the below code snippet and sample 

Code Snippet 
 
<SfChart> 
  <ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.DateTime" IntervalType="IntervalType.Months" Interval="1" LabelFormat="MM/yy"> 
  </ChartPrimaryXAxis> 
</SfChart> 


Screenshot 

 
Sample 

Kindly revert us, if you have any concerns. 

Regards, 
Durga G 


Loader.
Up arrow icon