Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Colors repeat themselves

Author  Topic 

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2009-03-16 : 11:36:58
Hi,

I added a custom colour code taken from Microsoft however the colours seem to sometimes repeat themselves so you can't know if the colour is for issue x or issue y etc.
What can be done to fix this?

Thanks


Private colorPalette As String() = {"Green", "Blue", "Red", "Orange",
"Aqua", "Teal", "Gold", "RoyalBlue", "MistyRose", "LightGreen",
"LemonChiffon", "LightSteelBlue", "#F1E7D6", "#E16C56", "#CFBA9B"}
Private count As Integer = 0
Private mapping As New System.Collections.Hashtable()
Public Function GetColor(ByVal groupingValue As String) As String
If mapping.ContainsKey(groupingValue) Then
Return mapping(groupingValue)
End If
Dim c As String = colorPalette(count Mod colorPalette.Length)
count = count + 1
mapping.Add(groupingValue, c)
Return c
End Function


Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-16 : 13:01:41
http://msdn.microsoft.com/en-us/library/aa964128.aspx
Go to Top of Page

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2009-03-19 : 07:52:47
Thanks.

Seems to be working fine now.

Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-19 : 13:46:21
welcome
Go to Top of Page
   

- Advertisement -