我在CRM 2011中有一个堆叠图表,按年份排序。为了检索最近3年的数据,年份存储在日期字段中。
但是,图表中的x轴标签显示为
除了年份,我真的想剥掉一切。有可能吗?
我试图改变标签格式而没有运气:
<AxisX><LabelStyle Format="yyyy" /></AxisX>
答案 0 :(得分:3)
虽然我从来没有找到搜索互联网的解决方案,但我突然发现了xml的fetch部分中的一个属性:
<fetchcollection>
<fetch mapping="logical" aggregate="true">
<entity name="ci_customersurveyanswer">
<attribute groupby="true" alias="_year" dategrouping="month" name="ci_year" />
</entity>
</fetch>
</fetchcollection>
dategrouping
是关键所在。将其更改为dategrouping="year"
就可以了。