![](/img/trans.png)
[英]how to use asp.net list view control of framework 3.5 into framework 2.0?
[英]How to use chart control in asp.net Framework 2.0?
我在 .net Framework 2.0 中完成的项目中工作,我需要图表控件来显示 web 应用程序中的图表我不能使用隐藏在工具中的图表控件。
我还引用了“system.web.datavisualization.dll”,即使它不起作用。
谁能为此提出任何解决方案。
谢谢 R.Karthik
土耳其有一句老话:他们问狼:“为什么你的脖子这么粗?”,狼回答:“我自己做的。”:)
所以我检查了一些解决方案,但它们都有一些其他问题,我决定自己做。
这是一个非常简单的 function。(您可以将其转换为 C#)
....
Dim gecbmp As Bitmap = grafikyap(toplamsureler, aylar)
gecbmp.Save("C:\inetpub\wwwroot\musteri\gecbmp.jpg", Imaging.ImageFormat.Jpeg)
Image1.ImageUrl = "./gecbmp.jpg"
....
Private Function grafikyap(ByVal toplamsureler() As Integer, ByVal aylar() As String) As Bitmap
Dim arkarenkR As Integer = 255
Dim arkarenkG As Integer = 255
Dim arkarenkB As Integer = 255
grafikyap = Nothing
objBitmap = New Bitmap(390, 320, System.Drawing.Imaging.PixelFormat.Format16bppRgb555)
objGraphics = Graphics.FromImage(objBitmap)
objGraphics.Clear(Color.FromArgb(arkarenkR, arkarenkG, arkarenkB)) 'for the background color
Dim artim As Integer
artim = 30 'width of the bar
Dim strxyeri As Integer
Dim stryyeri As Integer
Dim myfont2 As New System.Drawing.Font("Courier New", 12, FontStyle.Regular, GraphicsUnit.Pixel)
Dim yuk As Integer ' height of the bar
Dim bolen As Integer = 2 ' to fit the bars inside the image
For qq = 1 To 6
yuk = toplamsureler(qq) / bolen
strxyeri = 330 - ((qq - 1) * 2 * artim)
stryyeri = 300 - yuk
objGraphics.FillRectangle(Brushes.Blue, strxyeri, stryyeri, artim, yuk)
objGraphics.DrawString(Trim(Str(toplamsureler(qq))), myfont2, Brushes.Black, strxyeri, stryyeri - 20)
objGraphics.DrawString(Trim(aylar(qq)), myfont2, Brushes.Black, strxyeri, 300)
Next qq
grafikyap = objBitmap
objGraphics.Dispose()
End Function
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.