新聞中心
用vb點(diǎn)虐 可以做出餅圖嗎
Dim MyGraphics As Graphics = Me.PictureBox1.CreateGraphics
“只有客戶(hù)發(fā)展了,才有我們的生存與發(fā)展!”這是創(chuàng)新互聯(lián)的服務(wù)宗旨!把網(wǎng)站當(dāng)作互聯(lián)網(wǎng)產(chǎn)品,產(chǎn)品思維更注重全局思維、需求分析和迭代思維,在網(wǎng)站建設(shè)中就是為了建設(shè)一個(gè)不僅審美在線(xiàn),而且實(shí)用性極高的網(wǎng)站。創(chuàng)新互聯(lián)對(duì)網(wǎng)站制作、成都網(wǎng)站建設(shè)、網(wǎng)站制作、網(wǎng)站開(kāi)發(fā)、網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站優(yōu)化、網(wǎng)絡(luò)推廣、探索永無(wú)止境。
Dim MyBrush As New SolidBrush(Color.Red)
Dim MyProportion As Single
Dim MyRect As New Rectangle
Dim MyPoint As New PointF
Dim R As Single
Const PI = 3.1415926
MyGraphics.Clear(Color.White)
Dim MyStartAngel As Double
Dim MySweepAngel As Double
R = Math.Min(Me.PictureBox1.Width, Me.PictureBox1.Height) / 2 - 15
MyPoint.X = Me.PictureBox1.Width / 2
MyPoint.Y = Me.PictureBox1.Height / 2
MyRect.X = MyPoint.X - R
MyRect.Y = MyPoint.Y - R
MyRect.Width = R * 2
MyRect.Height = R * 2
MyStartAngel = 0
MyProportion = Val(TextBox7.Text)
MySweepAngel = MyProportion * 360 / PI
MyBrush.Color = Color.Red
MyGraphics.FillPie(MyBrush, MyRect, MyStartAngel, MySweepAngel)
' MyStartAngel = MyStartAngel + MySweepAngel
MyProportion = 0.75
MySweepAngel = 360 * MyProportion
MyBrush.Color = Color.Blue
MyGraphics.FillPie(MyBrush, MyRect, MyStartAngel, MySweepAngel)
vb點(diǎn)虐 中怎樣曲線(xiàn)圖,棒圖,和餅圖
vb2010以后的版本就自帶Chart控件了,比如
Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie '餅圖
用VB中的mschart控件畫(huà)一個(gè)餅狀圖,要怎么畫(huà)?
先在“部件”里選上“Microsoft Chart Control 6.0”,并添加一個(gè)MSChart1。
Private Sub Form_Load()
With MSChart1
.chartType = VtChChartType2dPie '表示餅圖
.ColumnCount = 3 '這里是每個(gè)餅圖的數(shù)據(jù)個(gè)數(shù)
.ColumnLabel = "你的數(shù)據(jù)名稱(chēng)"
.RandomFill = True '暫且用隨機(jī)數(shù)填圖,數(shù)據(jù)請(qǐng)自己輸入
.RowCount = 2 '你說(shuō)的“畫(huà)兩部分的餅狀圖就成”
.RowLabel = "你的數(shù)據(jù)標(biāo)簽"
.TitleText = "你的圖表名稱(chēng)"
End With
End Sub
名稱(chēng)欄目:vb點(diǎn)虐 餅狀圖 c#畫(huà)餅狀圖
網(wǎng)頁(yè)網(wǎng)址:http://www.dlmjj.cn/article/ddihihh.html