Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to Colour in Weekends on BIRT Gantt Chart?
How to Colour in Weekends on BIRT Gantt Chart? [message #1638826] Fri, 27 February 2015 10:08 Go to next message
Julia Richards is currently offline Julia RichardsFriend
Messages: 3
Registered: February 2015
Junior Member
I have a BIRT Gantt chart.
It shows 16 weeks of data. Weeks are delimited by bold vertical lines, days by grey gridlines. I need to colour the background of the weekend cells to make it easier for a user to see if an event crosses a weekend.
Re: How to Colour in Weekends on BIRT Gantt Chart? [message #1639157 is a reply to message #1638826] Fri, 27 February 2015 13:40 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
There is a forum dedicated to BIRT. I'll move this topic there but in the future you should ask directly on that forum.
Re: How to Colour in Weekends on BIRT Gantt Chart? [message #1652491 is a reply to message #1639157] Thu, 05 March 2015 22:31 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Sorry for the delay. Posts with a response sometimes get skipped over, so when Eric moves one and comments in it, it might look like someone responded. What is your BIRT version? I'll try to get an example set up for you.

Michael

Developer Evangelist, Silanis
Re: How to Colour in Weekends on BIRT Gantt Chart? [message #1661362 is a reply to message #1652491] Mon, 09 March 2015 15:47 Go to previous messageGo to next message
Julia Richards is currently offline Julia RichardsFriend
Messages: 3
Registered: February 2015
Junior Member
Thanks, it's version 2.5.2 v20100209
Re: How to Colour in Weekends on BIRT Gantt Chart? [message #1663955 is a reply to message #1652491] Tue, 10 March 2015 17:21 Go to previous messageGo to next message
Julia Richards is currently offline Julia RichardsFriend
Messages: 3
Registered: February 2015
Junior Member
Thanks, it's version 2.5.2 v20100209
Re: How to Colour in Weekends on BIRT Gantt Chart? [message #1682224 is a reply to message #1638826] Tue, 17 March 2015 16:51 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Attached is a sample that will show one way of doing it in script. The script can probably be cleaned up some. You also might consider setting the scale min and max based on your dataSet values vs just assuming as I did (I noted this in the code comments).

What I did was use afterDataSetFilled to find the min and max of the date series. From there, I extended the range on each side to account for BIRT padding the chart scale by a day on each side. I added a dummy marker range to my chart that I could copy and change the date values of to add to the chart. Finally, I loop through the dates represented in the chart and add a marker range for each weekend using the cloned dummy range. The dummy range is dropped from the chart.

Hope this helps.


Michael

Developer Evangelist, Silanis
Previous Topic:Report Birt Viewer 4.4.1 - WebLogic 10.3.6
Next Topic:Style - background image
Goto Forum:
  


Current Time: Tue Jul 23 16:01:45 GMT 2024

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

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

Back to the top