What's correct way to do a realtime spectrogram usingSurface

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Wed Jan 07, 2004 1:25 pm

Hello John,

There is no XYZ array overload for Add in the current release. We have added it for inclusion in the next maintenence update.

Syntax of use will be (adding some acceptable sample data) as follows. The release that includes this overload for Add will be available during January.

Code: Select all

      int axisRange=90;
      int numVals=8100; //square axisRange

      int[] myXVals = new int[numVals];
      int[] myZVals = new int[numVals];
      double[] myYVals = new double[numVals];

      Random rnd = new Random();

      int ctr=0;

      for (int x=0;x<axisRange;x++)
      {
        for (int z=0;z<axisRange;z++)
        {
          myXVals[ctr]=x;
          myYVals[ctr]=0.5*Math.Pow(Math.Cos(x/(axisRange*0.2)),2)+
            Math.Pow(Math.Cos(z/(axisRange*0.2)),2)-
            Math.Cos(z/(axisRange*0.5));
          myZVals[ctr]=z;
          ctr++;
        }
      }

      surface1.Add(myXVals,myYVals,myZVals);
For an example of sourcing XYZ data from a DataAdapter see the main TeeChart demo under:
'All features':'Datasets':'Using the Designtime Editor'

I think if you've seen any documented reference to TBitmap in this context it may be misleading. Creating a bitmap of a Chart may sometimes help track down a problem if the code causing the problem is loaded in a Form_load before the first Chart paint.

Regards,
Marc Meumann
Steema Support

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Jan 13, 2004 5:00 pm

Hello John,

Sorry I think I maybe wasn't clear in my post. The Array add for XYZ doesn't yet exist yet in TeeChart. It's been added for inclusion in the next maintenance release (late January). The example I put in is for how it will work when it's in.

So what you're trying now won't be successful yet. A temporary option would be to put the Data into a DataAdapter as that add technique is already XYZ dataset (array) aware.

There is no current mailing list for version info (I'll note that as a request) but latest releases are listed at:
http://www.steema.com/support/versions.html

Regards,
Marc Meumann
Steema Support

Mark
Newbie
Newbie
Posts: 12
Joined: Mon Jan 26, 2004 5:00 am
Location: Ellicott City, MD

How to add arrays to colorgrid?

Post by Mark » Mon Jan 26, 2004 11:56 pm

Marc,

Because I could no longer get support while still evaluating TeeChart, I spent the bucks and bought TeeChart and Pro Support.

I have downloaded and installed the "late January" release. I do not see where the Add for colorgrid has been overloaded to support arrays.

I need to plot a color spectrogram and do it very quickly in real-time. I need to update (scroll) the spectrogram as new data arrives.

What advice do you have for me? Should I continue to add each point individually?

Thanks,
John

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Jan 27, 2004 11:12 am

Hello John,

The 'late January' release is not yet available but it is imminent. The last release was made available 24th December.

The support for XYZ arrays is in for the next update. The other alternative was to use DataAdapters that already support (indirectly) the array approach ...that would be the way to test the approach in the meantime should you wish to.

Regards,
Marc Meumann
Steema Support

Post Reply