Nebulous Puffy Marshmallows
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

data-forge-plot

0.1.11 • Public • Published

data-forge-plot

The forgiving plotting API designed for use with Data-Forge.

Use Data-Forge Plot to quickly and conveniently render charts from your data in JavaScript or TypeScript. It is an interface to other JS charting libraries such as C3.

Why not do your data wrangling, analysis and visualization entirely in JavaScript? To support my effort please buy or help promote my book Data Wrangling with JavaScript.

Or check out my blog: The Data Wrangler.

Do your prototyping and exploratory data analysis in JavaScript with Data-Forge Notebook.

THIS JS LIBRARY IS A WORK IN PROGRESS

If you want to understand and give feedback on this new API, please first read my introductory blog post.

Please join the conversation on Gitter

Project Goals

  • To go as simple and conveniently as possible from a series or dataframe to chart.
  • To be able to output charts and visualizations directly from Node.js to image files.
  • To be able to export an web-based interactive chart from Node.js that could easily be hosted under a web-server.
  • To integrate with a Juptyr Notebook style application for Node.js / JavaScript.
  • To be able to serialize a chart to JSON and then reinstantiate it from the JSON in a web-app.
  • To separate chart definition and data definition so that chart definitions can easily be reused with different data sets.
  • To configure charts either via JSON or via the fluent API, ultimately though it should be able to be expressed in JSON but with fluent API as syntactic sugar.

Usage

Some instructions for using Data-Forge Plot. These instructions are for JavaScript but this library also works in TypeScript.

Install

npm install --save data-forge data-forge-plot

Setup

    const dataForge = require('data-forge');
    require('data-forge-plot'); // Extends Data-Forge with the 'plot' function.

Rendering a chart from a CSV file

    const dataFrame = await dataForge.readFile("my-data-file.csv").parseCSV();
    await dataFrame.plot().renderImage("my-chart.png");

More docs coming soon

It's early days for DFP. I'll be working on more docs soon.

To see examples of API usage please see my blog posts:

There's also a first example of DFP here (JavaScript):

https://github.com/data-forge/data-forge-plot-first-example

There's a bunch of TypeScript examples in DFP's GitHub repo:

https://github.com/data-forge/data-forge-plot/tree/master/examples/c3

Keywords

none

install

npm i data-forge-plot

Downloadsweekly downloads

80

version

0.1.11

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability