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)
Setting a Chart Legend Size
atrionfi
<p>I am attempting to size the legend for a scatter plot. It is within the chart area pinned to the upper right corner. My axes are running through the middle of the scatter plot and regardless if I set the legend to run horizontally or vertically, it crossed an axis. I tried using the script below to size the legend, but while the legend size changes, the legend elements just run outside the legend (I turned on the legend outline which is how I know the size is changing).</p>
<p> </p>
<div>function beforeComputations( chart, plotComputation )</div>
<div>{ plotComputation.getRunTimeContext().getLegendLayoutHints().getLegendSize().setHeight(200)</div>
<div> plotComputation.getRunTimeContext().getLegendLayoutHints().getLegendSize().setWidth(200)</div>
<div>}</div>
<div> </div>
<div>Does anyone have any suggestions as to how I can change the size of a chart legend such that the legend elements form nice columns and stay within the legend boundaries?</div>
Find more posts tagged with
Comments
atrionfi
<p>Here are two pictures, without the script and without the script, that visualize the problem I am having.</p>