Skip to content

Commit af1f68b

Browse files
committed
Fixed settings for 2.0.0 release
1 parent f9245e0 commit af1f68b

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,28 @@ To build the app for production:
3838
All NeoDash charts implement the interface defined in `src/charts/Chart.tsx`. A custom chart must do the same. the following parameter as passed to your chart from the application:
3939
- `records`: a list of Neo4j Records. This is the raw data returned from the Neo4j driver.
4040
- `settings`: a dictionary of settings as defined under "advanced report settings" for each report. You can use these values to customize your visualization based on user input.
41+
- `selection`: a dictionary with the selection made in the report footer.
42+
- `dimensions`: an array with the dimensions of the report (mostly not needed, charts automatically fill up space).
43+
- `queryCallback`: a way for the report to read more data from Neo4j, on interactions.
44+
- `setGlobalParameter`: a way for the report to set globally available Cypher parameters, on interactions.
4145

4246
Make sure that your component renders a React component. your component will be automatically scaled to the size of the report. See the other charts in `src/charts/` for examples.
4347

4448
### 2. Extend the config to make your component selectable
4549

4650
To let users choose your visualization, you must add it to the app's report configuration. This config is located in `src/config/ReportConfig.tsx`, and defined by the dictionary `REPORT_TYPES`.
4751

48-
To add your visualization to the config, add a new entry to the `REPORT_TYPES` dictionary with a unique name. The entry's value is an object which can contain the following fields:
49-
- type: the React component you created. Mandatory.
50-
- name: a display name for the visualization. Mandatory.
51-
- `TODO - add more details here...`
52-
53-
If all works, please consider contributing your code to this repository. The more visualizations, the better!
52+
To add your visualization to the config, add a new key to the `REPORT_TYPES` dictionary with a unique name. The entry's value is an object which can contain the following fields:
53+
- `label`: a display name for the visualization. Mandatory.
54+
- `component`: the React component that renders the visualization. Mandatory.
55+
- `helperText`: a string that is show under the query box in the report settings. Mandatory.
56+
- `selection`: a list that contains each of the selection boxes present in the report footer. Optional.
57+
- `settings`: a list of selection boxes that shows under the advanced settings. Optional.
58+
- `maxRecords`: a hard limit on the number of records the visualization can handle. Mandatory.
59+
- `useRecordMapper`: whether to use the in-built record mapper to fix your results in a specific format. Optional.
60+
- `useNodePropsAsFields`: whether to use the node property selector as a report footer override. Optional.
61+
62+
If all works, please consider contributing your code to this repository.
5463

5564
## Questions / Suggestions
5665
If you have any questions about NeoDash, please reach out. For feature requests, consider opening an issue(link) on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neodash",
3-
"version": "2.0.0-preview",
3+
"version": "2.0.0",
44
"description": "NeoDash - Neo4j Dashboard Builder",
55
"neo4jDesktop": {
66
"apiVersion": "^1.2.0"

src/modal/WelcomeScreenModal.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Tooltip } from '@material-ui/core';
1212
* Configures setting the current Neo4j database connection for the dashboard.
1313
*/
1414
export const NeoWelcomeScreenModal = ({ welcomeScreenOpen, setWelcomeScreenOpen,
15-
hasCachedDashboard, hasNeo4jDesktopConnection, createConnectionFromDesktopIntegration, resetDashboard,
15+
hasCachedDashboard, hasNeo4jDesktopConnection, createConnectionFromDesktopIntegration, resetDashboard,
1616
onConnectionModalOpen, onAboutModalOpen }) => {
1717

1818
const [promptOpen, setPromptOpen] = React.useState(false);
@@ -91,13 +91,16 @@ export const NeoWelcomeScreenModal = ({ welcomeScreenOpen, setWelcomeScreenOpen,
9191
</Button>}
9292

9393
<Tooltip title="Try a demo dashboard with a public Neo4j database." aria-label="">
94-
<Button onClick={handleClose}
95-
style={{ marginTop: "10px", width: "100%", backgroundColor: "white", boxShadow: "0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%)" }}
96-
color="default"
97-
variant="contained"
98-
size="large">
99-
Try a Demo
100-
</Button>
94+
<a style={{textDecoration: "none"}} href="http://localhost:3000/?share&type=file&id=https%3a%2f%2fgist.githubusercontent.com%2fnielsdejong%2ff983b6b6e06e4e10a1f31ae693de6600%2fraw%2f8230a024ee847982d46e198790fcb15fc3c1d06b%2fexample.json&credentials=neo4j%2bs%3a%2f%2ffincen%3afincen%40fincen%3ademo.neo4jlabs.com%3a7687">
95+
<Button
96+
97+
style={{ marginTop: "10px", width: "100%", backgroundColor: "white", boxShadow: "0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%)" }}
98+
color="default"
99+
variant="contained"
100+
size="large">
101+
Try a Demo
102+
</Button>
103+
</a>
101104
</Tooltip>
102105

103106
<Tooltip title="Show information about this application." aria-label="">

0 commit comments

Comments
 (0)