Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

NuCivic/react-dash-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-dash-server -- BETA

This is a very loosely implemented test harness for react dash. The express app allows you to use a gist as a configuration object to test dashboard implementations. It also allows you to load the demo sites for different versions (coming soon) of the react-dash library.

NOTE that this is largely a proof of concept. In practice, react-dash development involves using custom data handling functions which cannot be loaded remotely for security reasons. For non-trivial react-dash development use the react-dashboard-boilerplate project which provides a robust development environment, local dev server etc.

Setup react-dash-server

Requirements

  • nodejs

Installation

  • clone this repository
  • cd into repo
  • npm install

Using react-dash-server

  • Run the server: node app.js
  • create a gist with a valid react-dash settings.js file
  • visit localhost:3333/:DASH_VERSION/GIST_ID
  • visit localhost:3333/react-dashbaord to see the demo of the current library

exampke of working gist

{
	"title": "Hello World",
	"components": [{
		"type": "Chart",
		"cardStyle": "Chart",
		"header": "My Pie Chart",
		"data": [
			[{
				"x": 1,
				"y": 40
			}, {
				"x": 2,
				"y": 40
			}, {
				"x": 3,
				"y": 20
			}]
		],
		"dataHandlers": ["NVD3.toPieChartSeries"],
		"settings": {
			"type": "pieChart",
			"x": "x",
			"y": "y",
			"height": "600"
		}
	}]
}

see valid react-dash settings.js file for more examples and info

Related Projects

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published