Reputation: 498
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.
Upvotes: 1
Views: 575
Reputation: 13
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>
Upvotes: 0
Reputation: 1430
((BarSeries)this.LikesChart.Series[0]).IndependentAxis = new LinearAxis() { Minimum = 0, Maximum = 5, Orientation = AxisOrientation.Y };
Upvotes: 0