PHPackages                             lfiweb/jsonstat-phpviz - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lfiweb/jsonstat-phpviz

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lfiweb/jsonstat-phpviz
======================

Render JSON-stat data as multidimensional html tables

3.2(1y ago)2360[2 issues](https://github.com/lfiweb/jsonstat-phpviz/issues)GPL-3.0-or-laterPHP

Since Mar 1Pushed 1y ago3 watchersCompare

[ Source](https://github.com/lfiweb/jsonstat-phpviz)[ Packagist](https://packagist.org/packages/lfiweb/jsonstat-phpviz)[ RSS](/packages/lfiweb-jsonstat-phpviz/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (13)Used By (0)

jsonstat-phpviz
===============

[](#jsonstat-phpviz)

Render [JSON-stat v2.0 data](https://json-stat.org/) with any number of dimensions as an HTML table using PHP.

Features
--------

[](#features)

- render any number of dimensions of any size as an HTML table (e.g., theoretically limited only by memory).
- use any number of dimensions to group rows and columns.
- transpose dimensions along two or more axes
- structures the table with `` and `` elements
- creates a table `` automatically from the JSON-stat.
- renders column and row headers using the attributes `scope`, `colspan` and `rowspan` to provide screen reader support for visually impaired users
- sets CSS classes (`first` and `last`) to identify the start and end of row groups (e.g., row totals)
- exclude dimensions of size one (when ordered continuously from index 0) from rendering when wanted
- export (render) the table as tab separated values (tsv) or any character (csv) of your choosing.
- download (render) the table in the LibreOffice Calc (ods) or the MS Excel format (xlsx).

### not implemented

[](#not-implemented)

- `child` property e.g., hierarchical relationships between different categories

Usage
-----

[](#usage)

### Example 1

[](#example-1)

Render a table from JSON-stat data having four dimensions with sizes `[3,2,4,2]` (= shape). Two dimensions are automatically used to group the rows:

```
