|
1 | | -# NeoDash - Neo4j Dashboard Builder |
2 | | -## Introduction |
3 | | -NeoDash is a lightweight web-based tool to create Neo4j dashboards. |
| 1 | +# ⚡ NeoDash - Neo4j Dashboard Builder |
| 2 | +NeoDash is a lightweight web app to create Neo4j dashboards. |
4 | 3 | Writing Cypher is all that's required to build your first dashboard in minutes. Want to give NeoDash a spin right away? Try it here: https://nielsdejong.nl/neodash/. |
5 | 4 |
|
6 | 5 | ### Features |
7 | 6 | - Live reporting on a Neo4j database with a table, graph view, bar chart or line chart. |
8 | | -- Support for reporting on Neo4j data types, including nodes, edges, paths, as well as aggregate types. |
| 7 | +- Interactively select parameters to be used as query parameters. |
| 8 | +- Native support for reporting on Neo4j data types, including nodes, edges, paths, as well as aggregate types. |
9 | 9 | - Setting auto-refresh intervals for each report. |
10 | 10 | - Customizing your dashboard layout with a variety of report sizes. |
11 | 11 | - Saving/loading dashboards as a JSON file. |
12 | 12 |
|
| 13 | +### Documentation |
| 14 | +- For users, see [user-guide.md](./doc/user-guide.md). |
| 15 | +- Extending NeoDash? See [developer-guide.md](./doc/developer-guide.md). |
13 | 16 |
|
14 | | -## Documentation & User Guide |
15 | | -### Reports |
16 | | -NeoDash dashboards are a collection of reports - each report is a view of your graph. |
17 | | -The current version of NeoDash supports six types of reports: |
18 | | - |
19 | | -- Table views |
20 | | -- Graph visualizations |
21 | | -- Bar charts |
22 | | -- Line charts |
23 | | -- JSON output |
24 | | -- Markdown Reports |
25 | | - |
26 | | - Reports sit in resizable containers - _cards_. |
27 | | -A report is always populated by a single Cypher query. An example table report is shown below: |
28 | | - |
29 | | - |
30 | | - |
31 | | -The following rule of thumb holds for reports: |
32 | | -- one report = one card = one Cypher query |
33 | | - |
34 | | -#### Report Settings |
35 | | -Each report has a settings screen that can be accessed by clicking the (⋮) icon on the top right of the card. |
36 | | -In the settings menu, the following can be defined: |
37 | | -- The Cypher query populating the report, |
38 | | -- The type of report, |
39 | | -- The size of the report, |
40 | | -- [Parameters](https://neo4j.com/docs/cypher-manual/current/syntax/parameters/) for your Cypher query, |
41 | | -- A refresh interval for the report. |
42 | | - |
43 | | -> A title of a report can be edited directly, without opening the settings. Just click the header of the report (which by default reads 'Report name...'). |
44 | | -
|
45 | | -An example report settings view is shown below. |
46 | | - |
47 | | - |
48 | | - |
49 | | -While having the report settings open, the report can be moved around or deleted. To close the settings, click the 'save' icon. |
50 | | -#### Tables |
51 | | -The table view renders Neo4j native types in a standard table format. Columns are ordered in the order they are returned by Neo4j, column names are set to the names of your returned variables. [Structural data types](https://neo4j.com/docs/cypher-manual/current/syntax/values/#structural-types) such as nodes, relationships or paths can also be rendered in a table. |
52 | | - |
53 | | -The colors of the nodes and relationships in the table can be set using the Cypher Parameters settings. For example, specifying: |
54 | | -``` |
55 | | -{ |
56 | | - "nodeColor": "orange", |
57 | | - "relColor": "black" |
58 | | -} |
59 | | -``` |
60 | | -will draw the nodes in the table as orange, and the relationships as black. |
61 | | - |
62 | | -#### Graph Visualizations |
63 | | -For almost all graph use-cases, a force-directed graph is your go-to choice of visualization. In NeoDash, you’ll be able to visualize your graph similar to the Neo4j browser: for each node label you choose a style and the property to be displayed. Any query returning nodes, relationships, or paths can be visualized as a graph. |
64 | | -> Doing some graph exploration? Clicking a node will show all properties of that node. |
65 | | -
|
66 | | -Some style properties of the visualization can be changed by passing in extra parameters to your Cypher query. To use custom colors for the graph nodes, add the following to the Cypher Parameters in the settings: |
67 | | -``` |
68 | | -{ |
69 | | - "nodeColors": ["navy","green","red"] |
70 | | -} |
71 | | -``` |
72 | | - |
73 | | -#### Bar Charts |
74 | | -Bar charts can be used to visualize categorical data. Naturally, a bar chart will need a numeric value to plot on the y-axis. The properties to visualize can be dynamically select based on the returned values of your Cypher query. |
75 | | - |
76 | | - |
77 | | -The color of a bar chart can be customized by setting the following value in the Cypher Parameters: |
78 | | -``` |
79 | | -{ |
80 | | - "color": "red" |
81 | | -} |
82 | | -``` |
83 | | -#### Line Charts |
84 | | -Line charts can be used to visualize the relationship between two numeric variables. Just like the bar chart, you’ll select two of the result properties to be plotted on the x and y axis. |
85 | | - |
86 | | -The `Cypher Parameters` setting can be used to customize several style properties of your line chart. Add the following parameters, to create a red curved line chart, with a line width of 4 and a marker radius of 4: |
87 | | -``` |
88 | | -{ |
89 | | - "curve": true, |
90 | | - "radius": 4, |
91 | | - "color": "red", |
92 | | - "width": 4 |
93 | | -} |
94 | | -``` |
95 | | - |
96 | | -#### JSON View |
97 | | -The JSON view report will render the raw JSON response received by the Neo4j driver. |
98 | | -JSON output reports are mainly intended as a debugging tool, if you need to inspect the direct data retrieved from Neo4j. |
99 | | - |
100 | | -#### Markdown |
101 | | -Markdown reports can be used to render static text and images in your reports. |
102 | | -You'll likely use this type of reports to add some comments/interpretations of your reports for the user to see. |
103 | | - |
104 | | -Unlike all other report types, markdown reports do not use Cypher input. |
105 | | -Instead, the text/images you want to show need to be specified in the markdown format. This [page](https://www.markdownguide.org/basic-syntax/) contains a nice overview of the required syntax. |
106 | | - |
107 | | - |
108 | | -### Dashboard Layout |
109 | | -The web-app uses a free-flowing grid to organize your reports as cards. This grid layout has a page width of 12, and a standard card size of 4. |
110 | | -Cards can be resized and moved around if needed. |
111 | | -On mobile displays, small cards will scale to the full width of the screen. |
112 | | - |
113 | | -Differently sized cards will sit together and try to take up available space in the dashboard. The image below illustrates how cards may sit together. |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
118 | | - |
119 | | -The Materialize CSS framework is used to render the cards in a grid layout. For more information on grid layouts in Materialize, check out this link: |
120 | | -https://materializecss.com/grid.html |
121 | | - |
122 | | -> The title of the dashboard can be edited by clicking the page header. |
123 | | -
|
124 | | -### Saving/Loading Reports |
125 | | -By default, your latest dashboard is cached in the browser. |
126 | | - |
127 | | -NeoDash al supports exporting and importing dashboards as a plain JSON file. |
128 | | -This allows you to store / version control dashboards with a project if needed. |
129 | | - |
130 | | -#### Saving |
131 | | -Reports can be exported as JSON by clicking the 'Load/Export' button at the top right of the screen. |
132 | | - |
133 | | -#### Loading |
134 | | -To load an existing dashboard, click the 'Load/Export' button at the top right of the screen. Clear the existing JSON, and paste your loaded dashboard into the box. |
135 | | -Click the green 'Save' button to proceed. |
136 | | - |
137 | | -#### Working with dashboard JSON files |
138 | | -Each dashboard JSON file will have the following structure: |
139 | | -``` |
140 | | -{ |
141 | | - "title": "My Dashboard", |
142 | | - "version": "1.0", |
143 | | - "editable": true, |
144 | | - "reports": [ |
145 | | - ... |
146 | | - ] |
147 | | -} |
148 | | -``` |
149 | | -Here, the value of reports will contain an array of JSON objects, where each object represents a report. |
150 | | -Save files shouldn't be manipulated directly (unless you know what you're doing). |
151 | | - |
152 | | - |
153 | | -> Tip: by setting "editable" to false, your dashboard will be rendered in 'view only' mode, restricting users from changing report titles / editing the settings. |
154 | | -
|
155 | | -### Further examples |
156 | | -Check out the NeoDash release blog post here: |
157 | | -https://nielsdejong.nl/neo4j%20projects/2020/11/16/neodash.html |
158 | | - |
159 | | -## Developer Guide |
160 | | -NeoDash is built with React, and uses the `npm` package manager. |
161 | | -When running NeoDash, ensure that the `PUBLIC_URL` environment variable is set to where you are hosting the application. |
162 | | -Dependencies are specified in `package.json`. |
163 | | - |
164 | | -> NeoDash is not intended to be used in a production setting by one or more users. [Get in touch](mailto:[email protected]) if you need help building a production-grade Neo4j front-end. |
165 | | -### Install |
166 | | -NeoDash can be installed using npm: |
167 | | - |
168 | | -`npm install` |
169 | | - |
170 | | -### Run in development mode |
171 | | -Running the application in development mode: |
172 | | - |
173 | | -`npm start` |
174 | | - |
175 | | -### Build |
176 | | -Building the application: |
177 | | - |
178 | | -`npm run-script build` |
0 commit comments