Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomax/sanity-dashboard-widget-document-chart
Sanity dashboard widget which graphs out count of doctypes
https://github.com/thomax/sanity-dashboard-widget-document-chart
Last synced: 13 days ago
JSON representation
Sanity dashboard widget which graphs out count of doctypes
- Host: GitHub
- URL: https://github.com/thomax/sanity-dashboard-widget-document-chart
- Owner: thomax
- License: mit
- Created: 2019-03-26T14:01:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T04:18:12.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T16:04:28.466Z (about 1 month ago)
- Language: JavaScript
- Size: 271 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sanity - `sanity-plugin-dashboard-widget-document-chart` - Sanity dashboard widget which graphs out count of doctypes (Plugins / Dashboard plugins)
README
# Sanity Dashboard Widget: Document Chart
A widget for the Sanity Content Studio Dashboard which displays a barchart giving a count of your doument types
Disclaimer: This widget is intended as proof of concept/example for building your own Sanity dashboard plugins. It's so feature-incomplete that there are more empty checkboxes on this repo than there are neurons in a cephalopd brain 🦑
## Usage
```bash
cd
sanity install dashboard-widget-document-chart
```Then add something like to your `dashboardConfig.js` file
```js
{
name: 'document-chart',
options: {types: ['post', 'author', 'sanity.imageAsset']},
layout: {width: 'full'}
}
```Swap those types for whichever types you have in your Studio, and want to render in this chart.
There's more on how to configure your dashboard at https://www.sanity.io/docs/dashboard#how-to-configure-the-dashboard-5c1617e3633d