新聞中心
vb.net 控制excel畫餅狀圖
我自己寫的控件,里面有示例程序,很簡單的。不過餅圖只設(shè)置了12種顏色。。。只能顯示12項
陵城ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!
用vb.net可以做出餅圖嗎
Dim MyGraphics As Graphics = Me.PictureBox1.CreateGraphics
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.net中怎樣曲線圖,棒圖,和餅圖
vb2010以后的版本就自帶Chart控件了,比如
Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie '餅圖
我想問下,講數(shù)據(jù)保存到excel中后,如何在VB.net中繼續(xù)寫代碼,使得能夠?qū)⑦@些數(shù)據(jù)生成一個餅圖?并保存。
用宏功能啊,然后把宏代碼(vb6.0)轉(zhuǎn)化為Vb.net代碼,有一個關(guān)鍵問題,就是VBA中的枚舉類型在Vb.net中不適用,比如.End(xlUp)更改為.End(3)就能運行,另外vb.net中運行Excel對象不一定在點后會出現(xiàn)智能提示(即使你引用后也一樣)你只要確定有該方法或者屬性,直接寫就是了,生成或者調(diào)試都是可以通過的
本文標(biāo)題:vb.net餅圖,winform餅圖
當(dāng)前地址:http://fisionsoft.com.cn/article/hesoco.html