【注1】WinRTXamlToolkit是免费控件,不过很久不更新了,而且网上的资源很少。后来我发现syncfusion控件有免费的community版本,并且有详细文档,所以就转过去使用syncfusion了。继续在WinRT/UWP奋战的亲们可以去围观一下:https://www.syncfusion.com/products/communitylicense

【注2】.Net平台各种免费和收费的包含Chart的控件:WinRTXamlToolkit/ModernUI/Visifire/Telerik/Syncfusion

【注3】WinRTXamlToolkit示例:http://eren.ws/2013/10/15/using-graphs-and-charts-in-windows-store-apps-boredom-challenge-day-11/

xmlns:Charting="using:WinRTXamlToolkit.Controls.DataVisualization.Charting" 
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Charting:Chart x:Name="PieChart" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100,100,0,0" Width="400" Height="400">
<Charting:PieSeries Margin="0" IndependentValuePath="Name" DependentValuePath="Amount" IsSelectionEnabled="True"/>
</Charting:Chart>
<Button x:Name="ButtonRefresh" Content="Refresh" HorizontalAlignment="Left" Margin="100,57,0,0" VerticalAlignment="Top" Click="ButtonRefresh_Click"/>
<Charting:Chart x:Name="ColumnChart" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="505,100,0,0" Width="399" Height="400">
<Charting:ColumnSeries Title="Smartphone Companies" Margin="0" IndependentValuePath="Name" DependentValuePath="Amount" IsSelectionEnabled="True"/>
</Charting:Chart>
<Charting:Chart x:Name="LineChart" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="909,100,-143,0" Width="600" Height="400">
<Charting:LineSeries Title="Smartphone Companies" Margin="0" IndependentValuePath="Name" DependentValuePath="Amount" IsSelectionEnabled="True"/>
</Charting:Chart>
<Charting:Chart x:Name="BarChart" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100,505,0,-137" Width="600" Height="400">
<Charting:BarSeries Title="Smartphone Companies" Margin="0" IndependentValuePath="Name" DependentValuePath="Amount" IsSelectionEnabled="True"/>
</Charting:Chart>
<Charting:Chart x:Name="BubbleChart" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="705,505,0,-137" Width="600" Height="400">
<Charting:BubbleSeries Title="Smartphone Companies" Margin="0" IndependentValuePath="Name" DependentValuePath="Amount" IsSelectionEnabled="True"/>
</Charting:Chart>
</Grid>
        public class FinancialStuff
{
public string Name { get; set; }
public int Amount { get; set; }
} private void LoadChartContents()
{
Random rand = new Random();
List<FinancialStuff> financialStuffList = new List<FinancialStuff>();
financialStuffList.Add(new FinancialStuff() { Name = "MSFT", Amount = rand.Next(, ) });
financialStuffList.Add(new FinancialStuff() { Name = "AAPL", Amount = rand.Next(, ) });
financialStuffList.Add(new FinancialStuff() { Name = "GOOG", Amount = rand.Next(, ) });
financialStuffList.Add(new FinancialStuff() { Name = "BBRY", Amount = rand.Next(, ) });
(PieChart.Series[] as PieSeries).ItemsSource = financialStuffList;
(ColumnChart.Series[] as ColumnSeries).ItemsSource = financialStuffList;
(LineChart.Series[] as LineSeries).ItemsSource = financialStuffList;
(BarChart.Series[] as BarSeries).ItemsSource = financialStuffList;
(BubbleChart.Series[] as BubbleSeries).ItemsSource = financialStuffList;
}

也可以先将Series弄出来:

        public static LineSeries InitChart(List<FinancialStuff> financialStuffList)
{
LineSeries lSeries = new LineSeries();
lSeries.IndependentValuePath = "Name";
lSeries.DependentValuePath = "Amount"; lSeries.ItemsSource = financialStuffList; return lSeries;
}
 LineSeries ls = Functions.WinrtChartHelper.InitChart(financialStuffList);
this.LineChart.Series.Add(ls);

然而,这样子只能实现LineSeries ,PieSeries/ColumnSeries/BarSeries/BubbleSeries等都会有一个UnhandledException出现……

WinRTXamlToolkit在Win8.1实现统计图的更多相关文章

  1. Windows.Andy.Code4App.dll Win8.1/WP8.1通用类库@ver1.0.0

    直接入题! Win8.1和WP8.1眼下已经渐渐融为一体,WP8.1不断向Win8.1靠拢,虽然一些方法上WP8.1和Win8.1不同(ps:WP8.1和Win8.1的不同之处),但大部分还是相同的. ...

  2. 0.Win8.1,Win10,Windows Server 2012 安装 Net Framework 3.5

    后期会在博客首发更新:http://dnt.dkill.net 网站部署之~Windows Server | 本地部署:http://www.cnblogs.com/dunitian/p/482280 ...

  3. win8.1硬盘安装ubuntu14.04双系统

    在网上找了很多方法都失败了,原因是大多数方法都是用mbr方式安装的,如grub4dos,easybcd.以至于连自己都怀疑win8能不能用硬盘安装,差点就去买个u盘来安装了,就在打算放弃的时候在ubu ...

  4. alienware Win8 系统安装

    原作者网名 alienware-小来: 我的外星人 老是装系统出错.我觉得写的不错.把原作者的东西拿过来.. 对于win7系统的用户来说想要体验下win8.1系统,或者是原来win8.1系统加装固态后 ...

  5. win8改win7笔记

    内存<=4G,选32位(×86)   内存>=4G,选64位(×64)   (非必须) BIOS设置    USB Boot Support     Disabled改为Enabled(如 ...

  6. 【转】微软教学:三种方法屏蔽Win7/Win8.1升级Win10推送

    原文地址:http://www.ithome.com/html/win10/199961.htm 微软在2015年6月就开启了Win10升级推送工作,主要是靠<获取Windows10>工具 ...

  7. 教你一招:解决win10/win8.1系统在安装、卸载软件时出现2502、2503错误代码的问题

    经常遇到win10/win8.1系统在安装.卸载软件时出现2502.2503错误代码的问题. 解决办法: 1.打开任务管理器后,切换到“详细信息”选项卡,找到explore.exe这个进程,然后结束进 ...

  8. 【转】windows环境下安装win8.1+Mac OS X 10.10双系统教程

    先要感谢远景论坛里的各位大神们的帖子  没有他们的分享我也不能顺利的装上Mac OS X 10.10! 写这篇随笔主要是为了防止自己遗忘,同时给大家分享下我的经验. 本教程适用于BIOS+MBR分区的 ...

  9. 【转】[教程]在 win7 / win8 下安装苹果系统 (懒人版)

    前言   这篇安装教程的素材在国庆就准备好了,但那时学习任务比较重,没有时间发帖,一直拖到现在.趁这个周末有空,赶紧写完它,希望能帮助一些景友. 论坛已经有不少安装教程,如果对这篇安装教程有疑问可以去 ...

随机推荐

  1. 使用U-Boot的NFS(远程/网络用户空间)

    前提条件 假设您的主机PC运行的是Ubuntu 14.04.1 LTS或更高版本,并且与您的开发平台在同一个本地网络上;为了简单起见,我们假设网络上也有DHCP服务器.如果使用Juno,请确保使用的是 ...

  2. mac os lscpu 【转】

    CPU Information on Linux and OS X This is small blog post detailing how to obtain information on you ...

  3. WingIDE4.1 破解及支持中文设置

    1.下面提供最新版本的破解方法. 先到http://wingware.com/downloads/wingide下载最新版本的IDE. 安装之前,先修改时间到一个月前. 安装 安装之后然后获取试用版的 ...

  4. Coursera Algorithms week2 基础排序 练习测验: Permutation

    题目原文: Given two integer arrays of size n , design a subquadratic algorithm to determine whether one ...

  5. C# 多线程系列(四)

    Parallel类 Parallel类定义了for.foreach和invoke的静态方法.Parallel类使用多个任务,因此使用多个线程来完成这个作业. Parallel.For Parallel ...

  6. 分布式文件管理系统MooseFS在centOS 7中的安装

    首先,MooseFS是做什么的在这边不做具体详述,这边主要记录一下我在自己部署MooseFS中遇到的问题和步骤(大部分参考的其他博客或者资料) 首先是准备资源,MooseFS的最新安装包可以去官网下载 ...

  7. Android开发笔记(11)——DialogFragment & 点击监听

    转载请注明:http://www.cnblogs.com/igoslly/p/6931519.html DialogFragment使用 & 点击监听 /* DialogFragment是用于 ...

  8. VHDL之std_logic_1164

    This packages defines a standard for designers to use in describing the interconnection data types u ...

  9. 2013款MacBook Air装Windows7单系统

    经过两天的摸索,查找无数资料终于把2013款的MacBook Air装上了WIN 7,虽然网上有很多的资料但是都不是我想要的,第一个我的是2013款的MacBook Air,跟原来2012 11款Ma ...

  10. 【sqli-labs】 less39 GET -Stacked Query Injection -Intiger based (GET型堆叠查询整型注入)

    http://192.168.136.128/sqli-labs-master/Less-39/?id=1;insert into users(id,username,password) values ...