simple-ascii-chart-cli 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +5 -9
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -74,13 +74,9 @@ var argv = yargs
74
74
  type: 'boolean',
75
75
  description: 'Hide the x-axis if set to true',
76
76
  })
77
- .option('barChart', {
78
- type: 'boolean',
79
- description: 'Draw bar chart if set to true',
80
- })
81
- .option('horizontalBarChart', {
82
- type: 'boolean',
83
- description: 'Draw horizontal bar chart if set to true',
77
+ .option('mode', {
78
+ type: 'string',
79
+ description: 'Sets mode for the plot (e.g., "line", "bar", "horizontalBar", "point")',
84
80
  })
85
81
  .option('hideYAxis', {
86
82
  type: 'boolean',
@@ -172,11 +168,11 @@ var execute = function (_a) {
172
168
  });
173
169
  };
174
170
  var prepareParams = function (_a) {
175
- var input = _a.input, options = _a.options, width = _a.width, height = _a.height, hideYAxis = _a.hideYAxis, hideXAxis = _a.hideXAxis, fillArea = _a.fillArea, title = _a.title, xLabel = _a.xLabel, yLabel = _a.yLabel, color = _a.color, axisCenter = _a.axisCenter, yRange = _a.yRange, showTickLabel = _a.showTickLabel, thresholds = _a.thresholds, points = _a.points, legend = _a.legend, formatter = _a.formatter, lineFormatter = _a.lineFormatter, symbols = _a.symbols, barChart = _a.barChart, horizontalBarChart = _a.horizontalBarChart;
171
+ var input = _a.input, options = _a.options, width = _a.width, height = _a.height, hideYAxis = _a.hideYAxis, hideXAxis = _a.hideXAxis, fillArea = _a.fillArea, title = _a.title, xLabel = _a.xLabel, yLabel = _a.yLabel, color = _a.color, axisCenter = _a.axisCenter, yRange = _a.yRange, showTickLabel = _a.showTickLabel, thresholds = _a.thresholds, points = _a.points, legend = _a.legend, formatter = _a.formatter, lineFormatter = _a.lineFormatter, symbols = _a.symbols, mode = _a.mode;
176
172
  var currentOptions = options ? JSON.parse(options) : {};
177
173
  return {
178
174
  input: JSON.parse(input),
179
- options: __assign(__assign({}, currentOptions), { width: width, height: height, hideYAxis: hideYAxis, hideXAxis: hideXAxis, title: title, xLabel: xLabel, yLabel: yLabel, fillArea: fillArea, barChart: barChart, horizontalBarChart: horizontalBarChart, color: color ? (0, validators_1.validateColors)(color) : undefined, axisCenter: (0, validators_1.validateAxisCenter)(axisCenter), yRange: (0, validators_1.validateYRange)(yRange), // Validate and format yRange
175
+ options: __assign(__assign({}, currentOptions), { width: width, height: height, hideYAxis: hideYAxis, hideXAxis: hideXAxis, title: title, xLabel: xLabel, yLabel: yLabel, fillArea: fillArea, mode: mode, color: color ? (0, validators_1.validateColors)(color) : undefined, axisCenter: (0, validators_1.validateAxisCenter)(axisCenter), yRange: (0, validators_1.validateYRange)(yRange), // Validate and format yRange
180
176
  showTickLabel: showTickLabel, thresholds: (0, validators_1.validateThresholds)(thresholds), points: (0, validators_1.validatePoints)(points), legend: (0, validators_1.validateLegend)(legend), formatter: (0, validators_1.validateFormatter)(formatter), lineFormatter: (0, validators_1.validateLineFormatter)(lineFormatter), symbols: (0, validators_1.validateSymbols)(symbols) }),
181
177
  };
182
178
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-ascii-chart-cli",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Simple ascii chart generator CLI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -52,7 +52,7 @@
52
52
  "dist/**/*"
53
53
  ],
54
54
  "dependencies": {
55
- "simple-ascii-chart": "^5.1.0",
55
+ "simple-ascii-chart": "^5.2.0",
56
56
  "yargs": "^17.7.2"
57
57
  }
58
58
  }