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

  • Home
  • SEARCH
  • 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 9013293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:13:32+00:00 2026-06-16T03:13:32+00:00

I have a HighStock chart that is pulling in some OHLC data and creating

  • 0

I have a HighStock chart that is pulling in some OHLC data and creating a chart with 3 series – 1 candlestick, 1 volume, and 1 set of flags. This all works fine.

I want to add some custom trend lines to the chart. I will determine the points and do the paths based on custom logic.

The problem is that when I use the Renderer from the Chart to draw my path, the path is not connected to the underlying chart. As the chart date range is modified and/or new points are added to the primary series, the placement and size of my custom path remains unchanged. It is constant.

I need the location/endpoints of the custom path to be tied to the datapoints of the chart, not the coordinates of the svg drawing. Is there a way to accomplish this?

Here is the portion of the code that is adding a simple path from pointa to pointb. The path renders as expected but is then static:

    buildPath: function(pointa, pointb){
        this.myChart.renderer.path(this.buildPathArray(pointa,pointb))
            .attr({
                'stroke-width': 2,
                stroke: 'red'
            }).add();
    },
    buildPathArray: function(pointa, pointb){
        var pathArray = [];
        pathArray.push('M');
        pathArray.push(pointa.plotX);
        pathArray.push(pointa.plotClose);
        pathArray.push('L');
        pathArray.push(pointb.plotX);
        pathArray.push(pointb.plotClose);
        pathArray.push('Z');
        return pathArray;
    }

Per request, I created a JS Fiddle that demonstrates the general issue.

Any help is much appreciated.

  • 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-16T03:13:34+00:00Added an answer on June 16, 2026 at 3:13 am

    SOLVED

    This doesn’t seem to come for free with Highcharts. Or if it does I did not find out the technique.

    I had to use both the load and redraw events of the chart object contained in my StockChart.

    On load, I draw the initial paths, aligned with the Point objects involved in my trending lines. As I build these path objects (SVGElement objects containing the genuine SVG path elements) I keep track of them in an array.

    On redraw, I have to both destroy the old trend lines and create new ones. So I loop over my array of old elements and remove each from their own parentNode. Then I draw a fresh version of my trend lines based on the newly plotted location of each of my relevant Point objects.

    The end result is that on each redraw event, the lines appear to move with the chart, when they’re really being destroyed and recreated.

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

Sidebar

Related Questions

I have a series of json data in a highstock chart and I want
I have Highstock chart with flags. Everything is fine but I wanted to change
I have a very large data set that I'd like to craft into a
I have a Highstock chart with custom legend box and checkboxes. Every thing is
Have I in some way delete this Task or it is self-destroyed? Task.Factory.StartNew(() =>
Is it possible to have 2 yAxis in a highstock chart from highcharts one
Below is the code that I now have. This gives me a 2 dimensional
I'm using the HighStock version of HighCharts to create a series of data in
I have a question regarding Highstock. I am having a data recording Engine Load
I have irregular data. Chart draws well when I use highcharts : $(function() {

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.