SSRS stacked bar chart label position

2019-07-06 21:02发布

I am using SQL Server 2012. SSRS

I have a stacked bar charts that includes interest and dividends. I would like to add the sum of these values to the area just above the stacked bar chart. I have tried adjusting various properties for the labels but I can't get the label position to be anywhere but the middle of the stacked bar chart. Any ideas how to get these labels to be just above the stacked bar charts?

stacked stacked

2条回答
叛逆
2楼-- · 2019-07-06 21:20

There is not a way to do this with settings.

Here are a couple of links that give you step by step instructions:

Basically, the workaround is to create another series or category in your chart that is the totals (which requires updating your dataset to include the totals), make it transparent, and turn data labels on. The MSDN answer says to make it a line chart while the Beyond Relational article leaves it as part of the stacked bar. Either way will work.

查看更多
我命由我不由天
3楼-- · 2019-07-06 21:38

I tried the solutions mentioned here and found them cumbersome compared to this gem: http://peltiertech.com/label-totals-on-stacked-charts/

  1. Add a "total" to your dataset (in my case, a percentage)
  2. Add the total series to your stacked bar chart
  3. Change the total series chart type to a line
  4. Hide the line and line markers by setting their fill color to none
  5. Set the Total series to not show in the legend
  6. Set the data point position for your total series to "Top"

Here is my result: enter image description here

查看更多
登录 后发表回答