Rahul Kumar

Label multiline right aligned

Recommended Posts

I am using the Bar2D graph and can easily make a label multiline by either outputting new line characters in the label value or by using isHTML and adding a BR in the label. What I really want though is the label to be right aligned. At the moment the labels are coming out like this

 

 

 

This is the first line

 

second line

 

 

 

What I want is it to look something like this

 

 

 

This is the first line

 

second line

 

 

 

Any ideas on how to do this?

Share this post


Link to post
Share on other sites

Hi,

 
I am afraid, this is not supported as of now, but you could use the following method to doing the same in a different way:
 
To aligning the text you would need to use <p align="right"> tag in label attribute of <set> element and also need to set font style of DATALABELS object to isHTML='1'
Please see the sample XML:
 
<chart >

<set label='This is the first line<BR><P align="Right" >second line</P>' value='500' />

<set label='Feb' value='857' />

<set label='Mar' value='671' />

<set label='Apr' value='494' />

<styles>

  <definition>

<style name='myHTMLFont' type='font' isHTML='1' />

  </definition>

  <application>

<apply toObject='DATALABELS' styles='myHTMLFont' />

<apply toObject='TOOLTIP' styles='myHTMLFont' />

  </application>

</styles>

</chart>

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