我有一个LineSeries和一个BarSeries,并且我需要两个使用两个Y轴。如何在Nativescript angular中实现这一目标?
答案 0 :(得分:0)
您可以通过HTML设置多个轴,如下所示:
<RadCartesianChart tkExampleTitle tkToggleNavButton>
<LinearAxis tkCartesianVerticalAxis horizontalLocation="Left"></LinearAxis>
<CategoricalAxis tkCartesianHorizontalAxis verticalLocation="Down"></CategoricalAxis>
<LineSeries tkCartesianSeries seriesName="RateA" [items]="rateA" stackMode="Stack" categoryProperty="Country" valueProperty="Amount"></LineSeries>
<LineSeries tkCartesianSeries seriesName="RateB" [items]="rateB" stackMode="Stack" categoryProperty="Country" valueProperty="Amount"></LineSeries>
<LineSeries tkCartesianSeries seriesName="RateC" [items]="rateC" stackMode="Stack" categoryProperty="Country" valueProperty="Amount"></LineSeries>
<BarSeries tkCartesianSeries seriesName="Total" [items]="total" stackMode="Stack" categoryProperty="Country" valueProperty="Amount">
<LinearAxis tkBarVerticalAxis horizontalLocation="Right"></LinearAxis>
</BarSeries>
</RadCartesianChart>
完整示例可见here