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.
- nodejs
- clone this repository
- cd into repo
npm install
- 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
{
"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
- react dash - the react dash library
- react-dashboard-boilerplate - boilerplate project for starting react-dash-based projects
- react_dashboard - Drupal / DKAN base module for starting react-dash projects in drupal
- react-dash docs - Read the docs!