We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ChartCustomPoint with image

Thread ID:





97142 Nov 2,2010 07:34 AM UTC Nov 5,2010 07:21 AM UTC WinForms 2
Tags: Chart
Domenico Mozzone
Asked On November 2, 2010 07:34 AM UTC

Dear Support,
I'm trying to add ChartCustomPoints to a Line Chart using following code snippet, but nothing is drawn.

ChartImageCollection m_Imgs = new ChartImageCollection(this.imageList1.Images);

ChartCustomPoint cp = new ChartCustomPoint();
p.Text = "text";
cp.XValue = 10;
cp.YValue = 10;
cp.Images = m_Imgs;
cp.Symbol.ImageIndex = 0;

cp.Alignment = ChartTextOrientation.Smart;

The imageList1 is
private System.Windows.Forms.ImageList imageList1;
filled with some png with following attribs
ColorDepth = Depth32bit,
ImageSize = 24x24

Where's my mistake?

Best regards

Domenico Mozzone
Setteidea - Italy

Vijayabharathi K [Syncfusion]
Replied On November 2, 2010 10:31 AM UTC

Hi Setteidea,

Thank you for using Syncfusion products.

You can add image type to symbol property of custom points. We suggest you to set “ChartSymbolShape.Image” to symbol property of chart custom points. Kindly find the code snippet below to achieve this,

cp.Images = new ChartImageCollection(this.imageList1.Images);
cp.Symbol.Shape = ChartSymbolShape.Image; // Set Image to shape property.
cp.Symbol.ImageIndex = 0;
cp.Symbol.Size = new Size(24, 24);

Let me know if you have any other concerns.

Vijayabharathi K

Domenico Mozzone
Replied On November 5, 2010 07:21 AM UTC

Thank you very much,
problem solved.

Domenico Mozzone
Setteidea srl - Italy


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon