1

I'm using WinRT-toolkit AreaChart, I need to change DependentRangeAxis directly in XAML code, I want to set a fixed range from 1 to 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>

Thank you in advance.

Filip Skakun
  • 31,624
  • 6
  • 74
  • 100
Lelezeus
  • 498
  • 3
  • 17

2 Answers2

0
 ((BarSeries)this.LikesChart.Series[0]).IndependentAxis = new LinearAxis() { Minimum = 0, Maximum = 5, Orientation = AxisOrientation.Y };
Saad Anees
  • 1,255
  • 1
  • 15
  • 32
0

I know it's nearly 9 years late but I have to use that WinRT chart for a project so I figured I'd answer it in hopes that it has value to someone. The only options you'll be able to choose are DateTimeAxis and LinearAxis. Here's how you change it in 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>
BradB
  • 13
  • 4