Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including data-forge-to-highstock with all npm packages installed. Try it out:

var dataForgeToHighstock = require("data-forge-to-highstock")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

data-forge-to-highstock v0.0.18

Data-Forge plugin for transforming data to the Highstock format.

data-forge-to-highstock

Data-Forge plugin for transforming data to the Highstock format.

Installation

You need Data-Forge to use this plugin.

For Nodejs:

npm install --save data-forge-to-highstock

For the browser:

bower install --save data-forge-to-highstock

Setup

For Nodejs:

var dataForge = require('data-forge');
dataForge.use(require('data-forge-to-highstock'));

For the browser:

<script src="bower_components/data-forge/data-forge.js"></script>
<script src="bower_components/data-forge-to-highstock/to-highstock.dist.js"></script>

Usage

var dataFrame = ... some data ...
var highstockData = dataFrame.toHighstock();

Or

var highstockData = dataFrame.toHighstockOHLC();

You now use highstockData as an input to your Highstock chart.

For more information

Please see the related article about graphing financial data with Data-Forge and Highstock.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free