如何在参数轴内汇总日期?

时间:2019-04-11 06:43:53

标签: devextreme-angular

我正在汇总条形图中的数据。工作正常。我要参加很多约会,并每隔几个月显示一次。但是,我也想这样做,以使参数轴也可以聚合。可以说我有12个日期,我想每隔4个月显示3条。我也希望参数轴中也只会出现3个日期。这是我的html:

<dx-chart id="chart" [dataSource]="scopeImplementation">
<dxo-common-series-settings argumentField="Date">
<dxo-aggregation [enabled]="true"> </dxo-aggregation>
</dxo-common-series-settings>
<dxi-series
axis="oranges"
valueField="Fact"
name="My oranges"
type="bar"
color="#ffaa66"
>
</dxi-series>
<dxi-series
axis="percent"
valueField="Fact"
name="some oranges"
type="line"
color="red"
ignoreEmptyPoints="true"
dashStyle="dash"
>
<dxo-point [visible]="false"></dxo-point>
</dxi-series>
<dxo-argument-axis>
<dxo-label displayMode="rotate" rotationAngle="270" format="MM-dd">
</dxo-label>
<dxo-aggregation-interval [months]="4"> </dxo-aggregation-interval>
</dxo-argument-axis>

<dxi-value-axis name="oranges" position="left"></dxi-value-axis>
<dxi-value-axis name="percent" position="right"></dxi-value-axis>
</dx-chart>

对我来说,发生的事情是日期不会汇总,因此,如果图表两边有空格,我会得到12个自变量轴值,但只有3条。如果图表的两边没有足够的空间用于参数轴,则会显示一些参数轴值,而有些则不会。

0 个答案:

没有答案