This is a migrated thread and some comments may be shown as answers.

Personalized point mark

1 Answer 48 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Quantesys IT
Top achievements
Rank 1
Quantesys IT asked on 15 Oct 2009, 09:54 AM

Hello,
I posted a message in an existing thread but the thread is noticed as "Answered". I don't no if you check all threads or only the opened ones.

I try to personalize the point mark images of my Chart (server-side) but the modifications are not applied correctly (the default point mark icons are not replaced).
My code is based on a sample code that I found in another Thread:

protected void Page_Load(object sender, EventArgs e)       
{       
    RadChart2.BeforeLayout += new EventHandler<EventArgs>(RadChart2_BeforeLayout);       
}       
   
void RadChart2_BeforeLayout(object sender, EventArgs e)       
{       
    foreach (ChartSeriesItem item in RadChart2.Series[0].Items)       
    {       
        string imageUrl = "MyImage.jpg";       
   
        if(item.XValue > 5)       
            imageUrl = "MyImage2.jpg";       
   
        item.PointAppearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Image;       
        item.PointAppearance.FillStyle.FillSettings.BackgroundImage = imageUrl;       
    }       
}      

I try with different image format : PNG, JPG... but my point marks stay with the default images. I am sure that my URL is well-formed because I use it on other pages of my website without problems.

Thank you for your help.

Best regards,
Joël

1 Answer, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 20 Oct 2009, 07:33 AM
Hello Joël ,

Please check the other forum thread, where you posted this question. You will find an example attached to my reply there.

Best regards,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Chart (Obsolete)
Asked by
Quantesys IT
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or