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)
How to set x-axis major gridlines ticks visible through scripting?
BIRT User
<p>Hi,</p>
<p>I have a requirement in BIRT charts where i have to modify the x-axis major grid ticks visibility through scripting. I couldn't find any method from chart API to set the visibility of axis ticks.</p>
<p> </p>
<p>Is there any way i can set/hide the x-axis ticks through chart scripting?</p>
<p> </p>
<p>Any help on this would be much appreciated.</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Ragu</p>
Find more posts tagged with
Comments
Clement Wong
<p>This code will work for both OS and commercial BIRT.</p>
<pre class="_prettyXprint">
function beforeGeneration( chart, icsc )
{
var xAxis = chart.getAxes().get(0);
//
//xAxis.getMajorGrid().getTickAttributes().setVisible(false);
//
var theFlag = icsc.getExternalContext().getScriptable().getParameterValue("tickFlag").booleanValue();
xAxis.getMajorGrid().getTickAttributes().setVisible(theFlag);
}</pre>
<p>The attached sample was created in OS BIRT 4.4.2.</p>
<p>
</p>
<p> </p>
<p> </p>
BIRT User
<p>Thanks Wong!!<br>
With your help, now i can set/hide the x-axis ticks based on my requirement.</p>
<p>
Thanks,<br>
Ragu</p>
BIRT User
<p>Thanks Wong!!</p>
<p>With your help, now i can set/hide the x-axis ticks based on my requirement.</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Ragu</p>