We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

About CharColumn and texts of Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

115956 Mar 5,2014 07:29 AM UTC Mar 19,2014 05:23 AM UTC ASP.NET MVC (Classic) 3
loading
Tags: Chart
Jesus Sanchez
Asked On March 5, 2014 07:29 AM UTC

Hello
2 questions:
1 - as I can change the orientation of the text of the x-axis?
2. How can I get the text value of the bar outside or inside the bar depending on the length of the bar and the text?. If can't, how to get the text out of the bar?

Thanks

Attachment: ChartBar_c63bbdb7.rar

Anandaraj T [Syncfusion]
Replied On March 6, 2014 06:27 AM UTC

Hi Jesus Sanchez,

Thanks for using Syncfusion products.

Query #1: as I can change the orientation of the text of the x-axis?

We can achieve this by rotating axis labels. Please refer the following code snippet.

<code>
[CS]
           //Rotating axis labels
            chartmodel.PrimaryXAxis.LabelRotate = true;
            chartmodel.PrimaryXAxis.LabelRotateAngle = 270;
</code>

Query #2:
How can I get the text value of the bar outside or inside the bar depending on the length of the bar and the text?. If can't, how to get the text out of the bar?

If your intention is to display text without getting cut, we suggest you to set "TextOrientation" property of series style to "Smart".

Please refer the following code snippet to achieve this.
<code>
[CS]
           //Displaying series text
            series.Style.DisplayText = true;
            series.Style.Font.Orientation = 270;
            series.Style.TextOrientation = ChartTextOrientation.Smart;
</code>

For your convenience, we have created a simple sample based on your requirements and it can be downloaded from the following link.
TextOrientationMvc.zip

Please let us know if you have any concern.

Regards,
Anand

Jesus Sanchez
Replied On March 6, 2014 04:31 PM UTC

Perfect!!!!

Thanks!!!!


Anandaraj T [Syncfusion]
Replied On March 19, 2014 05:23 AM UTC

Hi Jesus Sanchez,

Thanks for the update. Please let us know if you have any other queries.

Regards,
Anand

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;