畫餅圖的例子,
鳳泉ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:028-86922220(備注:SSL證書合作)期待與您的合作!
Me.LoadDriveInfo(DrivesOnPc.Items(DrivesOnPc.SelectedIndex)) 計算比例大小
Me.Invalidate() 觸發(fā)窗體繪圖
'窗體畫圖(餅圖)
Private Sub form3_paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
'設(shè)定RECTANGLE結(jié)構(gòu)變量,確定畫圖的范圍及大小
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(
新建一個文件,寫入下面的代碼:
!doctype?html
html
head
meta?name="viewport"?content="initial-scale=1.0,?user-scalable=no"?/
meta?http-equiv="Content-Type"?content="text/html;?charset=gbk"?/
titleBaidu?Map?V1.2/title
script?type="text/javascript"?src=";services=true"
!--?add?baidu?map?api?--
/script
/head
body
div?id="container"?style="width:?600px;?height:?400px;"
/div
/body
/html
script?type="text/javascript"
var?map?=?new?BMap.Map("container");???????????? ????//?new?Map
var?point?=?new?BMap.Point(116.397128,?39.916527);??????//?Location,?(經(jīng)度,?緯度)
map.centerAndZoom(point,?15);??????????????????? ????//?show?Map
//?添加縮放功能
map.enableScrollWheelZoom();
map.enableKeyboard();
/script
保存到程序exe同一目錄下,文件名:map.html
然后BUTTON點擊事件:
WebBrowser1.Navigate(Application.StartupPath??"\map.html")
這樣就可以了
ps:經(jīng)緯度可以到百度地圖官網(wǎng)去獲取
或者到: ?去生成代碼
用crystal報表,文件——新建文件——crystal報表,然后根據(jù)向?qū)Ы?/p>
名稱欄目:vb.net地圖統(tǒng)計圖 區(qū)域統(tǒng)計圖
分享URL:http://weahome.cn/article/dodcgic.html