Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
Help with UltraChart - Line Chart in VB.NET
posted

Hello!

I'm trying to create a simple graph by entering points manually in VB.NET but it doesn't appear to be behaving as I would expect.  Below is my sample code:

Dim PStatsDS1 As New Infragistics.UltraChart.Resources.Appearance.XYSeries

PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(0, 1000, "0%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(100, 900, "10%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(200, 800, "20%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(300, 700, "30%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(400, 600, "40%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(500, 500, "50%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(600, 400, "60%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(700, 300, "70%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(800, 200, "80%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(900, 100, "90%", False))
PStatsDS1.Points.Add(New Infragistics.UltraChart.Resources.Appearance.XYDataPoint(1000, 0, "100%", False))

chartProcessStats1.Series.Add(PStatsDS1)

I'm including a screenshot of what I'm seeing:

UltraChart Pic

It shows the data as 00, though I would expect for this point to either see 100 or 900 (can't seem to find any solid documentation about the format of the XYDataPoint).  I'm guessing I probably am doing something fundamentally wrong but, after poking around with it for a while, I can't seem to make any progress.  Any help you can give me would be greatly appreciated!  Thanks!

    • 355
      Verified Answer
      Offline posted

      Nevermind, got it sorted.  Had to change the way I input stuff a bit differently.

           PStatsDS1.Points.Add(New NumericDataPoint(0,1000, False)) 

      Had to import the following first though:

           Imports Infragistics.UltraChart.Resources.Appearance