我有一个包含多个类别组的条形图,我需要增加第一级类别组之间的间距,即蓝色箭头指向的位置。
我想改变这个:
进入这个:
提前致谢。
最佳答案
据我所知,没有办法调整自我强加的酒吧组之间的间距。但是,有一个技巧可以获得所需的效果。你所要做的就是欺骗SSRS。在您的查询中,您需要创建没有标签的空条。在不知道您的查询是如何构建的情况下,您可以这样做:
Select 'Group 1' as Group_Label --This would be equivalent to your Recursos or Credito Pessoal
, 'Bar 1' as Bar_Label --This would be like T-3
, 10 as Value_1 --This would be like the Red part of the bar
, 20 as Value_2
, '1' as Bar_Sort --This will come in handy later
Union All
Select 'Group 2' as Group_Label --This would be equivalent to your Recursos or Credito Pessoal
, 'Bar 1' as Bar_Label --This would be like T-3
, 15 as Value_1 --This would be like the Red part of the bar
, 30 as Value_2
, '2' as Bar_Sort --This will come in handy later
Union All
Select '' as Group_Label
, '' as Bar_Label
, 0 as Value_1
, 0 as Value_2
, 1.5 as Bar_Sort
Order by Bar_Sort
如果您进行设置,您将得到的是 Group 1 Bar 1 后跟一个空条(没有标签),然后是 Group 2 Bar 1。这将用户看到的内容作为条组之间的明确空间,但是你知道这真的只是一组空的值。我已经多次成功地将它用于条形图。
如果这对您没有意义,请创建一个 SQLfiddle示例,我可以帮助您调整代码以使其正常工作。
关于reporting-services - SSRS : Custom bar width between multi-level categories,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21833783/