Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save amelieykw/c64ca23faa0d593f06bad0f8a1bfcc27 to your computer and use it in GitHub Desktop.
Save amelieykw/c64ca23faa0d593f06bad0f8a1bfcc27 to your computer and use it in GitHub Desktop.
[Highcharts - 01 - Frequently asked questions] #Highcharts #questions #server #useHighchartsWithServer #useFeaturesFromHighstockInHighcharts #addDataTableToTheExportedChart

If you don't care about the export, a data table is simply added by the export-data module and a simple option, exporting.showTable.

However this table doesn't support exporting to SVG or other image formats, but with a little programming on top of the Highcharts data and drawing API you can draw a table.

See our jsFiddle demo for source code and live example.

Yes, most Highstock features can be applied to standard charts.

From a licensing point of view, using features of the Stock package obviously requires a Highstock license.

Technically Highcharts Stock is implemented as a set of plugins for Highcharts. The entire code base for Highcharts is included in the Stock package, and you can invoke a chart using Highcharts.Chart and enable certain features that are normally associated with a stock chart.

Examples:

Highcharts runs entirely on the client, and works with any web server that can deliver HTML and JavaScript content.

Whether your server is PHP, Perl, ASP, ASP.NET, Node.js or whatever, Highcharts is completely ignorant of it.

The HTML/JavaScript files may also be loaded from the file system, which is the case in app platforms where Highcharts is loaded in a web component inside the app.

The best practice in integrating Highcharts may differ from system to system. You should follow the common practice for handing JavaScript on your specific system.

  • Some prefer to serve a clean JSON or JavaScript file with the Highcharts setup
  • others to write the JavaScript setup directly to the web page.

Data

  1. can be loaded in form of JSON or CSV files (see Working with data in the left menu)
  2. printed inline in the chart setup
  3. When working with a databased powered backend, it may be cleaner to have your server system serve JSON or CSV files.

a live connection to the server

For a live connection to the server, you may :

  • set up the web page to load new data over XHR
  • set up direct communicatations using WebSockets With the new data arriving in the browser, the chart can be kept updated through various dynamic endpoints like Series.addPoint(), Point.update(), Chart.addSeries(), Chart.update() etc.

Before you start to set up a complex backend, you may want to check out www.highcharts.com/download whether someone has created a wrapper for your specific system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment