Instead of the hashtable approach described in the article, you should use
hard-coded color settings so that even if the sort order changes, a specific
series keeps its assigned color. The custom code would then need to look
similar to this:
Public Function GetColor(ByVal groupingValue As String) As String
If groupingValue = "Item A" Then
Return "Red"
Else if groupingValue = "Item B" Then
Return "Green"
Else if
...
End If
End Function
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
[quoted text, click to view] "Jordan" <jordanm@37.com> wrote in message
news:1129610815.374786.213900@g44g2000cwa.googlegroups.com...
> Hi,
>
> Thanks for your reply. My chart is set up differently from the
> conventional way. I have rearranged my dataset to produce the result
> required by the user. I managed to get it all working alright, in fact
> i am currently making use of the Custom Legend from the link given
> above to achieve the result.
>
> Now my users want to change the sequence of how the items are stacked.
> Instead of Item A at the bottom, they want to see Item Z on the bottom.
> So I went to the Properties of my Series Grouping and set the Sort
> order. However, doing this not only change the sequence but also the
> color representing the items.
>
> Is there a way to change the sequence of the stacked item without
> changing the color representation? Or maybe I am doing it the wrongly?
>
> Please help. Thanks.
>
> --- Jordan
>