ExportToStream/Image not showing series data

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

ExportToStream/Image not showing series data

Post by greggorob64 » Fri Aug 28, 2015 1:08 pm

Im having an issue:

When I use ExportToStream or ExportToImage, I am not setting series data. When you look at the output, the Axis are setup, and properly marked, but there's just no samples on the screen at all.

A few important notes:

-It only happens when I use the overload where you specify width and height.
-I never displayed the graph. I assembled it in code, then called export. It was never visible on the screen
-It doesn't matter if i do export to stream or file

And I'm HOPING this isn't related, but i'm using a modified lightning chart. This chart has changes so that the sample data is coming from an unmanaged buffer. I don't think this is related on account of the fact that it works with the 'export' overload with no height\width data.

Below are two images. One that worked (did not specify width\height), and one that did not (width\height)

Please help!


Here are the function i'm using for export to stream or image, with overloads for width\height

Code: Select all

      public void ExportImage(string filename)
      {
         this.PrimaryChart.SaveToFile(filename);
      }
      public void ExportImage(string filename, int width, int height)
      {
         this.PrimaryChart.SaveToFile(filename, width, height);
      }
      public Image ExportToStream(int width, int height)
      {
         var stream = new MemoryStream();
         this.PrimaryChart.SaveToStream(stream, TargetImageFormat.Bmp, width, height);
         var image = Image.FromStream(stream);
         return image;
      }
      public Image ExportToStream()
      {
         var stream = new MemoryStream();
         this.PrimaryChart.SaveToStream(stream, TargetImageFormat.Bmp);
         var image = Image.FromStream(stream);
         return image;
      }


Image
Image

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: ExportToStream/Image not showing series data

Post by ArctionPasi » Mon Aug 31, 2015 12:06 pm

Now that's a really difficult question to answer.

Could you please make a simplified VS project with our latest official dlls (6.5.2) and test if it works wrong. If it does, please send the project to us...
LightningChart Support Team, PT

Post Reply