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.Data.SqlClient;
using System.IO;
using System.Drawing.Drawing2D;
namespace WindowsFormsApplication1
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}
private void CreateImage()
{
string[] month = new string[12] { "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" };
Bitmap bMap = new Bitmap(750, 750);
float[] d = new float[12] { 20.5F, 31, 45, 70, 80, 90, 10, 56, 45.5F, 16, 17, 21 };
Graphics gph = Graphics.FromImage(bMap);
gph.Clear(Color.White);
try
C# 做折线统计图
这篇博客介绍如何用C#编程实现一个折线统计图,包括创建Bitmap对象,定义数据,绘制X轴、Y轴,画点、折线,以及显示和保存图片的步骤。代码中展示了如何利用Graphics类和各种绘图方法来实现图表的各个元素。
摘要由CSDN通过智能技术生成