Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 03:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



vb.net Zedgraph

Discussion on vb.net Zedgraph within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
Engel's Avatar
 
elite*gold: 0
Join Date: Aug 2005
Posts: 472
Received Thanks: 20
Post vb.net Zedgraph

Hallo zusammen
Habe nen kleines Prgramm geschrieben was alle 10 Sekunden den aktuellen Speicherplatz eines laufwerks anzeigt ,diesen in einer RichTextbox protokolliert, ihn in einer Log File abspeichert und bei Bedarf per E-mail versenden kann.
Zu guter letzt versuche ich mit Hilfe der Zedgraph Libary das ganze noch grafisch anzeigen zu lassen. Alle 10 Sekunden führt ein Timer also die nachfolgende Funktion aus um einen neuen Punkt zu erstellen.
Mein Problem ist das nur Punkte im Diagramm angezeigt werden und keine Linie.
Genauso wird ignoriert das Unterhalb der Linie der Bereich grün gefärbt werden soll. Ich steh nen bisschen auf dem Schlauch, aber vielleicht fällt einem von euch was im Code auf.

Code:
Private Sub CreateGraph(ByVal zgc As ZedGraphControl)
        Dim x As Double
        x = New XDate(DateTime.Now)
        Dim myPane As GraphPane = zgc.GraphPane
        Dim list = New PointPairList()



        ' Set the titles and axis labels
        myPane.Title.Text = "Speicherplatz"
        myPane.XAxis.Title.Text = "Zeitachse"
        myPane.YAxis.Title.Text = "Freier Speicher in Gb"
        ' Farben bestimmen
       


        'Punktierung einsetzen und Farbe bestimmen
        'myPane.XAxis.MajorGrid.IsVisible = True
        'myPane.YAxis.MajorGrid.IsVisible = True
        'myPane.XAxis.MajorGrid.Color = Color.White
        'myPane.YAxis.MajorGrid.Color = Color.White
        myPane.Chart.Fill = New Fill(Color.Black)
        myPane.Fill = New Fill(Color.White, Color.DimGray)


        myPane.XAxis.Type = AxisType.Date
        myPane.XAxis.Scale.Format = "hh:mm:ssss"
        myPane.Legend.IsVisible = False

        ' Neue Linie erstelle (Formatierung)
        list.Add(x, Label2.Text)
        Dim myCurve As LineItem = myPane.AddCurve("Speicherplatz", list, Color.Lime, SymbolType.Circle)
        myCurve.Line.Width = 200.0F
        myCurve.Line.IsAntiAlias = True
        myCurve.Line.Color = Color.Lime
        myCurve.Symbol.Fill = New Fill(Color.White)
        myCurve.Symbol.Size = 7
        myCurve.Line.IsVisible = True


        ' Calculate the Axis Scale Ranges
        zgc.AxisChange()
        ZedGraphControl1.Invalidate()
ty Engel
Engel is offline  
Reply




All times are GMT +1. The time now is 03:25.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.