locked
Dynamic graph in vb.net

    שאלה

  • Hello everyone,

    i am to generate a line graph in vb.net. The graph should be something dynamic. I have a program calculating total distance, therefore in my output window i have iteration number and its corresponding value.

    I have to plot the graph as iteration number by iteration value.

    I have tried an offline graph where i saved the values of the iterations and then draw the graph with the values.

    But this is not what i am actually suppose to do. The graph should be generated simultaneously as the processing is being done.

    I am finding this a bit tough to do. Can someone please guide me?

    Thanks.

    יום חמישי 01 מרץ 2012 13:48

תשובות

  • Hi Nirvana,

    According to the codes in your post, it seems that you’re using a 3-rd party control and I’m not able to compile those codes right now.

    As for “to take the values by itself while the distance is being calculated in another form”, you could call graph form after the calculation finished in another form. And pass parameters (such as property) to graph form.

    If I misunderstood anything, please feel free and let me know.

    Best regards,


    Shanks Zen
    MSDN Community Support | Feedback to us

    • סומן כתשובה על-ידי Shanks ZenModerator יום חמישי 15 מרץ 2012 05:33
    יום שני 05 מרץ 2012 07:56

כל התגובות

  • can you show the code you have so far? and what else you've tried

    you probably just want to use the Points.AddXY method

    יום חמישי 01 מרץ 2012 13:55
  • Imports Infragistics.UltraChart.Shared.Styles
    Imports Infragistics.UltraChart.Resources.Appearance
    Imports Infragistics.UltraChart.Core.Layers
    Public Class Graph


        Private Sub Graph_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.UltraChart1.ChartType = ChartType.LineChart
            Dim myChartArea As New ChartArea()
            Me.UltraChart1.CompositeChart.ChartAreas.Add(myChartArea)
            ' Add the first series to the Line Chart
            Dim numseries As NumericSeries = GetNumericSeries()
            UltraChart1.LineChart.ChartComponent.Series.Add(numseries)
        End Sub
        Private Shared Function GetNumericSeries() As NumericSeries
            Dim series As New NumericSeries()
            ' This code populates the series using unbound data
            series.Points.Add(New NumericDataPoint(5, "Point A", False))
            series.Points.Add(New NumericDataPoint(4, "Point B", False))
            series.Points.Add(New NumericDataPoint(3, "Point C", False))
            series.Points.Add(New NumericDataPoint(2, "Point D", False))
            series.Points.Add(New NumericDataPoint(1, "Point E", False))
            Return series
        End Function

    End Class

    this is simply plotting the graph by the values im providing it.
    what it's actually suppose to do..is to take the values by itself while the distance is being calculated in another form.

       
    יום חמישי 01 מרץ 2012 18:12
  • Hi Nirvana,

    According to the codes in your post, it seems that you’re using a 3-rd party control and I’m not able to compile those codes right now.

    As for “to take the values by itself while the distance is being calculated in another form”, you could call graph form after the calculation finished in another form. And pass parameters (such as property) to graph form.

    If I misunderstood anything, please feel free and let me know.

    Best regards,


    Shanks Zen
    MSDN Community Support | Feedback to us

    • סומן כתשובה על-ידי Shanks ZenModerator יום חמישי 15 מרץ 2012 05:33
    יום שני 05 מרץ 2012 07:56