You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

csv-chart-generator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-chart-generator

A tool for visualizing data from CSV files as line charts and converting the charts to a PDF document.

1.0.0
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

CSV Data Visualization and PDF Conversion

This project is a tool for visualizing data from CSV files as line charts and converting the charts to a PDF document. The CSV data is expected to contain one time column and three columns of numerical values representing the x, y, and z coordinates. The program reads the CSV data, generates line charts for each coordinate using the Chart.js library, and combines the charts into a single PDF document.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To run this project, you will need to have Node.js and npm installed on your machine. You can check if you have these tools installed by running the following commands in the terminal:

node -v
npm -v

If you do not have Node.js and npm installed, you can download and install them from the official website (https://nodejs.org/).

Installing

To install the project, follow these steps:

  • Clone the repository to your local machine:
git clone https://github.com/SeeknnDestroy/generate-line-chart-pdf.git
  • Navigate to the project directory:
cd generate-line-chart-pdf
  • Install the project dependencies:
npm install

Usage

To use this project, follow these steps:

  • Provide a folder containing CSV files with the data you want to visualize. The CSV files should have the following format:
time,x,y,z
<miliseconds>,<numeric value>,<numeric value>,<numeric value>
<miliseconds>,<numeric value>,<numeric value>,<numeric value>
...

The first row should not contain the column names, rows should contain the data values. The time column should contain the time data in number of milliseconds since January 1, 1970. x, y, and z columns should contain numerical values. 2. In the index.js file, change the folderPath variable to the path of the folder containing your CSV files:

const folderPath = "path/to/folder";
  • Run the index.js file to generate the PDF document:
node index.js

The PDF document will be saved to a file named output.pdf in the project root directory. The PDF will have as many pages as there are CSV files in the specified folder.

FAQs

Package last updated on 23 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts