官网:http://www.visifire.com/

一直没找到好的中文文档,希望有的这个的可以发个我!

效果图:

前台代码:

<UserControl x:Class="Text_Visifire.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"
mc:Ignorable="d"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
d:DesignWidth="1200" d:DesignHeight="680">
<Grid x:Name="LayoutRoot">
<StackPanel Orientation="Horizontal" >
<!--第一個Chart-->
<vc:Chart Grid.Row="0" Name="chtChartOne" Width="390">
<vc:Chart.AxesY>
<!--Y間隔-->
<vc:Axis Interval="20" Suffix="%"/>
</vc:Chart.AxesY>
</vc:Chart>
<StackPanel>
<Grid x:Name="ChartPanel" Height="250" Width="500">
</Grid>
<Grid x:Name="ChartLine" Height="300" Width="500">
</Grid>
</StackPanel>
<StackPanel>
<Grid x:Name="Chart1" Height="250" Width="500">
</Grid>
<Grid x:Name="Chart2" Height="300" Width="500">
</Grid>
</StackPanel>
</StackPanel>
<!--第二個Chart-->
<!--<vc:Chart Grid.Row="1" Name="chtChartTwo">
<vc:Chart.AxesY>
<vc:Axis Interval="20" Suffix="%"/>
</vc:Chart.AxesY>
<vc:Chart.Series>
<vc:DataSeries RenderAs="Column" LabelEnabled="true" LabelStyle="OutSide" Margin="418,-104,-418,104">
<vc:DataSeries.DataPoints>
<vc:DataPoint AxisXLabel="18-29歲" YValue="31.2"/>
<vc:DataPoint AxisXLabel="30-39歲" YValue="23.3"/>
<vc:DataPoint AxisXLabel="40-49歲" YValue="30.9"/>
<vc:DataPoint AxisXLabel="50-64歲" YValue="35.6"/>
<vc:DataPoint AxisXLabel="65歲以上" YValue="7.6"/>
<vc:DataPoint AxisXLabel="65歲以上" YValue="27.6"/>
<vc:DataPoint AxisXLabel="65歲以上" YValue="2.6"/>
<vc:DataPoint AxisXLabel="65歲以上" YValue="27.6"/>
<vc:DataPoint AxisXLabel="65歲以上" YValue="27.6"/>
</vc:DataSeries.DataPoints>
</vc:DataSeries>
</vc:Chart.Series>
</vc:Chart>-->
</Grid>
</UserControl>

后台代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Visifire.Charts; namespace Text_Visifire
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
//柱状图
InitPage();
//饼图
ShowPie();
//折线图
ShowLine();
//雷达图
ShowRadar();
//气泡图
ShowBubble();
} #region 柱状图示例
public void InitPage()
{
chtChartOne.View3D = true;
Title title = new Title();
title.Text = "柱状图的标题内容";
chtChartOne.Titles.Add(title); //統計資料列
DataSeries ds = new DataSeries();
//柱状类型
ds.RenderAs = RenderAs.StackedColumn;
//顯示Lable
ds.LabelStyle = LabelStyles.OutSide;
ds.LabelEnabled = true;
//欄
ds.DataPoints.Add(new DataPoint() { AxisXLabel = "18-29歲", YValue = 20.8 });
ds.DataPoints.Add(new DataPoint() { AxisXLabel = "30-39歲", YValue = 28.2 });
ds.DataPoints.Add(new DataPoint() { AxisXLabel = "40-49歲", YValue = 26.5 });
ds.DataPoints.Add(new DataPoint() { AxisXLabel = "50-64歲", YValue = 18.9 });
ds.DataPoints.Add(new DataPoint() { AxisXLabel = "65歲以上", YValue = 17.2 });
chtChartOne.Series.Add(ds);
}
#endregion #region 饼状图示例
public void ShowPie()
{
Chart chart = new Chart();
chart.Width = 450;
chart.Height = 300;
chart.View3D = true; //3D效果
//饼状图的标题设置
Title title = new Visifire.Charts.Title();
title.Text = "这是一个测试用的3D饼状图";
chart.Titles.Add(title); DataSeries dataSeries = new DataSeries();
dataSeries.RenderAs = RenderAs.Pie;
dataSeries.LegendText = "";
DataPoint point;
int numberOfDataPoints = 6;
Random random = new Random();
for (int i = 0; i < numberOfDataPoints; i++)
{
point = new DataPoint();
point.YValue = random.Next(1, 100);
dataSeries.DataPoints.Add(point);
}
chart.Series.Add(dataSeries);
this.ChartPanel.Children.Add(chart);
}
#endregion #region 折线图示例
public void ShowLine()
{
Chart chart = new Chart();
//折线图的标题
Title title = new Title();
title.Text = "折线图的标题";
chart.Titles.Add(title);
//设置类型为折线图
DataSeries dataSeries = new DataSeries();
dataSeries.RenderAs = RenderAs.Spline;
dataSeries.LegendText = "X坐标";
//设置点
DataPoint point;
Random random = new Random();
for (int i = 0; i < 10; i++)
{
point = new DataPoint();
point.YValue = random.Next(1, 100);
dataSeries.DataPoints.Add(point);
}
chart.Series.Add(dataSeries);
this.ChartLine.Children.Add(chart);
}
#endregion #region 雷达图示例
public void ShowRadar()
{
Chart chart = new Chart();
//雷达图的标题
Title title = new Title();
title.Text = "雷达图的标题";
chart.Titles.Add(title);
//设置类型为雷达图
DataSeries dataSeries = new DataSeries();
dataSeries.RenderAs = RenderAs.Radar;
dataSeries.LegendText = "X坐标";
//设置点
DataPoint point;
Random random = new Random();
for (int i = 0; i < 10; i++)
{
point = new DataPoint();
point.YValue = random.Next(1, 100);
dataSeries.DataPoints.Add(point);
}
chart.Series.Add(dataSeries);
this.Chart1.Children.Add(chart);
}
#endregion #region 气泡图示例
public void ShowBubble()
{
Chart chart = new Chart();
//气泡图的标题
Title title = new Title();
title.Text = "气泡图的标题";
chart.Titles.Add(title);
//设置类型为气泡图
DataSeries dataSeries = new DataSeries();
dataSeries.RenderAs = RenderAs.Bubble;
dataSeries.LegendText = "X坐标";
//设置点
DataPoint point;
Random random = new Random();
for (int i = 0; i < 10; i++)
{
point = new DataPoint();
point.YValue = random.Next(1, 100);
dataSeries.DataPoints.Add(point);
}
chart.Series.Add(dataSeries);
this.Chart2.Children.Add(chart);
}
#endregion // 当用户导航到此页面时执行。
//protected override void OnNavigatedTo(NavigationEventArgs e)
//{
//}
}
}

DLL文件以及源码:http://pan.baidu.com/s/1c0q2Y5q

Silverlight/WPF绘制统计图Visifire.dll文件的更多相关文章

  1. WPF开发的界面调用C++生成的dll文件

    以引用d1.dll为例. [生成d1.dll] 文件——新建——项目——Visual C++——Win32项目,选择DLL,点击Finish.在d1.cpp中添加代码 #include "s ...

  2. WPF调用C++生成的dll文件(示例)

    注:笔者使用的VS版本为2019.1.打开VS2019,选择文件 -> 新建 -> 项目 2.选择项目 新建项目时选择C++“控制台应用”语言:C++平台:Windows项目类型:空项目 ...

  3. wpf窗体项目 生成dll类库文件

    我想把一个wpf应用程序的输出类型由windows应用程序改为类库该怎么做,直接在项目属性里改的话报错为 库项目文件无法指定applicationdefinition属性 wpf窗体项目运行之后bin ...

  4. WPF程序中App.Config文件的读与写

    WPF程序中的App.Config文件是我们应用程序中经常使用的一种配置文件,System.Configuration.dll文件中提供了大量的读写的配置,所以它是一种高效的程序配置方式,那么今天我就 ...

  5. 通过AssemblyResolve事件打包合并exe和dll文件

    使用WPF开发的安装包,在创建快捷方式的时候,需要用到COM程序集Windows Script Host Object Model,引用COM程序集后,会在debug目录生成Interop.IWshR ...

  6. ArcGIS API for Silverlight/WPF 2.1学习笔记(一)——精简版

    一.安装 1.Visual Studio: (1)Visual Studio 2010或Visual Web Developer Express 2010 (2)Silverlight 4 Tools ...

  7. 【转】ArcGIS API for Silverlight/WPF 2.1学习笔记(一)

    源自:http://blog.163.com/zwx_gis/blog/static/32434435201122193611576/ (主页:http://blog.163.com/zwx_gis/ ...

  8. XML序列化 判断是否是手机 字符操作普通帮助类 验证数据帮助类 IO帮助类 c# Lambda操作类封装 C# -- 使用反射(Reflect)获取dll文件中的类型并调用方法 C# -- 文件的压缩与解压(GZipStream)

    XML序列化   #region 序列化 /// <summary> /// XML序列化 /// </summary> /// <param name="ob ...

  9. WPF绘制自定义窗口

    原文:WPF绘制自定义窗口 WPF是制作界面的一大利器,下面就用WPF模拟一下360的软件管理界面,360软件管理界面如下: 界面不难,主要有如下几个要素: 窗体的圆角 自定义标题栏及按钮 自定义状态 ...

随机推荐

  1. JavaScript编码规范[百度]

    JavaScript编码规范 1 前言   2 代码风格   2.1 文件   2.2 结构   2.2.1 缩进   2.2.2 空格   2.2.3 换行   2.2.4 语句   2.3 命名 ...

  2. Markdown基本用法

    Markdown基本用法 不同的编辑器对本文中的功能可能显示情况不一样,马克飞象可以完美支持和显示. 一.标题 h1标题 #h1标题 h1标题 h1标题 == h2标题 ##h2标题 h2标题 h2标 ...

  3. DS实验题 Missile

    题目: 提示:并没有精度问题. 原题 NOIP2010 导弹拦截 思路 设源点为A(x1, y1)和B(x2, y2). 第一步,用结构体存节点,包括以下元素: 1.横坐标x 2.纵坐标y 3.节点和 ...

  4. AngularJS 初识笔记

    test.html: <!DOCTYPE html> <html lang="en" ng-app> <head> <meta chars ...

  5. thinkphp模型层Model、Logic、Service讲解

    thinkphp模型层Model.Logic.Service讲解 时间:2014-08-24 15:54:56   编辑:一切随缘   文章来源:php教程网 已阅读:771 次       js特效 ...

  6. P1149 火柴棒等式

    #include <bits/stdc++.h> using namespace std; const int num[] = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6} ...

  7. 【转】Unity3D的输入(Input)——键盘和鼠标

    http://blog.csdn.net/lingyun_blog/article/details/41451565 Unity3D使用input类控制用户的输入,输入包括了用户键盘,鼠标,触摸,重力 ...

  8. 如何查看google chrome 插件源码

    常用浏览器google chrome 有很多优秀的插件,寂寞的时候想看看人家是怎么实现的,说是快那就动手吧 插件代码位置 本人mac笔记本,chrome 插件位置如下 $ cd  /Users/vin ...

  9. HTML5 本地存储 LocalStorage

    说到本地存储,这玩意真是历尽千辛万苦才走到HTML5这一步,之前的历史大概如下图所示: 最早的Cookies自然是大家都知道,问题主要就是太小,大概也就4KB的样子,而且IE6只支持每个域名20个co ...

  10. SQL Server存储机制

    1.区段 区段(extent)是用来为表和索引分配空间的基本存储单元.它由8个连续的64KB数据页组成. 基于区段(而不是实际使用空间)分配空间的概念的要点: 一旦区段已满,那么下一记录将要占据的空间 ...