The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have a column chart which has a couple of title lines and a legend box. I've written some code to FTP the image of the chart periodically. The bitmap that is created by ChartControl.Draw and/pr ChartControl.DrawThumbnail (I've tried both) only contains the actual chart area it does not contain the titles or the legend. How do I get the bitmap to include the titles and legend? (version 7.303.0.20)
VVVenkata Vijayaraj B Syncfusion Team September 25, 2009 10:45 AM UTC
Hi Matt,
Please use the below code to save the whole Chart with Title and Legend in bmp format.
//Filename with the location where you want to save the image. string fileName = Application.StartupPath + "\\ExportChart"; string exportFileName = fileName + ".bmp";
That looks like it will just save an exact copy of the chart - but I need to be able to specify the dimensions of the bitmap. Eg. my chart might be 640x480 pixels in size, but I might just want a thumbnail of 200 pixels wide.
VVVenkata Vijayaraj B Syncfusion Team September 28, 2009 11:02 AM UTC
Hi Matt,
Sorry for the delay in responding.
We are not having support to mention the size of the image while saving Chart using SaveImage method, but this can be
done by using the following workaround.
Size currSize = chartControl1.Size; chartControl1.Size = new Size(200, 200); // mention here the desired size. chartControl1.SaveImage("MyChart.bmp"); chartControl1.Size = currSize;