Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » force not to show labels on every bar of chart
force not to show labels on every bar of chart [message #1067186] Sun, 07 July 2013 11:17 Go to next message
José Litux is currently offline José Litux
Messages: 52
Registered: March 2013
Member
Hi all

I've got a overcrowded bar chart and quantity labels ended one above other when the bars are together.

is there any way to force not to show labels for every bar?

thanks in advance
Re: force not to show labels on every bar of chart [message #1067484 is a reply to message #1067186] Tue, 09 July 2013 03:40 Go to previous messageGo to next message
Kristopher Clark is currently offline Kristopher Clark
Messages: 130
Registered: January 2013
Senior Member
If you wanted to show them for every other series you could do something like this

counter = 0;

function beforeDrawDataPointLabel( dph, label, icsc )
{
  if(counter == 0) {
    counter++;
    label.getCaption().setValue("")
  }else{
    counter = 0;
  }
}
Re: force not to show labels on every bar of chart [message #1067621 is a reply to message #1067484] Tue, 09 July 2013 15:39 Go to previous messageGo to next message
José Litux is currently offline José Litux
Messages: 52
Registered: March 2013
Member
I must put the code on the "on render" event, I guess ?

Anyway, maybe I've wrote it wrong. I mean, there is no more series. Just One, but so many bars that the numbers overlapped.
Re: force not to show labels on every bar of chart [message #1071312 is a reply to message #1067621] Fri, 19 July 2013 20:08 Go to previous messageGo to next message
Kristopher Clark is currently offline Kristopher Clark
Messages: 130
Registered: January 2013
Senior Member
Yeah, this code will go in the onRender() of the chart. Let me know if it works for you! Smile
Re: force not to show labels on every bar of chart [message #1071483 is a reply to message #1071312] Sat, 20 July 2013 08:04 Go to previous message
José Litux is currently offline José Litux
Messages: 52
Registered: March 2013
Member
awesome!
worked like a charm!

Thanks a lot
Previous Topic:Problem creating parameter marker
Next Topic:Using Birt as a template for a consultant report
Goto Forum:
  


Current Time: Sun Oct 26 05:58:04 GMT 2014

Powered by FUDForum. Page generated in 0.04022 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software