1

我正在使用 WinRT-toolkit AreaChart,我需要直接在 XAML 代码中更改 DependentRangeAxis,我想设置一个从 1 到 5 的固定范围。

<Series:Chart
            x:Name="QuestionHistory"
            Title="Area Chart">
        <Series:AreaSeries 
            Title="MediaRisposte"
            AnimationSequence="LastToFirst"
            IndependentValueBinding="{Binding Name}"
            DependentValueBinding="{Binding Value}"
            DependentRangeAxis="???"
            IsSelectionEnabled="True" />
    </Series:Chart>

先感谢您。

4

2 回答 2

0
 ((BarSeries)this.LikesChart.Series[0]).IndependentAxis = new LinearAxis() { Minimum = 0, Maximum = 5, Orientation = AxisOrientation.Y };
于 2013-12-28T08:59:44.900 回答
0

我知道这已经晚了将近 9 年,但我必须将那个 WinRT 图表用于一个项目,所以我想我会回答它,希望它对某人有价值。您可以选择的唯一选项是DateTimeAxisLinearAxis。这是在 XAML 中更改它的方法...

<Series:Chart
  x:Name="QuestionHistory"
  Title="Area Chart">
  <Series:AreaSeries
    Title="MediaRisposte"
    AnimationSequence="LastToFirst"
    IndependentValueBinding="{Bindng Name}"
    DependentValueBinding="{Binding Value}"
    IsSelectionEnabled="True">
    <Series:AreaSeries.DependentRangeAxis>
      <Series:LinearAxis/>
    </Series:AreaSeries.DependentRangeAxis>
  </Series:AreaSeries>
</Series:Chart>

于 2022-02-01T22:46:57.360 回答