Sign in to follow this  
NoBullMan

Labels On Multi-Line

Recommended Posts

How do I break labels on two lines?

My chart labels come from a specific column of a data table I use to plot the chart. But I need to add additional info below it (like value and percentage).

 

for (int i = 4; i < table.Columns.Count - 2; i++)
{
   xmlData.AppendFormat("<category label='" + table.Columns[i].ColumnName + " " + some_value_here + " (" +
   percentage_here + "%)' />");
}

 

 

I need some_value_here (percentage_here) to be below the label values.

Share this post


Link to post
Share on other sites

I got the labels to display on two lines but can't get the % sign to show:

 

for (int i = 4; i < table.Columns.Count - 2; i++)<div>{</div><div>        xmlData.AppendFormat("<category label='" + table.Columns[i].ColumnName + "\n " + SomeValue + " (" +  Some_Percentage + "%)' />");</div><div>}</div><div>xmlData.Append("</categories>");</div><div>

Edited by NoBullMan

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Please try using the pseudo code {br}.

 

This cant be done inside the for loop. You will have to manually edit each label.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this