Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:09:22+00:00 2026-06-14T02:09:22+00:00

Basically, this is a huge web-service based web application where hundreds of graphs can

  • 0

Basically, this is a huge web-service based web application where hundreds of graphs can be displayed. I have just got involved in the project and need to implement a graph legend onto these dynamically generated graphs.

I know my image is loaded because when I enter an incorrect/random path I get the error:

enter image description here

Currently, the text from the CSS displays but images cannot be entered in it’s place because it only seems to allow one set of tags. I have already tried placing it as img in the display as well as changing Z-indexes and positions but it just doesn’t show anything, except for the text.

enter image description here

Here is the relevant CSS (I’ve already tried using background instead of backgroundImage btw):

credits: {
    enabled: true,
    text: 'Highcharts.com',
    href: 'http://www.highcharts.com',
    position: {
        align: 'right',
        x: -10,
        verticalAlign: 'bottom',
        y: -5
    },
    style: {
        cursor: 'pointer',
        color: '#909090',
        fontSize: '10px',
        backgroundImage: 'url("/image/example")'
    }   
}

and the potentially relevant JavaScript:

if (credits.enabled && !chart.credits) {
        creditsHref = credits.href;
    chart.credits = renderer.text(
        credits.text,
        0,
    0
    )
    .on('click', function () {
        if (creditsHref) {
            location.href = creditsHref;
        }
    })
    .attr({
        align: credits.position.align,
        zIndex: 8
    })
    .css(credits.style)
    .add()
    .align(credits.position);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:09:23+00:00Added an answer on June 14, 2026 at 2:09 am

    UPDATE 2:

    First off, you need to change the numbers to fit your situation (width, height, x, y, etc). Looks like you changed your chart type as well. To reset back to spline chart use this:

       chart: {
           renderTo: 'your-container-id', // chart div id
           type: 'spline', // your chart type
    ....
    

    Next, we need to make sure that the chart DOES NOT resize on browser resize by setting the width: <div id="your-container-id" style="width:1000px;"></div> or set to whatever size needed.

    Then, we need to set the right margin to make sure we have negative space to the right.

    chart: {
     renderTo: 'your-container-id', // chart div id
     type: 'spline', // your chart type
     margin: [ 50, 150, 100, 80 ], // top, right, bottom, left. leaves 150px negative space on right side of chart. adjust as needed
    ....
    

    Finally, we render the image to the right side of the chart:

    chart: {
     renderTo: 'your-container-id', // chart div id
     type: 'spline', // your chart type
     margin: [ 50, 150, 100, 80 ], // top, right, bottom, left. leaves 150px negative space on right side of chart. adjust as needed
     events: {
       load: function() {
         this.renderer.image('http://upload.wikimedia.org/wikipedia/commons/e/ec/Happy_smiley_face.png', 900, 105, 100, 100).add(); // x=900px to move image off chart (approx div width minus right margin) adjust as needed
           }
         }   
    ....
    

    If you need your charts resizing, then we need to write a function to re-position the graphic on resize. But that’s another chapter.

    If I’m still in the wrong ballpark, please elaborate on the desired outcome.

    UPDATE 1:

    You can not add backgrounds to the credits section of the chart. i generally disable it unless we tag it with our company name and link. What you need is to use the legend functionality or if that is not what you need, use a custom image with a wide margin.

    Check out this simple fiddle I snagged from the highcharts site and modified to fit what I was trying to explain: jsFiddle Link
    OK, whats going on is:
    Add standard legend to chart with hide/show functionality:

     legend: {
      layout: 'vertical', // stacked legend. can also be horizontal and moved to bottom for a clean linear legend
      backgroundColor: '#FFFFFF',
      align: 'left',
      verticalAlign: 'top',
      x: 380, // move to right side of chart
      y: 200, // drop down 200px
      floating: true, // enabled for positioning
      shadow: true
     },
    

    Add background image all the way to the right:

     chart: {
       renderTo: 'container',
       type: 'column',
       margin: [ 50, 150, 100, 80 ], // wide right margin to allow image outside chart
       events: {
         load: function() {
            this.renderer.image('http://upload.wikimedia.org/wikipedia/commons/e/ec/Happy_smiley_face.png', 400, 105, 100, 100).add(); // x=400px to move image off chart
       }
     }   
    }
    

    NOTE: I set the width of the chart container to 500px.

    I hope this clears some things up.

    ORIGINAL ANSWER:

    i just updated all our company charts to highcharts last week.. use this for your background image

    chart: {
                renderTo: 'container',   // where does the chart go?
                type: 'column',   // what kind of chart is it?
                margin: [ 50, 50, 100, 80 ],   // margins between outer edge and plot area
                events: {
                    load: function() {
                        this.renderer.image('http://www.domain.com/images/logo.jpg', 150, 105, 545, 141).add();  // add image(url, x, y, w, h)
                    }
                }
            },
    

    the image parameters are as follows: image(url, x, y, width, height);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this huge tree that is basically a big switch/case with string
I have written a service for JIRA(a web application runs in tomcat) which runs
I have a web-application in java, spring framework, hibernate on tomcat, that has basically
Basically have many huge delimited files that I know I can import as a
I have (basically) this code - <script type=text/javascript language=javascript> $(document).ready(function() { $(#loadDiv).load(mypage.html, function(){ alert($(#someText).text())
The criteria is basically this: folders will exist for about 24-48hrs folders names can
The problem is basically this, in python's gobject and gtk bindings. Assume we have
I currently have this huge and slow code that takes forever to run.... Im
I'm about to develop this small website, its basically a simple web app to
Hi I am working with google maps API I have this huge code, so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.