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)
Position marker label to left of X-axis in bar chart
jlweb58
<p>I've scripted the addition of a calculated marker line in a bar chart based on the average values of a series. As the attached screenshot shows, the label placement leaves something to be desired. I'd like to place the marker label to the left of the X-axis so it's more visible. Is there any way of scripting this?</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>Simply set a negative left Inset value for the label. In the chart wizard UI, it is available in the Axis Markers dialog window (bottom right corner). In code, you use syntax like this:</p>
<p> </p>
<p><span style="font-family:'courier new', courier, monospace;">markerLine.getLabel().getInsets().setLeft(-20.0);</span></p>
<p> </p>
<p>where the value for setLeft is a negative Double.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
jlweb58
<p>Thanks pricher, that worked like a charm. For some reason I thought I couldn't use negative insets.</p>
<p> </p>
<p>J.</p>