New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-chart-exec

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-chart-exec - npm Package Compare versions

Comparing version 1.0.9 to 2.0.0

images/bar-chart-with-options.png

2

package.json
{
"name": "node-chart-exec",
"version": "1.0.9",
"version": "2.0.0",
"description": "An executable binary for creating charts in Node.js",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -9,4 +9,4 @@ # node-chart-exec

| ------ | ----------- | ---- | ------- | -------- |
| `--type` | Chart type supported by Chart.js. | `String` | `--type='line'` | `true` |
| `--options` | Choose `true` for enable options or `false` for disable options. If you enter `true` it will remove all the values from the chart. | `Boolean` | `--options=true` | `true` |
| `--type` | Chart type supported by Chart.js. Types `line`, `bar` | `String` | `--type='line'` | `true` |
| `--options` | Choose `true` for enable options or `false` for disable options. If you enter `true` it will remove all the values from the chart. | `String` | `--options='true'` | `true` |
| `--height` | Height of the canvas.| `Integer` | `--height=400` | `true` |

@@ -18,26 +18,76 @@ | `--width` | Width of the canvas. | `Integer` | `--width=400` | `true` |

## Output
### Line chart
### 1. Line chart `--type='line'`
#### With options `--options=true`
##### Command Line
```shell
$ npx node-chart-exec@1.0.8 --type='line' --options='true' --height=400 --width=400 --labels='["Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6"]' --dataset='[{"label":"Label of Chart", "data":[10, 20, 30, 40, 50, 40], "backgroundColor":"#7ACFFF", "borderColor":"#00A3FF"}]' --outputfile='output/lines-chart-with-options.png'
Node Chart Exec Started
All inputs are validated
Canvas width=400 height=400
Chart type='line' options='true' labels=["Label 1","Label 2","Label 3","Label 4","Label 5","Label 6"] output-file='output/lines-chart-with-options.png'
Dataset [1/1] label='Label of Chart' data=[10,20,30,40,50,40] background-color='#7ACFFF' border-color='#00A3FF'
Image file created at 'output/lines-chart-with-options.png'
Node Chart Exec Completed
npx node-chart-exec@2.0.0 --type='line' --options='true' --height=400 --width=400 --labels='["Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6"]' --dataset='[{"label":"Label of Chart", "data":[10, 20, 30, 40, 50, 40], "backgroundColor":"#7ACFFF", "borderColor":"#00A3FF"}]' --outputfile='output/line-chart-with-options.png'
```
##### output
![Line Chart With Options](https://github.com/gayanvoice/node-chart-exec/images/line-chart-with-options.png)
```shell
# Output
Node Chart Exec Started
All inputs are validated
Canvas width=400 height=400
Chart type='line' options='true' labels=["Label 1","Label 2","Label 3","Label 4","Label 5","Label 6"] output-file='output/line-chart-with-options.png'
Dataset [1/1] label='Label of Chart' data=[10,20,30,40,50,40] background-color='#7ACFFF' border-color='#00A3FF'
Image file created at 'output/line-chart-with-options.png'
Node Chart Exec Completed
```
#### Without options `--options=false`
##### Command Line
```shell
npx node-chart-exec@2.0.0 --type='line' --options='false' --height=400 --width=400 --labels='["Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6"]' --dataset='[{"label":"Label of Chart", "data":[10, 20, 30, 40, 50, 40], "backgroundColor":"#7ACFFF", "borderColor":"#00A3FF"}]' --outputfile='output/line-chart-with-no-options.png'
```
```shell
# Output
Node Chart Exec Started
All inputs are validated
Canvas width=400 height=400
Chart type='line' options='false' labels=["Label 1","Label 2","Label 3","Label 4","Label 5","Label 6"] output-file='output/line-chart-with-options.png'
Dataset [1/1] label='Label of Chart' data=[10,20,30,40,50,40] background-color='#7ACFFF' border-color='#00A3FF'
Image file created at 'output/line-chart-without-options.png'
Node Chart Exec Completed
```
##### Output
| `output/lines-chart-with-options.png` | `output/lines-chart-without-options.png` |
| ------------------------------------- | ---------------------------------------- |
| ![Line Chart With Options](https://github.com/gayanvoice/node-chart-exec/raw/master/images/line-chart-with-options.png) | ![Line Chart Without Options](https://github.com/gayanvoice/node-chart-exec/raw/master/images/line-chart-without-options.png) |
### 2. Bar chart `--type='bar'`
#### With options `--options=true`
##### Command Line
```shell
npx node-chart-exec@2.0.0 --type='bar' --options='true' --height=400 --width=400 --labels='["Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6"]' --dataset='[{"label":"Label of Chart", "data":[10, 20, 30, 40, 50, 40], "backgroundColor":"#7ACFFF", "borderColor":"#00A3FF"}]' --outputfile='output/bar-chart-with-options.png'
```
```shell
# Output
Node Chart Exec Started
All inputs are validated
Canvas width=400 height=400
Chart type='bar' options='true' labels=["Label 1","Label 2","Label 3","Label 4","Label 5","Label 6"] output-file='output/bar-chart-with-options.png'
Dataset [1/1] label='Label of Chart' data=[10,20,30,40,50,40] background-color='#7ACFFF' border-color='#00A3FF'
Image file created at 'output/bar-chart-with-options.png'
Node Chart Exec Completed
```
#### Without options `--options=false`
##### Command Line
```shell
npx node-chart-exec@2.0.0 --type='bar' --options='false' --height=400 --width=400 --labels='["Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6"]' --dataset='[{"label":"Label of Chart", "data":[10, 20, 30, 40, 50, 40], "backgroundColor":"#7ACFFF", "borderColor":"#00A3FF"}]' --outputfile='output/bar-chart-without-options.png'
```
```shell
# Output
Node Chart Exec Started
All inputs are validated
Canvas width=400 height=400
Chart type='bar' options='false' labels=["Label 1","Label 2","Label 3","Label 4","Label 5","Label 6"] output-file='output/bar-chart-without-options.png'
Dataset [1/1] label='Label of Chart' data=[10,20,30,40,50,40] background-color='#7ACFFF' border-color='#00A3FF'
Image file created at 'output/bar-chart-without-options.png'
```
##### Output
| `output/bar-chart-with-options.png` | `output/bar-chart-without-options.png` |
| ------------------------------------- | ---------------------------------------- |
| ![Bar Chart With Options](https://github.com/gayanvoice/node-chart-exec/raw/master/images/bar-chart-with-options.png) | ![Bar Chart Without Options](https://github.com/gayanvoice/node-chart-exec/raw/master/images/bar-chart-without-options.png) |
## Author
Written by [Gayan Kuruppu](https://github.com/gayanvoice).
## 📄 License
- Repository: [gayanvoice/node-chart-exec](https://github.com/gayanvoice/node-chart-exec)
- NPM: [node-chart-exec](https://www.npmjs.com/package/node-chart-exec)
- Code: [MIT](./LICENSE) © [Gayan Kuruppu](https://github.com/gayanvoice)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc