Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Aligning axes labels
Migrateduser
I am using the following code to "word-wrap" the labels on my x-axis.
function beforeDrawAxisLabel( axis, label, icsc ) {
importPackage(Packages.org.eclipse.birt.chart.model.attribute);
if (axis.getType() != AxisType.LINEAR_LITERAL){ //Y-axis
var tst=label.getCaption().getValue();
label.getCaption().setValue(tst.substring(0,8) + "\r\n" + tst.substring(9));
label.setVisible(true);
}
}
It does the desired effect of word-wrapping the labels, but the text is left-aligned, i.e. the second line starts at the left-most point of the label. I'd prefer it to be center-aligned.
Anybody have any ideas?
Thanks!
Kevin
Find more posts tagged with
Comments
There are no comments yet