Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Vertical alignment in Label(Rotation)
vivekpv10
How to do a verical alignment on a label in Birt report.I know for chart it is possible rotate the label.How can do it in a report.I need a vertical alignment on column header(ie label).Can anyone pls share the technique
Find more posts tagged with
Comments
kclark
I use <a class='bbc_url' href='
http://www.birt-exchange.com/be/marketplace/app-showcase/?app=22'>birt-controls-lib</a>
; to do this. The install was simple, I used the eclipse install manager using <a class='bbc_url' href='
http://svn.codespot.com/a/eclipselabs.org/birt-innovent-update/2.5.2'>http://svn.codespot.com/a/eclipselabs.org/birt-innovent-update/2.5.2</a>
; as the update URL. After that you can drag in rotated text objects to the report and rotate the text with the UI.
vivekpv10
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="113519" data-time="1358961449" data-date="23 January 2013 - 10:17 AM"><p>
I use <a class='bbc_url' href='
http://www.birt-exchange.com/be/marketplace/app-showcase/?app=22'>birt-controls-lib</a>
; to do this. The install was simple, I used the eclipse install manager using <a class='bbc_url' href='
http://svn.codespot.com/a/eclipselabs.org/birt-innovent-update/2.5.2'>http://svn.codespot.com/a/eclipselabs.org/birt-innovent-update/2.5.2</a>
; as the update URL. After that you can drag in rotated text objects to the report and rotate the text with the UI.<br /></p></blockquote>
I tried..working..<strong class='bbc'>But one issue</strong>.How can i display text in two lines with vertical alignment in same cell.How to write expression for that??.Example:if text is "Hello how are you",then i want to show "hello how" in first line and "are you" in second line both with vertical alignment in same cell(ie. 90 degree).
kclark
You could use a script like this, it breaks the string up into 10 character lines.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var myText = "This is some sample text for the rotated text object";
var txtLen = myText.length;
var breaks = Math.floor(txtLen / 10);
txtLen = (breaks * 2) + txtLen;
String.prototype.insert = function (index, string) {
if (index > 0)
return this.substring(0, index) + string + this.substring(index, this.length);
else
return string + this;
};
var j = 0;
for(i=0;i<=txtLen;i=i+10) {
myText = myText.insert(i+10+j, "\n");
j++;
}
myText;
</pre>
vivekpv10
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="113560" data-time="1359045152" data-date="24 January 2013 - 09:32 AM"><p>
You could use a script like this, it breaks the string up into 10 character lines.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var myText = "This is some sample text for the rotated text object";
var txtLen = myText.length;
var breaks = Math.floor(txtLen / 10);
txtLen = (breaks * 2) + txtLen;
String.prototype.insert = function (index, string) {
if (index > 0)
return this.substring(0, index) + string + this.substring(index, this.length);
else
return string + this;
};
var j = 0;
for(i=0;i<=txtLen;i=i+10) {
myText = myText.insert(i+10+j, "\n");
j++;
}
myText;
</pre></p></blockquote>
@kclark
..thank u so much.i hope it will work...i will test it
vivekpv10
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="113560" data-time="1359045152" data-date="24 January 2013 - 09:32 AM"><p>
You could use a script like this, it breaks the string up into 10 character lines.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var myText = "This is some sample text for the rotated text object";
var txtLen = myText.length;
var breaks = Math.floor(txtLen / 10);
txtLen = (breaks * 2) + txtLen;
String.prototype.insert = function (index, string) {
if (index > 0)
return this.substring(0, index) + string + this.substring(index, this.length);
else
return string + this;
};
var j = 0;
for(i=0;i<=txtLen;i=i+10) {
myText = myText.insert(i+10+j, "\n");
j++;
}
myText;
</pre></p></blockquote>
<br />
Thanks man..it works like a charm.i am going to be a fan of u..
kclark
You're welcome, glad it's working for you!