资源简介
private void Form1_Load(object sender, EventArgs e)
{
Random random = new Random();
this.chart1.Series[0].Name = "教师";
this.chart1.Series[1].Name = "学生";
for (int i = 1; i < 12; i )
{
this.chart1.Series[0].Points.AddXY(i, random.Next(100));
this.chart1.Series[1].Points.AddXY(i, random.Next(100));
this.chart2.Series[0].Points.AddXY(i, random.Next(100));
}
double[] yValues = { 65.62, 75.54, 60.45, 55.73, 70.42 };
string[] xValues = { "France", "Canada", "UK", "USA", "Italy" };
this.chart3.Series[0].CustomProperties = "DoughnutRadius=60, PieLabelStyle=Disabled, PieDrawingStyle=SoftEdge";
this.chart3.Series[0].Label = "#PERCENT";
this.chart3.Series[0]["PieLabelStyle"] = "Inside";
this.chart3.Series[0].Points.DataBindXY(xValues, yValues);
}
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
namespace ChartSample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender EventArgs e)
{
Random random = new Random();
this.chart1.Series[0].Name = “教师“;
this.chart1.Series[1].Name = “学生“;
for (int i = 1; i < 12; i++)
{
this.chart1.Series[0].Points.AddXY(i random.Next(100));
this.chart1.Series[1].Points.AddXY(i random.Next(100));
this.chart2.Series[0].Points.AddXY(i random.Next(100));
}
double[] yValues = { 65.62 75.54 60.45 55.73 70.42 };
string[] xValues = { “France“ “Canada“ “UK“ “USA“ “Italy“ };
this.chart3.Series[0].CustomProperties = “DoughnutRadius=60 PieLabelstyle=Disabled PieDrawingstyle=SoftEdge“;
this.chart3.Series[0].Label = “#PERCENT“;
this.chart3.Series[0][“PieLabelstyle“] = “Inside“;
this.chart3.Series[0].Points.DataBindXY(xValues yValues);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 49664 2020-08-05 12:39 ChartSample\.vs\ChartSample\v14\.suo
文件 12288 2020-08-05 12:33 ChartSample\ChartSample\bin\Debug\ChartSample.exe
文件 22016 2020-08-05 12:33 ChartSample\ChartSample\bin\Debug\ChartSample.pdb
文件 22696 2020-08-05 12:33 ChartSample\ChartSample\bin\Debug\ChartSample.vshost.exe
文件 490 2019-03-19 12:46 ChartSample\ChartSample\bin\Debug\ChartSample.vshost.exe.manifest
文件 3749 2015-05-26 15:37 ChartSample\ChartSample\ChartSample.csproj
文件 1422 2020-08-05 12:33 ChartSample\ChartSample\Form1.cs
文件 10563 2020-08-05 12:33 ChartSample\ChartSample\Form1.Designer.cs
文件 5817 2020-08-05 12:33 ChartSample\ChartSample\Form1.resx
文件 2907 2020-08-05 12:33 ChartSample\ChartSample\obj\x86\Debug\ChartSample.csproj.FileListAbsolute.txt
文件 1012 2020-08-05 12:33 ChartSample\ChartSample\obj\x86\Debug\ChartSample.csproj.GenerateResource.Cache
文件 10019 2020-08-05 12:33 ChartSample\ChartSample\obj\x86\Debug\ChartSample.csprojResolveAssemblyReference.cache
文件 12288 2020-08-05 12:33 ChartSample\ChartSample\obj\x86\Debug\ChartSample.exe
文件 180 2020-08-05 12:33 ChartSample\ChartSample\obj\x86\Debug\ChartSample.Form1.resources
文件 22016 2020-08-05 12:33 ChartSample\ChartSample\obj\x86\Debug\ChartSample.pdb
文件 180 2020-08-05 12:33 ChartSample\ChartSample\obj\x86\Debug\ChartSample.Properties.Resources.resources
文件 2870 2020-08-05 12:30 ChartSample\ChartSample\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7345 2020-08-05 12:30 ChartSample\ChartSample\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 336 2015-05-26 15:37 ChartSample\ChartSample\obj\x86\Debug\GenerateResource.read.1.tlog
文件 786 2015-05-26 15:37 ChartSample\ChartSample\obj\x86\Debug\GenerateResource.write.1.tlog
文件 492 2015-05-26 15:37 ChartSample\ChartSample\Program.cs
文件 1364 2015-05-26 15:37 ChartSample\ChartSample\Properties\AssemblyInfo.cs
文件 2872 2015-05-26 15:37 ChartSample\ChartSample\Properties\Resources.Designer.cs
文件 5612 2015-05-26 15:37 ChartSample\ChartSample\Properties\Resources.resx
文件 1096 2015-05-26 15:37 ChartSample\ChartSample\Properties\Settings.Designer.cs
文件 249 2015-05-26 15:37 ChartSample\ChartSample\Properties\Settings.settings
文件 875 2015-05-26 15:37 ChartSample\ChartSample.sln
..A..H. 18944 2015-05-26 15:37 ChartSample\ChartSample.suo
..A..H. 41984 2015-06-05 07:54 ChartSample\ChartSample.v12.suo
目录 0 2014-04-20 22:46 ChartSample\ChartSample\obj\x86\Debug\TempPE
............此处省略14个文件信息
- 上一篇:C# 条码、二维码生成器
- 下一篇:C# 调用LabVIEW DLL
相关资源
- Winform图表(MSChart)
- 一个C#的Chart控件
- winform c# mschart demo 范例
- C#chart控件画3D柱状、折线图
- winform chart动态跟进式折线图
- C# - DynamicDataDisplay.dll图表绘制(内含
- WPFVisifire.Charts柱状图饼图曲线图区域
- TeeChart.WPF.dll 破解
- MSchart使用
- WPF Charts控件库的全面扩展(最新201
- WPF链接mysql数据库绘制livechart波形
- PracticalWPFChartsandGraphics.rar
- MsChart项目(WinForm版)
- C# MVC 封装百度的EChart完整
- WPFVisifire5.1.7及WPFVisifireGauges5.13源码
- WPFVisifire3.6.8源代码的扩展及超详细
- TeeChart在C和C#下的应用
- TeeChartNET2010VSNET2010Eval_4.0.2011.02087完全
- WPFVisifire.Charts全版本dll集合
- C#chart图表源码
- LiveCharts样例
- 基于WPF MVVM框架开发的串口调试助手
- C#动态绘制心率折线图串口通信
- Chart Control :所有 35 种基本图表
- C#CHART时间做X轴可放大缩小.zip
- C# winfrom chart控件
- C# teechart
- 在c#中Teechart的使用说明
- WPF 数据可视化 大屏展示 实现地图仿
- C#的Chart 控件Demo
评论
共有 条评论