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
[chart api] problems on sizing the legend
Migrateduser
i am producing charts (via the chart api) with sometimes very long legend texts (100 character per entry). so with the default (elipses at the end) the legend becomes unusable in many cases.<br />
<br />
So i tried it with<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>cwaBar.getLegend().setWidthHint(width);</pre>
<br />
the problem is, with this the legend becomes smaller in many cases (smaller than the given width and smaller than before) - so the problem persists.<br />
Now i added<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>cwaBar.getLegend().setEllipsis(0);
cwaBar.getLegend().setWidthHint(width);</pre>
<br />
but with this the legend disappears completely?! So how to get a legend that always wraps line or a legend with all test set is visible?<br />
<br />
thx in advance<br />
<br />
(I don't know what those methods really do (the javadoc is nonsense) but som forum post gave me a hints that "setWidthHint" is some kind of setting minimum width?!)<br />
<br />
<strong class='bbc'>Update</strong><br />
in meanwhile i tried <pre class='_prettyXprint _lang-auto _linenums:0'>cwaBar.getLegend().setMinSize(new SizeImpl(width, 0))</pre>
but this has no effect?! the only thing that changes the legend size is to make complete chart wider - but with this all bar become wider.<br />
And setElipses(int) seem to make the legend disappearing - with any number given?!
Find more posts tagged with
Comments
There are no comments yet