Tips for retrieving information from a highstock chart

Imagine I have a sample highstock chart on my website, similar to the one at this link. Is there a way to extract the data from the chart itself, even if the data used for creating the chart is not accessible to others?

<img src="http://www.highcharts.com/stock/demo/basic-line">

Answer №1

Indeed, each chart is stored within HighChart's Highcharts.charts array. The webpage you provided contains a single chart:

Highcharts.charts
-> [ z.Chart ]

This particular object holds all the data for that chart. By selecting it from the Highcharts.charts array using index 0:

Highcharts.charts[0]
-> z.Chart { ... }

All necessary information can be found here. Each chart object has a series property, which is an array containing data for each series displayed on the chart. Within each series, there is a data property holding the actual data, and the name property indicating the series name.

For instance:

Highcharts.charts[0].series[0].name
-> "APPL"
Highcharts.charts[0].series[0].data
-> Array[1774]

The layout of HighCharts' documentation mirrors the structure of the JavaScript object it generates. You can explore it further here: http://api.highcharts.com/highcharts.

Answer №2

By downloading the page containing the chart, you can conveniently retrieve the data stored within the main *.html file.

Although it may not be the precise data itself, but rather the coordinates of each point on the chart. Scaling it appropriately will help you obtain the desired information.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

javascript create smooth transitions when navigating between different pages

As a newcomer to JS, I am currently working on creating a website with an introduction animation. My goal is to have this animation displayed on a separate page and once it reaches the end, automatically redirect to the next webpage. <body onload="setT ...

Emphasizing hyperlinks according to the user's scrolling location

Currently, I am attempting to create a feature where links are highlighted when the user scrolls over the corresponding section on the page. However, there seems to be an issue with the functionality as Link 2 is highlighting instead of Link 1 as intende ...

How can you assign a strokeStyle color to a Canvas using a CSS property?

Our team is currently working on an Angular2 / Ionic 2 project where we have implemented a HTML Canvas element that allows users to draw on it. One challenge we are facing is how to set the Canvas strokeStyle property using a color provided by a CSS style. ...

The value of the checked input with the name `nameofinput` is currently not defined

I'm having trouble passing the input value to another page. $( this ).attr( "href", '?module=module_progress_report&Subject='+ $('input[name=subject]:checked').val()+ '&Centre_Selected_ID='+ encodeURIComponen ...

The issue of double submission persists, with the prevention of the default action

I'm in need of assistance. Within my form, I have two buttons displayed on the page: "Save" and "Publish". Below is the corresponding HTML code: <button type="submit" class="button">Save</button> <button type="button" class="button" n ...

Looking to filter JSON data with Vuejs?

I am trying to search through this JSON array for a specific key: track_order The data I receive from the server is stored in the orders variable: "records": [ { "phone": "09********8", "fullName": "******", ...

What is the fewest amount of commands needed to generate a client-side Javascript code that is ready for use?

In the realm of JavaScript libraries found on Github, it has become increasingly challenging to integrate them directly into client-side projects with a simple script tag: <script src="thelibrary.js"></script> The issue arises from the browse ...

Retrieving JSON data in Perl

Struggling with accessing json values (translated from xml). foreach my $PORT (0..$#PORTS) { print Dumper $PORTS[$PORT]->{'neighbor'}; if (defined($PORTS[$PORT]->{'neighbor'}->{'wwn'}->{'$t'})) ...

"Implement highcharts redraw() method to update the chart, along with a callback function that interacts

I am working with a chart that utilizes the events.load function to draw lines based on the properties of the chart. The load function is functioning as expected, but I want to erase and redraw the lines each time the chart is redrawn, such as when hiding ...

Transfer information to firebase using a Java class and fetch a single attribute in a different activity

Firebase Database LinkI've been encountering an issue while trying to store data in Firebase using a particular code snippet. Previously, I was able to save data by creating new children under users>uid without any problems. However, now that I am att ...

Having trouble dynamically adding HTML elements in JQuery

I am dynamically adding HTML elements during runtime using an AJAX call from a JavaScript file. Currently, I am attempting to use a combo box drop-down element to display a list of data. Here is how I am trying to achieve this in my script: $("#myList") ...

Tips on updating arrow button icon when clicked using jquery

I am currently working on a project where I have a button icon that I want to change upon clicking it. I am using the following jQuery code: <script> $('div[id^="module-tab-"]').click(function(){ $(this).next('.hi').sl ...

Tips on making the form validation script operational

After developing a form alongside a form validation script to ensure that all fields are completed, the name and city sections only contain letters, while the age and phone sections solely include numbers, issues have arisen. It seems that despite the cons ...

"JQuery's selector is failing to locate elements once they have been loaded through an

I am facing an issue where jQuery selectors are not working on elements loaded from the server via Ajax requests, but they work fine in normal mode. $('#myid').change(function(){ alert('OK!'); }); <select id="myid"> <optio ...

Generating a dropdown menu from a dataset returned in JSON or XML format

I've been attempting to create a dropdown list using the food_id and food_name from the array that's returned by the Fatsecret REST API, but unfortunately, I haven't had any success. Here is my current code: <?php $base = rawurlencode(" ...

Changing the model does not automatically update the visibility of ng-show

I have a fragment of my view that simply displays a loading indicator. Html: <span class="app-loading-container"> <span class="app-loading-animation" ng-show="loading"></span> </span> When I initially load the page, the span ...

Uncover the content of a base64 encoded string and convert it into

A JSON response has been linked on the user's request to retrieve an excel document. The structure of the response is as follows: { "format": // file extn ----only xls "docTitle": //file name "document" :// base 64 encoded data } The attem ...

Issue encountered when attempting to alter the action attribute of a form: receiving an error message stating 'undefined is not a function'

I am attempting to dynamically set the action attribute of a form based on the button clicked in order to navigate away from a page. Once the action is updated, the form should be submitted and the new action carried out. Below is my jQuery function: fun ...

How can you retrieve a value in NodeJS Promise (Q) even when the promise fails?

As I dive into the world of promises in my NodeJS projects, I encountered a challenging situation. Despite reading the Promises/A+ spec and conducting extensive searches online, I struggled to find an elegant solution for accessing a value generated within ...

Guide to incorporating trading-vue-js into a Vue CLI project

Recently, I decided to explore the functionality of trading-vue-js and found it quite interesting. I managed to successfully run the test examples for trading-vue-js without any issues. The steps I took were as follows: nmp install trading-vue-js I then ...