Download the PHP package molbal/smolchart without Composer
On this page you can find all versions of the php package molbal/smolchart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download molbal/smolchart
More information about molbal/smolchart
Files in molbal/smolchart
Package smolchart
Short Description Bite sized charting library, primarily rendered as text
License MIT
Homepage https://github.com/molbal/smolchart
Informations about the package smolchart
Smolchart
Bite-sized charting library that focuses on text (ASCII) rendering, with an HTML renderer for web usage. Ideal for CLIs, logs, and minimalist dashboards.
Note: The library is usable today; the examples below reflect the current API and behavior.
- Documentation: see the docs/ directory or start at docs/README.md
- License: MIT
Features
- Data input: PHP arrays and Illuminate Collections
- Chart types: ProgressBar, BarChart, LineChart
- Outputs: ASCII (terminal), HTML (browser)
- Elements: Axes, Labels, Annotations
- Fluent builder-style configuration
Installation
Requires PHP ^8.2.
Quick Examples
Below are copy-pastable examples that reflect the current API.
Progress Bar (ASCII)
Bar Chart (HTML)
Line Chart (ASCII)
Builder Pattern
Most configuration methods return $this to enable chaining ending with ->render($renderer).
See the full Builder guide at docs/builder.md.
ASCII Renderer options
You can customize the ASCII renderer via a fluent builder:
- If a border is enabled, the title is centered within the top border line.
- Without a border, the title (from withTitle or chart labels['title']) is printed as the first line.
- Bars/lines use the selected character for their filled portions.
- For bar charts, category labels are padded or truncated to a uniform width. By default this width is the longest label; you can override it with withLabelWidth().
Documentation
- Start here: docs/README.md
- Getting started: docs/getting-started.md
- Data & processing: docs/data.md
- Charts:
- Progress Bar: docs/charts/progress-bar.md
- Bar Chart: docs/charts/bar-chart.md
- Line Chart: docs/charts/line-chart.md
- Renderers:
- ASCII: docs/renderers/ascii.md
- HTML: docs/renderers/html.md
Contributing
Contributions are welcome. Please open issues or pull requests on GitHub.
Security
Please review the repository's security policy for reporting vulnerabilities.
License
The MIT License (MIT). Please see LICENSE.md for more information.