Skip to content

Commit

Permalink
docs: update valueLabels example
Browse files Browse the repository at this point in the history
  • Loading branch information
tool3 committed Jun 4, 2024
1 parent 8b139aa commit 233b2fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const data = [
{ label: "label", value: 2, color: "purple" },
{ label: "label", value: 2, color: "marine" }
];
const chart = new Chartscii(data, { colorLabels: true });
const chart = new Chartscii(data, { colorLabels: true, valueLabels: true });
console.log(chart.create());
```

Expand Down Expand Up @@ -140,7 +140,7 @@ const options: ChartOptions = {
| ----------- | ----------------------------------------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------- |
| percentage | calculate and show percentage data | `boolean` | `false` |
| colorLabels | color labels with provided color per label, or color provided to option | `boolean` | `false` |
| valueLabels | show values of each bar | `boolean` | `true` |
| valueLabels | show values of each bar | `boolean` | `false` |
| sort | sort the input data | `boolean` | `false` |
| reverse | reverse the input data | `boolean` | `false` |
| naked | don’t print chart structure ascii characters | `boolean` | `false` |
Expand Down
7 changes: 4 additions & 3 deletions branding/shellfie.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const data = [
{ label: "label", value: 1, color: "pink" },
{ label: "label", value: 2, color: "purple" },
{ label: "label", value: 1.5, color: "marine" },
{ label: "label", value: 3, color: "red" },
{ label: "label", value: 2.5, color: "blue" }
{ label: "label", value: 3, color: "orange" },
{ label: "label", value: 2.5, color: "green" }
];
const chart = new Chartscii(data, {
// height: 10
Expand All @@ -40,7 +40,8 @@ const chart = new Chartscii(data, {
// barSize: 1,
padding: 1,
barSize: 1,
valueLabels: true
valueLabels: true,
colorLabels: true,
// naked: true,
// valueLabels: true,
// fill: '░',
Expand Down
Binary file modified shellfies/chartscii_chartpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 233b2fe

Please sign in to comment.