BIRT Exchange Forum: gant chart modifying color in groups - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

gant chart modifying color in groups Rate Topic: -----

#1 User is offline   vkober Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 20-January 11


Posted 24 April 2012 - 08:23 AM

Hi,

In the attached exemple, I would like to put a different color on the two grouping element of my chart describe in "status2" computed column :
red for "decline"
green for "Shipped"

I try by scripting (because I want to force the color for these values) but I cant find the way to get the value of status2 column.

Any idea ?

thanks in advance

Vincent

Attached File(s)


---
Vincent
In charge of Business Intelligence System
Grenoble Alpes Métropole
France
0

#2 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 12969
  • Joined: 16-May 08


Posted 24 April 2012 - 01:10 PM

Try this script, instead:

function beforeDrawDataPoint( dph, fill, icsc )
{
if (dph.getSeriesDisplayValue() == "Shipped"){
	fill.set(0,192,0);
}
else{
	fill.set(255,0,0);
}
}

function beforeDrawLegendItem( lerh, bounds, icsc )
{
if (lerh.getLabel().getCaption().getValue() == "Shipped"){
	lerh.getFill().set(0,192,0);
}
else{
	lerh.getFill().set(255,0,0);
}
}


Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#3 User is offline   vkober Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 20-January 11


Posted 24 April 2012 - 11:10 PM

nickel !
Absolutely perfect, thanks a lot Michael !

Regards
---
Vincent
In charge of Business Intelligence System
Grenoble Alpes Métropole
France
0

#4 User is offline   vkober Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 20-January 11


Posted 25 April 2012 - 01:54 AM

Hi

For the same example, is it possible to define a different start marker for each value in the series like :
if getValue() is "shipped" : start marker is triangle
else : start marker is square

I have another question :
if I define a marker range :
function beforeDrawMarkerRange(axis, markerRange, icsc)
{
	importPackage( Packages.org.eclipse.birt.chart.model.data.impl );
	markerRange.setEndValue(DateTimeDataElementImpl.create(new java.lang.Long(BirtDateTime.addDay(BirtDateTime.today(),5).getTime())))
	markerRange.setStartValue(DateTimeDataElementImpl.create(new java.lang.Long(BirtDateTime.today().getTime())))
	markerRange.getFill().set(0,0,0);
	}


with markerRange.getFill().set(0,0,0), i will change the color but I don't find how to change the color of the marker border end eventually the border width end type (if possible....)

most largelly, for a scipt newbie like me... where can I find all the functions and possibility for each part like : markerRange, legend...

Best regards
---
Vincent
In charge of Business Intelligence System
Grenoble Alpes Métropole
France
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users