Tuesday, March 20, 2012

BAR Chart Customization

I have a requirement in bar charts using SSRS to show an additional image along with the Data label.

Assuming A, B, C are the products getting displayed and its performance rating is 25, 35, 30 respectively. I should get the Product Related Image next to the datalabel. Please let me know if there are any possibilities available to generate such report using SSRS...Thanks

HI,Coras

Here's a neat trick a co-worker and I have found for creating aninline bar chart(an inline data visualization in a table or other data region).

1. Add an embedded image to your report that will serve as the "bar" (a simple horizontal gradient usually looks nice)

2. Add a column to your table, and place an Image report item in the detail row cell.

3. Select the embedded image from step 1 as the source for the Image report item.

4. Set the padding on the Image report item to adjust the size and position of the bar within the cell

5.[Here's the kicker] Create an expression for the right (or left) padding that divides a field value by some maximum value, clamps it to a given range if necessary using Math.Min/Max, and then multiplies by the total size of the bar.

Example:image1.Padding.Right=((1.0-(Math.Min(Math.Max(Fields!TotalSales.Value,0),100000)/100000))*72) & "pt"

If i misunderstand you about your question, please feel free to correct me and i will try to help you with more information.

I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

|||


Hi Rex,

Thanks a lot for your reply...Just for us to synchronize our thought, I am adding few more points here

Since I am not able to add my Excel image in the forums as it throws error, I am trying to show you the graphical representation of the image as below

|__________________
|__________________|Smile
|
|_______________
|_______________|Smile
|
|
|
|__________________
|__________________|Smile
|
|_______________
|_______________|Smile
|
|_____________________


If you see above in the chart, the smileys occupy at different places based on the value of the bar. This is the way I would like to have my chart...Please let me know if you need any further information for developing such reports..Your advice is much appreciated. Thanks

Regards,
Coras

P.S: Request you to arrange the chart available as lines, if this gets scattered after the post..

No comments:

Post a Comment