Remove comma (,) in Category Axis Labels

Hi,

I need to plot a mixed chart with a combination of 2x StackingColumn and 2x LineCharts in sequential order.

To plot all data points in sequential order,  IsIndexed is set to "true" in <ChartPrimaryXAxis>, because the datasource contains duplicated x-values and I don't want it to be auto-categorised or aggregated. 

The problem is, when IsIndexed="true", the X axis labels are showing all series x-values with comma, for example "A,A,A,A". Instead the desired x value should show only "A". 

I think the link below shows exactly what I want to achieve, but it is meant for Xamarin, not Blazor
https://www.syncfusion.com/kb/11317/how-to-remove-comma-in-categoryaxis-labels-in-xamarin-forms-chart

Is there a way to achieve this? 

Attached here with the a zip folder with my razor file and screenshot for your reference. Thanks.





Attachment: CategoryAxisIssue_e1eb5ba1.zip

7 Replies

SM Srihari Muthukaruppan Syncfusion Team January 7, 2021 08:48 AM UTC

Hi Jingze, 
 
We have analysed your query. From that, we would like to let you know that we can achieve your requirement by using “OnAxisLabelRender” event in the chart. Based on your requirement we have prepared a sample for your reference. Please find the below sample, code snippet and screenshot.  
   
 
 
Code Snippet:  
// add your additional code here 
<ChartEvents OnAxisLabelRender="AxisLabelEvent"></ChartEvents> 
// add your additional code here 
 
public void AxisLabelEvent(AxisLabelRenderEventArgs args) 
    { 
        var result = args.Text.Replace(",", " "); 
        args.Text = result; 
    } 
 
Screenshot: 
 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M 



JI Jingze January 8, 2021 03:27 AM UTC

Hi,

OnAxisLabelRender was not available in v18.3 so I upgraded to v18.4.0.33.

After the upgrade, all my charts could not be rendered. Can you please check? 

Below is the error message I am having: 




SM Srihari Muthukaruppan Syncfusion Team January 11, 2021 09:27 AM UTC

Hi Jingze,   
  
Sorry for the inconvenience.  
     
We have analyzed your query. From that we would like to let you know that we have already considered this scenario as a bug and logged a bug request on this and you can keep track of it from the below feedback portal link.    
       
       
This fix will be available in our weekly patch release which is scheduled to be rolled out on or before 12 January 2021. We appreciate your patience until then.    
     
Regards,    
Srihari  



SM Srihari Muthukaruppan Syncfusion Team January 12, 2021 01:46 PM UTC

Hi Jingze, 
 
We are glad to announce that our v18.4.34 patch release is rolled out, we have added the fix for the reported scenario. And you can use the latest (18.4.34) Syncfusion.EJ2.Blazor NuGet package version and updated interop CDN file to get rid of the reported issue. 
 
 
 
 
We appreciate your patience in waiting for this release. Kindly let us know if you need further assistance. 
 
Regards, 
Srihari 



JI Jingze January 14, 2021 08:59 AM UTC

Hi,

I've upgraded to the new version v18.4.34 but still having the same issue. 


All my charts cannot be rendered now. Appreciate if you could take a look and advise. 
Attached here with the a zip folder with my razor file and screenshot for your reference. Thanks.




Attachment: BlazorSfChart184_9367c024.zip


SM Srihari Muthukaruppan Syncfusion Team January 15, 2021 08:55 AM UTC

Hi Jingze, 
 
Sorry for the inconvenience. 
 
We have analyzed your query. From that we suspect the reported scenario might occur due to the usage of .NET 3.1 Framework. We have already considered this scenario as bug. Hence we suggest you to upgrade the Framework version to 5.0 to overcome the reported scenario and also this fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on or before January 19 2021. 
 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M 



SM Srihari Muthukaruppan Syncfusion Team January 19, 2021 02:20 PM UTC

Hi Jingze, 
 
We are glad to announce that our v18.4.35 patch release is rolled out, we have added the fix for the exception thrown in .NET 3.1. And you can use the latest (18.4.35) Syncfusion.EJ2.Blazor NuGet package version and updated interop CDN file to get rid of the reported issue. 
 
 
Screenshot: 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari 


Loader.
Up arrow icon