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

Rad Chart background image

3 Answers 216 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
talha
Top achievements
Rank 1
talha asked on 14 Sep 2010, 10:26 AM
hello,

can you please guide me on how to set an image on to a chart background, ive tried everything but im unable to set a background to my chart it always shows blank, do also please guide me on where to put the image file in order to reference it.

thanks

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 15 Sep 2010, 02:51 PM
Hi talha,

Thank you for contacting us. To set an image as background of your chart do the following:
  1. Add new folder to your Web Site in Visual Studio. Paste your image there. In my code snippet below the folder is named Images.
  2. Add this code snippet in your Default.aspx between <telerik:radChart> and </telerik:radChart>
    <Appearance FillStyle-FillSettings-BackgroundImage="~/Images/Penguins.jpg" FillStyle-FillType="Image"></Appearance>
     
Hope this guides you appropriately.

All the best,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Walther Siksma
Top achievements
Rank 2
answered on 25 Sep 2014, 10:56 AM
Is there a way to do this in code behind as well? I build the graphs dynamically in code and then add them to a placeholder.  I would like to set a background image to the radhtmlchart as well.   did find the chart.Appearance.FillStyle object, but this contains backgroundcolor and viewstate properties only. 
thnx!
0
Danail Vasilev
Telerik team
answered on 29 Sep 2014, 08:11 AM
Hi Walther,

I can suggest that you do the following:
  - Leave the transparent background color of the chart's plot area.
  - Wrap the chart inside a div element.
  - Set the desired background image to the chart's wrapper.

For example:
CSS:
<style>
    .chartWrapper {
        width: 600px;
        height: 400px;
        background-image: url('some-background-image.png');
    }
</style>
ASPX:
        <div class="chartWrapper">
            <telerik:RadHtmlChart runat="server" ID="ColumnChart1" Width="600px" Height="400px">
...
            </telerik:RadHtmlChart>
        </div>


Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Sharepoint Integration
Asked by
talha
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Walther Siksma
Top achievements
Rank 2
Danail Vasilev
Telerik team
Share this question
or