[rt-users] How to change the color order of RT internal Reporting Functions

2010-05-06 Thread Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Hi,
i'm searching since some days for a way to change the RT Reports Colors for PIE 
Charts. 

RT uses the colors in order: red, green, yellow, blue etc but i don't like to 
start with red.

Where can i find some hints?!?

Looked already inside Search/Chart.html and Search/Chart also 
Search/Elements/Chart but there is nothing like this.

Thanks for any hint.

Torsten

Kuehne + Nagel (AG  Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), 
Dirk Blesius, Reiner Heiken, Bruno Mang, Alfred Manke, Christian Marnetté, Mark 
Reinhardt, Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, 
HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne  
Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: 
Klaus-Michael Kuehne




Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to change the color order of RT internal Reporting Functions

2010-05-06 Thread Emmanuel Lacour
On Thu, May 06, 2010 at 01:45:52PM +0200, Brumm, Torsten / Kuehne + Nagel / Ham 
MI-ID wrote:
 Hi,
 i'm searching since some days for a way to change the RT Reports Colors for 
 PIE Charts. 
 
 RT uses the colors in order: red, green, yellow, blue etc but i don't like to 
 start with red.
 
 Where can i find some hints?!?
 
 Looked already inside Search/Chart.html and Search/Chart also 
 Search/Elements/Chart but there is nothing like this.
 

look in RT 3.8.8 in rt/share/html/Search/Chart, colors where changed for
3.8.8:

# refine values' colors, with both Color::Scheme's help and my own tweak
$chart-{dclrs} = [
'66cc66', 'ff', 'ffcc66', '663399',
'cc',
'339933', '99', '996633', '663399',
'33cc33', 'cc', 'cc9933', '6633cc'
];

{
no warnings 'redefine';
*GD::Graph::pick_data_clr = sub {
my $self  = shift;
my $color_hex = $self-{dclrs}[ $_[0] % @{ $self-{dclrs} } - 1 ];
return map { hex } ( $color_hex =~ /(..)(..)(..)/ );
};
}


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to change the color order of RT internal Reporting Functions

2010-05-06 Thread Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Hi Emmanuel,
just in the moment i pressed Send i found this ($chart-set( dclrs = [ 
qw(green pink blue cyan) ] ); )also inside GD::Graph Module :-(

But thanks

Torsten 


Kuehne + Nagel (AG  Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), 
Dirk Blesius, Reiner Heiken, Bruno Mang, Alfred Manke, Christian Marnetté, Mark 
Reinhardt, Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, 
HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne  
Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: 
Klaus-Michael Kuehne



-Urspruengliche Nachricht-
Von: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von Emmanuel Lacour
Gesendet: Donnerstag, 6. Mai 2010 13:52
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] How to change the color order of RT internal Reporting 
Functions

On Thu, May 06, 2010 at 01:45:52PM +0200, Brumm, Torsten / Kuehne + Nagel / Ham 
MI-ID wrote:
 Hi,
 i'm searching since some days for a way to change the RT Reports Colors for 
 PIE Charts. 
 
 RT uses the colors in order: red, green, yellow, blue etc but i don't like to 
 start with red.
 
 Where can i find some hints?!?
 
 Looked already inside Search/Chart.html and Search/Chart also 
 Search/Elements/Chart but there is nothing like this.
 

look in RT 3.8.8 in rt/share/html/Search/Chart, colors where changed for
3.8.8:

# refine values' colors, with both Color::Scheme's help and my own tweak 
$chart-{dclrs} = [
'66cc66', 'ff', 'ffcc66', '663399',
'cc',
'339933', '99', '996633', '663399',
'33cc33', 'cc', 'cc9933', '6633cc'
];

{
no warnings 'redefine';
*GD::Graph::pick_data_clr = sub {
my $self  = shift;
my $color_hex = $self-{dclrs}[ $_[0] % @{ $self-{dclrs} } - 1 ];
return map { hex } ( $color_hex =~ /(..)(..)(..)/ );
};
}


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com