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 8166753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:59:14+00:00 2026-06-06T19:59:14+00:00

I have a chart in Highcharts (to be more specific: it’s a Highstocks chart,

  • 0

I have a chart in Highcharts (to be more specific: it’s a Highstocks chart, candlesticks type) and now I want to add some SVG shapes to it.

I know there is this renderer object, but it only accepts x- and y-coordinates relative to the canvas.

What I need is to add some shapes at a specific TIME (xAxis), so I either need it to accept x/y vales as the chart coordinates (not the canvas coordinates) (which I clearly doubt is possible) or we need to get the x/y-canvas-position of a specific point inside the chart.

Is there any way to do this?

  • 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-06T19:59:17+00:00Added an answer on June 6, 2026 at 7:59 pm

    To draw SVG shape and move it with the zoom , there is two ways i used the first one just take it as an idea and see if you can do it better than me , second way always works

    the first way

    Get the x coordinate for this shape :
    as you know highstock use unix time , so lets say you want to add your shape at X data = 1326844540000 , now get the x position for 1326844540000 according to series[i] i will assume that you have one series so use series[0] , here is how you get the x-coor :

                   $.each(chart.series[0].points, function(index,value){
                             if(value.category == 1326847170000 ) 
                             console.log(this.plotX) ;
                     });
    

    now use .append() to add your SVG :

       var myrect = $(".highcharts-series-group") ; 
        $(myrect).append(<your svg goes here with 
                x ="you have it from the previous code " y="")
    

    this code will go inside (xAxis – events – setExtremes ) And o nchart load as well

    the recommended way

    the recommended and guranteed way is to create a flag give it an id and then you can do what ever you want by editing the attr() of this flag

    UPDATE

    • if you add a flag to your chart flags by default transform when zooming so you don’t need to be worry about moving your element every time rangeselector or zoom change .
    • if you give your flag id it will be easily selected using jquery
    • see this :
      enter image description here
    • the fourth path in the highlighted <g> tag is what you will edit to draw what ever you want
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have what I'd consider a relatively simple Highcharts chart that I want to
I have a rendered Highcharts chart on a website and I need to empty
I have a very simple highcharts js chart, which has dates on x-axis and
I have built some highcharts charts and I am displaying them one at a
I have this chart in which if any point in graphs exceeds specific limit
I have horizontal bar chart with Highcharts . How can I make each bar
I have a chart that looks like this: I want to remove the text
I'm trying to do a datetime chart in Highcharts, but only some of my
Highcharts doesn't really do error reporting, as some of you have probably found out.
I have the following function which constructs one or more y-axes for a Highcharts

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.