Put Image

Thread is closed for posting
4 posts, 0 answers
  1. Carlos
    Carlos avatar
    2 posts
    Member since:
    Jun 2004

    Posted 04 Jun 2008 Link to this post

    Hi,

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

    Thanks,

    Capa
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 05 Jun 2008 Link to this post

    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
  3. Carlos
    Carlos avatar
    2 posts
    Member since:
    Jun 2004

    Posted 05 Jun 2008 Link to this post

    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
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 06 Jun 2008 Link to this post

    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
Back to Top