dotnetCHARTING Send comments on this topic.
FileManager Property
See Also  Example
dotnetCHARTING Namespace > Chart Class : FileManager Property


Gets or sets the chart's instance of the FileManager which facilitates saving images.

Syntax

Visual Basic (Declaration) 
Public Property FileManager As FileManager
Visual Basic (Usage)Copy Code
Dim instance As Chart
Dim value As FileManager
 
instance.FileManager = value
 
value = instance.FileManager
C# 
public FileManager FileManager {get; set;}

Example

C#Copy Code
//Get the bitmap and add a line to the image
Bitmap bmp = Chart.GetChartBitmap();
Graphics g = Graphics.FromImage(bmp);
g.DrawLine(Pens.Red,36,150,480,150);
g.DrawString(
"This is my line",new Font("Arial",12,FontStyle.Bold),new SolidBrush(Color.Black),new Point(40,150));
g.Dispose();

//Save the image and set the image path to ImageUrl.
string ImagePath = Chart.FileManager.SaveImage(bmp);
Image1.ImageUrl = ImagePath;
    
Visual BasicCopy Code
'Get the bitmap and add a line to the image
Dim bmp As Bitmap = Chart.GetChartBitmap()
Dim g As Graphics = Graphics.FromImage(bmp)
g.DrawLine(Pens.Red, 36, 150, 480, 150)
g.DrawString("This is my line", new Font("Arial", 12, FontStyle.Bold), new SolidBrush(Color.Black), new PointF(40F, 150F))
g.Dispose()

'Save the image and set the image path to ImageUrl.
Dim ImagePath As String = Chart.FileManager.SaveImage(bmp)
Image1.ImageUrl = ImagePath

See Also

© 2018 All Rights Reserved.