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)
Scripted Marker Line - How to set Font Size for Caption
josephnina
Hi all,
I have a scripted marker line in one of my charts, which is dynamically set at run time.
The marker also has a caption that needs to be set. I am able to setup the caption using getLabel().getCaption.setValue() but unable to control its font. Any suggestions!!
inside beforeGeneration function.....
center_ml = MarkerLineImpl.create(yAxis, NumberDataElementImpl.create(targetCenter));
center_ml.getLabel().getCaption().setValue("Target Center at " + targetCenter);
center_ml.getLineAttributes().getColor().set(76,107,16);
center_ml.getLineAttributes().setStyle(LineStyle.SOLID_LITERAL);
center_ml.getLineAttributes().setThickness(2);
Thanks and Regards
Joseph
Find more posts tagged with
Comments
kclark
You should be able to set the marker label fond with something like this<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>function beforeDrawMarkerLine( axis, markerLine, icsc )
{
markerLine.getLabel().getCaption().getFont().setName("Arial");
}</pre>
josephnina
Thanks
That works.....
function beforeDrawMarkerLine( axis, markerLine, icsc )
{
markerLine.getLabel().getCaption().getFont().setSize(8);
}