我想在WinRTXamltoolkit的Area Chart的轴上设置间隔。类似的间隔可能是Days,Month,years等。那么如何在Chart的轴上设置所需的间隔,可能是其他属性可以在WinrtXamltoolkit&中设置的轴如果在Windows 8应用程序中有任何其他免费的图表工具包,那么请帮助
提前致谢
Jivraj Upadhyay
Xaml Code
<Charting:Chart x:Name="AreaChart" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="47,47,0,0" Width="1300" Height="700" >
<Charting:AreaSeries Title="Monthly Records" Margin="0" IndependentValuePath="Name" DependentValuePath="Amount" IsSelectionEnabled="True" >
</Charting:AreaSeries>
Xaml.cs代码 命名空间Windows_Chart { 公共类FinancialStuff { public string Name {get;组; } public int Amount {get;组; } } 公共密封的部分类WinRTChart:Page { public WinRTChart() { this.InitializeComponent(); this.Loaded + = WinRTChart_Loaded; } void WinRTChart_Loaded(object sender,RoutedEventArgs e) { LoadChartContents(); } private void LoadChartContents() {
List<FinancialStuff> financialStuffList = new List<FinancialStuff>();
financialStuffList.Add(new FinancialStuff(){ Name = "Jan 1", Amount = 450 });
financialStuffList.Add(new FinancialStuff() { Name = "2 ", Amount = 300 });
financialStuffList.Add(new FinancialStuff() { Name = "3 ", Amount = 400 });
financialStuffList.Add(new FinancialStuff() { Name = "4 ", Amount = 450 });
financialStuffList.Add(new FinancialStuff() { Name = "5 ", Amount = 352 });
financialStuffList.Add(new FinancialStuff() { Name = "6 ", Amount = 788 });
financialStuffList.Add(new FinancialStuff() { Name = "7 ", Amount = 123 });
financialStuffList.Add(new FinancialStuff() { Name = "8 ", Amount = 325 });
financialStuffList.Add(new FinancialStuff() { Name = "9 ", Amount = 785 });
financialStuffList.Add(new FinancialStuff() { Name = "10 ", Amount = 1025 });
financialStuffList.Add(new FinancialStuff() { Name = "11", Amount = 458 });
financialStuffList.Add(new FinancialStuff() { Name = "12", Amount = 123 });
financialStuffList.Add(new FinancialStuff() { Name = "13", Amount = 300 });
financialStuffList.Add(new FinancialStuff() { Name = "14", Amount = 400 });
financialStuffList.Add(new FinancialStuff() { Name = "15", Amount = 789 });
financialStuffList.Add(new FinancialStuff() { Name = "16", Amount = 100 });
financialStuffList.Add(new FinancialStuff() { Name = "17", Amount = 232 });
financialStuffList.Add(new FinancialStuff() { Name = "18", Amount = 500 });
financialStuffList.Add(new FinancialStuff() { Name = "19", Amount = 400 });
financialStuffList.Add(new FinancialStuff() { Name = "20", Amount = 124 });
financialStuffList.Add(new FinancialStuff() { Name = "21", Amount = 50 });
financialStuffList.Add(new FinancialStuff() { Name = "22", Amount = 78 });
financialStuffList.Add(new FinancialStuff() { Name = "23", Amount = 315 });
financialStuffList.Add(new FinancialStuff() { Name = "24", Amount = 400 });
financialStuffList.Add(new FinancialStuff() { Name = "25", Amount = 405 });
financialStuffList.Add(new FinancialStuff() { Name = "26", Amount = 600 });
financialStuffList.Add(new FinancialStuff() { Name = "27", Amount = 789 });
financialStuffList.Add(new FinancialStuff() { Name = "28", Amount = 100 });
financialStuffList.Add(new FinancialStuff() { Name = "29", Amount = 400 });
financialStuffList.Add(new FinancialStuff() { Name = "Feb", Amount = 232 });
(AreaChart.Series[0] as AreaSeries).ItemsSource = financialStuffList;
}
}
}