The forgiving plotting API designed for use with Data-Forge.
Or check out my blog: The Data Wrangler.
Please join the conversation on Gitter
As of version 0.4.0 the Nightmare/Electron depenency has been removed along with the
renderImage function has been moved to the separate library @data-forge-plot/render. This has been removed due to the size that the Electron dependency adds to this package. In the future you you will have to install the separate package to render a plot to an image.
Please note that the sample code below to see how the new library is installed and required to access the
- To simply and conveniently from a series or dataframe to chart.
- To create charts and visualizations in Node.js and the browser.
- To export web-based interactive charts that can easily be hosted under a web-server.
- To be able to serialize a chart to JSON and then reinstantiate it from the JSON in a web-app.
- To separate configuration and data definition to make it easy to reuse charts.
- To configure charts in JSON or fluent API.
npm install --save data-forge data-forge-plot @data-forge-plot/render
const dataForge = require('data-forge'); require('data-forge-fs'); // Extends Data-Forge with 'readFile' function. require('data-forge-plot'); // Extends Data-Forge with the 'plot' function. require('@data-forge-plot/render'); // Extends Data-Forge Plot with the 'renderImage' function.
Rendering a chart from a CSV file to an image file
const dataFrame = await dataForge.readFile("my-data-file.csv").parseCSV(); await dataFrame.plot().renderImage("my-chart.png");
Exporting a chart from a CSV file to an interactive web visualization
const dataFrame = await dataForge.readFile("my-data-file.csv").parseCSV(); await dataFrame.plot().exportWeb("./output-path");
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:
And a bunch of examples in this repo: