更改SSRS散点图中水平轴的顺序?
Change order of horizontal axis in SSRS scatter chart?
我的 SSRS
散点图如下所示。水平轴显示小时数,在本例中为 Hr 0-14。
所以我正在尝试更改横轴的顺序,使其从最近到较旧(即 14-0)。
我去了 Category Groups
,然后去了 Sorting
,并将 dimhour
的顺序从 A to Z
更改为 Z to A
。没有任何变化。
tsql
脚本还 returns DimHour Desc 排序的数据。也没有任何改变。
我还能做什么?这是用于散点图的测试查询:
select 1 as 'dimhour', 9 as 'dept', 99.567 as 'Percent'
union
select 4 as 'dimhour', 13 as 'dept', 99.741 as 'Percent'
union
select 11 as 'dimhour', 16 as 'dept', 99.374 as 'Percent'
union
select 11 as 'dimhour', 7 as 'dept', 99.706 as 'Percent'
union
select 11 as 'dimhour', 4 as 'dept', 99.575 as 'Percent'
union
select 14 as 'dimhour', 1 as 'dept', 99.741 as 'Percent'
order by dimhour desc
这是它的样子:
编辑:
我尝试了 Hannover Fist 建议的解决方案(将 Horizontal Axis 设置为 Scalar),它有点管用,但它不起作用' 以时间间隔显示小时数。如您所见,它不会以 1 个单位的间隔显示,即使它在 水平轴 属性 (Interval = 1
).
中是这样设置的
谢谢。
当我创建一个新的 table 时它对我有用。
我的猜测是您将 水平轴 设置为 标量 。这似乎是根据值对它进行排序,而不考虑类别上的排序。
将轴类型更改为类别应该可以使其正常工作。
在“比例”选项下,您可以单击“反向”选项:
Reverse direction Select this option to reverse the direction of the
chart. For example, by default, a column chart displays the y-axis on
the left side of the chart and categories from left to right. When
this option is selected, the chart displays the y-axis on the right
side of the chart and categories from right to left.
https://msdn.microsoft.com/en-us/library/bb934393(v=sql.105).aspx
我的 SSRS
散点图如下所示。水平轴显示小时数,在本例中为 Hr 0-14。
所以我正在尝试更改横轴的顺序,使其从最近到较旧(即 14-0)。
我去了 Category Groups
,然后去了 Sorting
,并将 dimhour
的顺序从 A to Z
更改为 Z to A
。没有任何变化。
tsql
脚本还 returns DimHour Desc 排序的数据。也没有任何改变。
我还能做什么?这是用于散点图的测试查询:
select 1 as 'dimhour', 9 as 'dept', 99.567 as 'Percent'
union
select 4 as 'dimhour', 13 as 'dept', 99.741 as 'Percent'
union
select 11 as 'dimhour', 16 as 'dept', 99.374 as 'Percent'
union
select 11 as 'dimhour', 7 as 'dept', 99.706 as 'Percent'
union
select 11 as 'dimhour', 4 as 'dept', 99.575 as 'Percent'
union
select 14 as 'dimhour', 1 as 'dept', 99.741 as 'Percent'
order by dimhour desc
这是它的样子:
编辑:
我尝试了 Hannover Fist 建议的解决方案(将 Horizontal Axis 设置为 Scalar),它有点管用,但它不起作用' 以时间间隔显示小时数。如您所见,它不会以 1 个单位的间隔显示,即使它在 水平轴 属性 (Interval = 1
).
谢谢。
当我创建一个新的 table 时它对我有用。
我的猜测是您将 水平轴 设置为 标量 。这似乎是根据值对它进行排序,而不考虑类别上的排序。
将轴类型更改为类别应该可以使其正常工作。
在“比例”选项下,您可以单击“反向”选项:
Reverse direction Select this option to reverse the direction of the chart. For example, by default, a column chart displays the y-axis on the left side of the chart and categories from left to right. When this option is selected, the chart displays the y-axis on the right side of the chart and categories from right to left.
https://msdn.microsoft.com/en-us/library/bb934393(v=sql.105).aspx