Articles in this section
Category / Section

How to display an image as the Background of ChartArea?

1 min read

 

Create a new Bitmap object with filename and set that bitmap object to the ChartAreaBackImage property exposed by the chartControl.

C#

// Get the image using OpenFileDialog box.

OpenFileDialog ofd = new OpenFileDialog();

// Retrieve the file name of the selected image

filename = ofd.FileName;

// Setting Background image for the control.

this.chartControl1.ChartAreaBackImage = new Bitmap(filename);

VB

' Get the image using OpenFileDialog box.

Dim ofd As OpenFileDialog = New OpenFileDialog()

' Retrieve the file name of the selected image

filename = ofd.FileName

' Setting Background image for the control.

Me.chartControl1.ChartAreaBackImage = New Bitmap(filename)

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied