SSRS 2008 Chart legend colours not matching series colour.
Hi, I believe this issue has been raised before. In SSRS 2005 & 2008 R2 though I am yet to find a solution other than a lengthy (messy) workaround. I have a chart based on the following data: Data field - Count(ChangeID) Category - Change_Categorisation (ie. Maintenance, new hardware etc) Series - Change_Timing (Emergency, expedited, normal etc) So i am using a stacked column chart to show the category along the X axis and stack the number of changes by their timing. In the Series colour setting i am using the expression: =iif(Fields!Change_Timing.Value="Emergency","Red",iif(Fields!Change_Timing.Value="Expedited","Orange","SteelBlue")) I have also tried =Switch(Fields!Change_Timing.Value="Emergency","Red",Fields!Change_Timing.Value="Expedited","Orange",Fields!Change_Timing.Value="Normal","SteelBlue") In all cases the legend only seems to refer to the first column in the chart to pick up colours. For example. The first column for December is Maintenance changes. There are 2 emergency & 1 normal. the only expedited change is in another column (new hardware). So the legend shows Emergency as RED, Normal as SteelBlue and Expedited as Steelblue. no matter what I do the legend only picks up the colours from the first category. so if the fist category only has 1 timing (eg- Normal). Every item in the legend has the Normal colour (Steelblue) Surely there is a fix for this that doesnt involve creating a table to the side of the graph which seems like a really basic way to deal with this issue. I may as well go back to the dark ages and use Excel for my reports or bloody draw them on paper. :) calming down now. Thanks for any input on this.
January 17th, 2011 6:00am

I need to see a visual of what the issue is. In top part of the description you don't mention "Month" in the Grouping structure on categories or series, but you are referring to December as the first column. So, I'm not sure I understand exactly what you have on series, categories, and values for the chart. Colors in the chart are driven by the series groups. -SeanProgram Manager, SQL Server Reporting Services This posting is provided "AS IS" with no warranties, and confers no rights. http://blogs.msdn.com/seanboon http://www.twitter.com/ssrs
Free Windows Admin Tool Kit Click here and download it now
January 17th, 2011 2:18pm

Hi, I will try uploading an image of the issue. There are no month's along wither axis. I was simply referring to the data being from december. A moot point i suppose. The category & series are as above. Its a stacked column with a count along the Y axis and the different categorisations are along the X axis. I am beginning to think, if the chart is pulling the legend colours from the first column (or first records in the dataset, a placeholder record for each type might work with zero values. its messy but a lot more contained than using a table as a make-shift legend. I'll see about the picture & try this today.
January 18th, 2011 4:01am

Hi, I have reproduced the issue you posted as the following picture shows. The color of series group “AAA” in the legend is not as the same as the color as the third column. Based on my testing, it occurs when the chart meets the following conditions: 1. Use decision function to specify the Series colors. 2. The data value of the chart using the aggregate Count. 3. One series group is not contained in the first category column. It is my pleasure to help you reflect the issue to the proper department, and you can also submit it at https://connect.microsoft.com/SQLServer/ to get an official confirmation. If the issue is urgent to your business, it is recommended that you contact Microsoft Customer Support Services (CSS) via telephone so that a dedicated Support Professional can assist you in a more efficient manner. Please be advised that contacting phone support will be a charged call. However, it will be free if this is a product issue. To obtain the phone numbers for specific technology request please take a look at the web site listed below. http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS If you are outside the US please see http://support.microsoft.com for regional support phone numbers. Regards, Tony Chain Tony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2011 4:33am

Hi, I have reproduced the issue you posted as the following picture shows. The color of series group “AAA” in the legend is not as the same as the color as the third column. Based on my testing, it occurs when the chart meets the following conditions: 1. Use decision function to specify the Series colors. 2. The data value of the chart using the aggregate Count. 3. One series group is not contained in the first category column. It is my pleasure to help you reflect the issue to the proper department, and you can also submit it at https://connect.microsoft.com/SQLServer/ to get an official confirmation. If the issue is urgent to your business, it is recommended that you contact Microsoft Customer Support Services (CSS) via telephone so that a dedicated Support Professional can assist you in a more efficient manner. Please be advised that contacting phone support will be a charged call. However, it will be free if this is a product issue. To obtain the phone numbers for specific technology request please take a look at the web site listed below. http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS If you are outside the US please see http://support.microsoft.com for regional support phone numbers. Regards, Tony Chain Tony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
January 20th, 2011 4:33am

Perhaps rather obvious but, as a workaround, instead of using the dynamic legend, I created a legend manually with the appropriately colored boxes/labels.
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 7:07am

Is there an official solution for this yet? It would be nice to have, but until then I'll let the chart set the colours.If this post, or another, answers your question, please click the 'Mark as answer' button so others with the same problem can find a solution more easily.
July 6th, 2011 9:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics