找传奇、传世资源到传世资源站!

C# 柱状图、折线图、饼图源码(chart控件的简单示例)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

C# 柱状图、折线图、饼图源码(chart控件的简单示例) C#语言基础-第1张C# 柱状图、折线图、饼图源码(chart控件的简单示例) C#语言基础-第2张C# 柱状图、折线图、饼图源码(chart控件的简单示例) C#语言基础-第3张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); } }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复