Download the PHP package frankfont/uf-sprinkle-account-graphs without Composer
On this page you can find all versions of the php package frankfont/uf-sprinkle-account-graphs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download frankfont/uf-sprinkle-account-graphs
More information about frankfont/uf-sprinkle-account-graphs
Files in frankfont/uf-sprinkle-account-graphs
Package uf-sprinkle-account-graphs
Short Description Visual charts of UserFrosting account information
License MIT
Informations about the package uf-sprinkle-account-graphs
uf-sprinkle-account-graphs
This is a custom sprinkle for the UserFrosting framework to show visual charts of account information. (A "sprinkle" is a UserFrosting plugin/module.)
This sprinkle adds bar and pie charts into the standard UserFrosting administration screens. The charts show up automatically when you click on any of the following administration options from the left navigation area:
- Users
- Activities
- Roles
- Permissions
- Groups
There are several chart options displayed near the top of each page next to the label "Chart Options" as shown in the partial screenshot below. (The "none" option has been selected.)
Sample Screenshots
Users Bar Chart:
Users Pie Chart:
Activities Bar Chart:
Roles Bar Chart:
Permissions Bar Chart:
Groups Bar Chart:
Installation
This sprinkle does not modify your database and can simply be installed by adding a dependency declaration into your app/sprinkles.json in the standard UserFrosting recommended manner.
What to add into your sprinkles.json file
The example app/sprinkles.json file shown here adds this sprinkle into the require section and then declares it at the bottom of the base section too.
Important Step: Apply your sprinkles.json File Updates
The sprinkle is downloaded and installed when you run the following command from your UserFrosting docroot:
After the update, you probably also need to run this UserFrosting command so that the assets get deployed ...
Standard Configurations
The default.php declares the default chart shown for each page. You can override these values with a app/.env file or by overriding the default.php entries in code. The values for the app/.env are as follows:
app/.env example override entries
Declare type of chart (none, bar, pie)
SPRINKLE.ACCOUNT_GRAPHS.USERS.DEFAULT.TYPENAME=bar SPRINKLE.ACCOUNT_GRAPHS.ACTIVITIES.DEFAULT.TYPENAME=bar SPRINKLE.ACCOUNT_GRAPHS.ROLES.DEFAULT.TYPENAME=bar SPRINKLE.ACCOUNT_GRAPHS.PERMISSIONS.DEFAULT.TYPENAME=bar SPRINKLE.ACCOUNT_GRAPHS.GROUPS.DEFAULT.TYPENAME=bar
Declare alpha values for color palette [>0,<=1]
SPRINKLE.ACCOUNT_GRAPHS.COLORS.DEFAULT.FILL.LIGHT_ALPHA=.2 SPRINKLE.ACCOUNT_GRAPHS.COLORS.DEFAULT.FILL.MEDIUM_ALPHA=.5
In the example above, if you replace bar with none, then by default no chart is displayed.
Additional Pages
This sprinkle also makes available full size charts at the following URLs of your site.
- /graph/group/memberships
- /graph/role/memberships
- /graph/permission/memberships
- /graph/activity/view
- /graph/users/view