vb.net绘统计图 c# 统计图表

vb.net2005怎么做曲线统计图啊。

画饼图的例子,

贵德网站制作公司哪家好,找创新互联!从网页设计、网站建设、微信开发、APP开发、响应式网站建设等网站项目制作,到程序开发,运营维护。创新互联2013年至今到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联

Me.LoadDriveInfo(DrivesOnPc.Items(DrivesOnPc.SelectedIndex)) 计算比例大小

Me.Invalidate() 触发窗体绘图

'窗体画图(饼图)

Private Sub form3_paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint

'设定RECTANGLE结构变量,确定画图的范围及大小

Dim rect As Rectangle = New Rectangle(280, 20, 200, 200)

Dim rect2 As Rectangle = New Rectangle(270, 10, 400, 320)

Dim freelegend As Rectangle = New Rectangle(280, 300, 20, 20)

Dim usedlegend As Rectangle = New Rectangle(280, 275, 20, 20)

e.Graphics.DrawRectangle(Pens.Black, rect2)

e.Graphics.DrawLine(Pens.Black, 270, 260, 670, 260)

If Me.isSpaceInfoVailable = True Then

'填充椭圆图像(角度)

e.Graphics.FillPie(Brushes.Magenta, rect, 0, Sweep)

e.Graphics.FillPie(Brushes.Blue, rect, Sweep, 360 - Sweep)

'填充方形

e.Graphics.FillRectangle(Brushes.Magenta, freelegend)

e.Graphics.FillRectangle(Brushes.Blue, usedlegend)

e.Graphics.DrawString(

vb.net读取txt的数据作图问题

一、分析:

1,这一类随时间而变化的曲线图,通常把横轴作为时间,把纵轴作为相应的值,在这里就是密度值。

2,点的集合就是线;一组时间、密度值,对应一个点,把点连接起来就构成了线。

二、在VB.NET中作图,需要知道并解决几个问题:

1,与VB6一样,VB.NET中默认的坐标系统,左上角为坐标原点,X轴的正向为从左向右,Y轴的正向是从上向下。

为了使得它与数学中的坐标系统相一致,可以使用VB.NET中Graphics类的两个方法;

1、TranslateTransform----平移变换

格式:Graphics.TranslateTransform(dx,dy)

其中:dx 和 dy分别是Single数据类型

2、ScaleTransform----缩放变换

格式:Graphics.ScaleTransform(sx,sy)

其中:sx 和 sy分别是Single数据类型;

例如:为了符合数学中的一般格式,可以使用下述代码:

Graphics.ScaleTransform(1, -1)

这样就把Y轴的正方向给翻过来了。

三、VB.NET中绘制图形

1,绘制圆或椭圆

'绘制图形的三步曲

'1,获得一个Graphics对象

Dim MyGraphics As Graphics

MyGraphics = Me.CreateGraphics

'2,定义一个Pen对象,用于绘制图形(轮廓线)

Dim MyPen As New Pen(Color.Black)

'3,定义一个Brush对象,用于填充图形(如果需要填充的话)

Dim MyBrush As New SolidBrush(Color.Orange)

'绘制一个实心圆,该圆在:直线x=200,y=200,x=200+100,y=200+100所划的矩形区域内

MyGraphics.FillEllipse(Brush, 200, 200, 100, 100)

'绘制一个空心圆,该圆在:直线x=200,y=200,x=200+100,y=200+100所划的矩形区域内

MyGraphics.DrawEllipse(Pen, 200, 200, 100, 100)

注意:最后两个数值如果不等,就是绘制椭圆

当圆足够小,就是点了。

2,绘制直线

'1,获得一个Graphics对象

Dim MyGraphics As Graphics

MyGraphics = Me.CreateGraphics

'2,定义一个Pen对象,用于绘制图形(轮廓线)

Dim MyPen As New Pen(Color.Black)

MyGraphics.DrawLine(MyPen, 200, 200, 100, 100)

'或者直接用

Me.CreateGraphics.DrawLine(New Pen(Color.Black), 50, 50, 200, 200)

VB.net中如何画图?

VB.net与VB不同。

VB.net已经有专门绘图的类。

可以定义笔刷然后用Drawing类中的方法绘制。

Private Sub DrawEllipse()

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics as System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawEllipse(myPen, New Rectangle(0,0,200,300))

myPen.Dispose()

formGraphics.Dispose()

End Sub

Private Sub DrawRectangle()

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics as System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawRectangle(myPen, New Rectangle(0,0,200,300))

myPen.Dispose()

formGraphics.Dispose()

End Sub

急!!!VB.NET按月份数据画统计图

用crystal报表,文件——新建文件——crystal报表,然后根据向导建立

文章标题:vb.net绘统计图 c# 统计图表
分享网址:https://www.cdcxhl.com/article16/docdegg.html

成都网站建设公司_创新互联,为您提供移动网站建设静态网站App设计网站策划软件开发做网站

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

外贸网站建设