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
wrap x-axis label
Migrateduser
<p>How can I wrap the Label on the x-axis after max. 15 characters. Or after "-" , "/", " ". I dont want to cut the <strong>words in the middle</strong>.<br>
<br>
Cutting after 15 characters:</p>
<p><strong> </strong></p>
<pre class="_prettyXprint">
function beforeDrawAxisLabel( axis, label, icsc
){var tst =
label.getCaption().getValue();var wrap =
15;var repeat = Math.floor(tst.length() /
wrap);var str =
tst; if(repeat > 0){str =
""; for(i = 0; i < repeat; i++){str +=
tst.substring((i*wrap),((i+1)*wrap-1))+"\r\n";}if((tst.length()
% wrap) > 0){str +=
tst.substring((i*wrap-1),tst.length());}} label.getCaption().setValue(str);}</pre>
<p>Any ideas or same Problems?</p>
Find more posts tagged with
Comments
There are no comments yet