Jump to content
Software FX Community

Using in Console applications


User (Legacy)

Recommended Posts

Hello, all

I am trying to use Chart FX for Win Forms in a console application:

Chart chart = new Chart();

chart.OpenData( COD.Values, 1, 5 );

chart.Value[0,0] = 30;

chart.Value[0,1] = 76;

chart.Value[0,2] = 43.5;

chart.Value[0,3] = 90.75;

chart.Value[0,4] = 12.5;

chart.Value[0,5] = 100;

chart.CloseData( COD.Values );

chart.FileMask = FileMask.All;

chart.Export( FileFormat.Bitmap, "c:\\example.bmp" );

But when I open the resulting example.bmp file, I see the black square only.

Why? How can I use this chart component in a console application?

Thanks

Link to comment
Share on other sites

The following code will do what you are looking for:

Chart chart = new Chart();

chart.OpenData( COD.Values, 1, 5 );

chart.Value[0,0] = 30;

chart.Value[0,1] = 76;

chart.Value[0,2] = 43.5;

chart.Value[0,3] = 90.75;

chart.Value[0,4] = 12.5;

chart.Value[0,5] = 100;

chart.CloseData( COD.Values );

chart.Width = 200;

chart.Height = 400;

chart.UpdateSizeNow();

chart.Export( FileFormat.Bitmap, "c:\\example.bmp" ); }

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...