Nevron .NET Vision Documentation
Rendering to Bitmap

Nevron Chart for .NET can render in a .NET bitmap which allows you to implement image export capabilities in your WinForms or WebForms application.


This function accepts a .NET Bitmap object where the chart will render to. The following code will generate a .png file from the current chart displayed by the control:

Copy Code
Bitmap bitmap = new Bitmap(200, 200, PixelFormat.Format24bppRgb);
chartControl.ImageExporter.RenderToBitmap(bitmap, false);
bitmap.Save("c:\\temp\\chartimage.png", ImageFormat.Png);
Visual Basic
Copy Code
Dim bitmap  As Bitmap = New Bitmap(200, 200, PixelFormat.Format24bppRgb)
chartControl.ImageExporter.RenderToBitmap(bitmap, False)
bitmap.Save("c:\temp\chartimage.png", ImageFormat.Png)

The control will automatically render with proper dimensions (synchronized with the dimensions of the passed bitmap). When you pass true to the second parameter the control will render a grayscale image.

See Also



©2019. Nevron Software LLC.

Send Feedback