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

Put Image

3 Answers 51 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 04 Jun 2008, 08:07 PM
Hi,

How can i put a customized image to a serie depending on the serie value?

Thanks,

Capa

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 05 Jun 2008, 11:48 AM
Hi Carlos Perez,

We have attached a sample application that demonstrates how you could customize the bar series items depending on the series item value.

Hope this helps.


Greetings,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Carlos
Top achievements
Rank 1
answered on 05 Jun 2008, 08:05 PM
thank you very much by example.

It is possible that I could put a picture at the top of each column?.


Example

|             O
|   O      __
|   __     |   |
|  |   |     |   |
|  |   |     |   |
|----------

Where    O     means the picture.

Thanks you very much.

Capa
0
Giuseppe
Telerik team
answered on 06 Jun 2008, 06:34 AM
Hello Carlos Perez,

You can use the same approach (with the BackgroundImage) to customize the series item label that is placed above the bars like this:

protected void RadChart1_ItemDataBound(object sender, ChartItemDataBoundEventArgs e) 
    if ((double)e.DataItem <= 5) 
    { 
        e.SeriesItem.Label.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Image; 
        e.SeriesItem.Label.Appearance.FillStyle.FillSettings.BackgroundImage = "green.jpg"
    } 
    else 
    { 
        e.SeriesItem.Label.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Image; 
        e.SeriesItem.Label.Appearance.FillStyle.FillSettings.BackgroundImage = "red.jpg"
    } 


Hope this will work for your scenario.


Best wishes,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Carlos
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Carlos
Top achievements
Rank 1
Share this question
or