Chart-Bar Text Orientation and Y-Axis Number Display

Hi, I have a bar chart like this

- Bar Chart : https://prnt.sc/hyem2g

What I want to asks, are :
1. I have value of 108024967.6132. How can I display that value (and the other values) with thousand separator, like 108,024,967.6132 ?
2. How can I make the above value displayed on 45 degrees oriented style ?
Like this one : https://prnt.sc/hyep23

3. How can I display the Y-axis value with thousand separator, like 100,000,000 ; 200,000,000; etc ?

4. In this picture : https://prnt.sc/hyewqr
Is it possible to make the gap between Y-axis line and first bar chart, a bit narrow ? How exactly it is ?

Thank you :)

3 Replies

DP Deepaa Pragaasam Syncfusion Team January 11, 2018 06:24 AM UTC

Hi Caraka, 

Thanks for contacting Syncfusion Support. 
We have analyzed your queries . Please find the responses to the below queries  

Query 1: I have value of 108024967.6132. How can I display that value (and the other values) with thousand separator, like 108,024,967.6132 ? 
 
The datalabels can be displayed in the specified format by using the “TextFormat” property of the series . 
Please refer the code snippet below  
 
[Form1.cs] 

series1.Style.TextFormat = "{0:n4}"; 


Query 2:  How can I make the above value displayed on 45 degrees oriented style ? 
 
The datalabels can be rotated by using the Orientation property present in the Font of the series. 
Please refer the code snippet below  
 
[Form1.cs] 

series1.Style.Font.Orientation = 45; 
 
 
Query 3: How can I display the Y-axis value with thousand separator, like 100,000,000 ; 200,000,000; etc ? 
The format for the yAxis labels can be applied using the Format property present in the PrimaryYAxis. 
Please refer the code snippet below 
 
[Form1.cs] 

chart.PrimaryYAxis.Format = "n0" 


Query 4: Is it possible to make the gap between Y-axis line and first bar chart, a bit narrow ? How exactly it is ? 
 
Yes it is possible to reduce the gap between the Yaxis line and the first column. The Gap  is reduced by setting the Range property for the primaryXAxis.  
Please refer the code snippet below 
 
[Form1.cs] 

chart.PrimaryXAxis.Range = new MinMaxInfo(-1, 10, 1); 


Please refer the below screenshot for the chart containing all the mentioned properties  
 

We have attached the sample for your reference  

To know more the label format please refer the below link 

Please let me know if you have any concerns. 

Regards, 
Deepaa. 




CW Caraka Wedhatama January 11, 2018 06:36 AM UTC

Dear Deepa,

Thank you so much for your response. That worked great. It helped me a lot. :)


PN Preethi Nesakkan Gnanadurai Syncfusion Team January 12, 2018 04:16 AM UTC

Hi Caraka, 
  
Most welcome. 
Please let us know if you need any further assistance. 
  
Regards,  
Preethi 
  


Loader.
Up arrow icon