Report Builder 2.0 中的图表未在 x 轴上显示所有类别字段
我在 Report Builder 2.0 中有一个图表,其中包含多个系列值(添加到图表顶部框中的字段),但没有系列字段(图表右侧的框)或类别字段(图表底部的框) 。不同的值属于不同的类别,但没有一个字段可以在类别之间分割这些值,因此我无法将特定字段放入图表的类别字段部分中。但是,在图表的“系列属性”窗口中,我可以将“类别字段”属性设置为某个任意字符串。我试图在不同的系列中以不同的方式设置此类别字段属性,但只有第一个类别字段值沿图表中的 x 轴显示。我已将轴属性编辑为间隔为 1,但我仍然只看到第一个类别字段。除此之外,所有不同的值都在 x 轴上聚集在一起,它们之间没有空格,并且第一个类别字段值位于所有条形下方的中心,使得它们看起来好像都具有相同的类别字段。我怎样才能改变这个?请参阅下面的屏幕截图。
红色圆圈系列值的类别字段都设置了相同的值,而其他系列值则具有相同的值为类别字段设置不同的值。尽管虚拟图表显示单独的类别 A、B、C 等,但渲染报表时的实际图表显示单个类别:第一个系列值的类别字段的值
I have a chart in Report Builder 2.0 with multiple series values (the fields added to the box along the top side of the chart) and no series fields (box on right side of chart) or category fields (box along bottom side of chart). The different values belong to different categories but there is no one field that splits these values between categories, so I cannot put a particular field in the category fields segment of the chart. However, in the Series Properties window for my chart, I can set the Category Field property to some arbitrary string. I was trying to set this Category Field property differently in my different series, but only the first Category Field value shows up along the x-axis in my chart. I have edited the Axis Properties to have an interval of 1, but I still only see the first Category Field. Beyond that, all my different values get clumped together on the x-axis with no space between them, and the first Category Field value is centered under all the bars, making it look as if they all have the same Category Field. How can I change this? See the screenshot below.
The red circled series values all have the same value set for their Category Field, while the other series values have different values set for Category Field. Despite the dummy chart showing separate categories A, B, C, etc., my actual chart when I render the report shows a single category: the value for the first series value's Category Field
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,看起来类别字段除了整数和日期之外什么都不理解。我没有使用字符串类别名称,而是改用
=0
、=1
等来表示不同的类别字段表达式。在每个值系列的“属性”中,我将“数据”设置为“数据点> AxisLabel 为字符串类别名称。然后我的值根据类别字段进行分组,所有类别都显示在 x 轴上。当缺少值时,它甚至遵循类别字段排序:我有一个值属于类别字段 0,另一个值属于类别字段 3,并且它在字段 1 和 2 的 x 轴上显示了两个空刻度线。还显示了类别按照类别字段的顺序,无论值系列在图表上的“将数据字段拖放到此处”托盘中的排列顺序如何。我注意到的一个问题是图表对条形进行了间隔/调整大小,就好像每个值系列都显示在每个类别中一样。我的图表是这样的,每个类别最多显示 4 个条形图,并且我有很多类别,因此它的作用就好像每个类别中都会卡住 4 *(# 个类别)条形图。这使得我的条形非常狭窄,并且也导致它们的间隔很奇怪。
Okay, it seems like Category Field doesn't understand anything but integers and dates. Instead of using string category names, I switched to using
=0
,=1
, and so on for my different Category Field expressions. In the Properties for each value series, I set Data > DataPoint > AxisLabel to the string category name. Then my values are grouped according to their Category Field, and all the categories show up on the x-axis. It even obeys Category Field ordering when there are missing values: I had one value with Category Field 0 and another with Category Field 3, and it showed two empty tick marks on the x-axis for fields 1 and 2. The categories are also shown in order of Category Field, regardless it seems of the order the value series are arranged in the "Drop data fields here" tray on the chart.One problem I noticed is that the chart spaces/sizes the bars as if every value series was showing up in every category. My chart is such that at most 4 bars show up per category, and I have a lot of categories, so it acts as if 4 * (# categories) bars are going to be stuck in each category. This makes my bars very narrow, and also causes them to space strangely.